Login or Register

RSS IconRecent posts in this topic

avatar
ncrossland on Aug 7. 2008. 9: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
Ilija Studen on Aug 7. 2008. 1:33 pm
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
avatar
ncrossland on Aug 7. 2008. 2:06 pm
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
Ilija Studen on Aug 7. 2008. 2:35 pm
To display category link use something like this:

{if $ticket->getParentId()}
  {category_link object=$ticket}
{/if}
activeCollab team member
avatar
ncrossland on Aug 7. 2008. 3:12 pm
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
Ilija Studen on Aug 7. 2008. 3:18 pm
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
avatar
ncrossland on Aug 7. 2008. 3:45 pm
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.

RSS IconRecent posts in this topic