Login or Register

RSS IconRecent posts in this topic

avatar Pro
ncrossland on Aug 7. 2008. 4:31 am
Is it possible to customise the display of the Ticket list, to also display the category and assignee next to each ticket?
avatar Staff
Ilija Studen on Aug 7. 2008. 8:33 am
Template used for generation of tickets list is activecollab/application/modules/tickets/views/tickets/index.tpl so you might want to check it out. Also, check view.tpl in the same folder to see how information like assignees is displayed.
activeCollab team member | LinkedIn
avatar Pro
ncrossland on Aug 7. 2008. 9:06 am
Thanks for the quick response. I've managed to get the assignees to show up:

<td class="name">{if $ticket->hasAssignees()}<span style="background-color: #F4E4C5; padding:0 3px;"> {object_assignees object=$ticket} {/if}</span>

But I can't get the category -- the category is not displayed on the View page, so nothing to copy. Any ideas?

Thanks
avatar Staff
Ilija Studen on Aug 7. 2008. 9:35 am
To display category link use something like this:

{if $ticket->getParentId()}
  {category_link object=$ticket}
{/if}
activeCollab team member | LinkedIn
avatar Pro
ncrossland on Aug 7. 2008. 10:12 am
Thanks, that's brilliant.

I added some code so it lists the assignees, and if we are not viewing a specific category (when they would all be the same), it shows the category of each ticket. If anyone else is interested, here's what I added:

After:

<td class="name"><a href="{$ticket->getViewUrl()}">{$ticket->getName()|clean}</a> </td>


Add:

  <td class="name">{if $ticket->hasAssignees()}<span style="background-color: #F4E4C5; padding:0 3px;"> {object_assignees object=$ticket} {/if}</span>
        
        {if !$active_category->isLoaded()}
            <td class="name">
                {if $ticket->getParentId()}  
                    <span style="background-color: #eee; padding:0 3px; white-space:nowrap; "> {category_link object=$ticket}</span>  
                {/if}  
            </td>
        {/if}


Is there any templating mechanism for avoiding overwriting these changes with future upgrades?
avatar Staff
Ilija Studen on Aug 7. 2008. 10:18 am
ncrossland:
Is there any templating mechanism for avoiding overwriting these changes with future upgrades?


No, there is not at the moment. These type of hacks needs to be maintained manually.
activeCollab team member | LinkedIn
avatar Pro
ncrossland on Aug 7. 2008. 10:45 am
Ilija Studen:
No, there is not at the moment. These type of hacks needs to be maintained manually.


That's fine, as long as I know! Thanks for your help.
avatar Pro
forestcall on Sep 10. 2008. 2:24 am
THanks!!! I just implemented this and it is soooo helpful!!
www.medialabpro.com
avatar Pro
ncrossland on Sep 10. 2008. 3:57 am
Attached is a screenshot of how it looks, in case anyone else is interested.

I've also added an edit button beside each ticket, since I nearly always want to edit a ticket, rather than just view it.
avatar Pro
Leon on Sep 10. 2008. 4:05 am
Thanks for the screen shot ncrossland! I was just about to ask and then saw your post. Looks like a cool simple mod to get that little bit extra out of this page. I'll be updating my aC with this soon.

RSS IconRecent posts in this topic