Closed (won't fix)
Project:
Worklog
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2006 at 19:35 UTC
Updated:
2 Feb 2013 at 12:26 UTC
Is there anyway to show descriptions from worklog's in the worklog invoice view. I took a look at the custom worklog_views_default_views, but I don't know enough about views to show a second row with the description (or if it is even possible for that matter). Would a custom table be the only way?
Comments
Comment #1
Dave Cohen commentedworklog provides a default view called worklog_invoice. Go to administer >> views and find the 'add' link to modify it. Change it from a table view to a teaser list, and then teasers of each worklog entry will be shown.
The views module is very flexible, so there's a lot you can do here to customize the invoice view.
There's also a hook_worklog, which you can implement in your own module, if you need custom code to modify the header or footer of the invoice (which appears before and after the embedded view). I use this to grab the address of the client. I already have that stored in another node, so I grab the contents of that node based on the client vocabulary term associated with the invoice. That's a bit more involved to do, but I did it that way because I did not want to retype addresses into each invoice. There may be a better mechanism but I'm not sure what it is.
And BTW, I'm not ignoring your worklog.install patch. I appreciate it, but haven't gotten around to checking in.
Comment #2
phoolish commentedThanks for the fast responce. I tried out adding a custom variation of the worklog view with teaser list and lost the pretty table. I guess, for now, its one or the other. Earlier today, I edited the _worklog_invoice_view to show the worklogs as tables, but I would much rather use views because of the ordering capability and the fact that its just so pretty!
Also, I created an action that updates the workflow of a worklog(open to invoiced) when an invoice is created for it. Its actually more of an update for workflow then worklog, but the database query is specific to worklog for now.
I am working on an action to add the address (module profiles) of a user based on a particular taxonomy term. And one to move the workflow to an overdue state after a period of time. Also, on a custom printer-friendly page for invoices.
Again, thanks for the quick responce.
Comment #3
Dave Cohen commentedIf you want the table, and description (teaser) in the same view, you can customize the theme of the view. The documentation for views is somewhere on drupal.org and it will tell you how to do it.
I'm totally interested in the workflow actions you're writing. I think they belong in worklog. Send patches, please.
Comment #4
phoolish commentedOnly way to setup custom rows for a view is to do it from the themes (template.php anyone...). I was thinking of two seperate views. One with the current info and one for descriptions only with one referencing the other. THoughts?
Comment #5
Dave Cohen commentedWell, each row in the invoice contains a link to the worklog node, which has the description. Isn't that enough?
If not, it may still be possible to do this with the view header or something that doesn't require changing the worklog module.
Comment #6
simon georges commentedThis version of Worklog is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.