From 30022d6d11ff5b66efa4e76077efb0d0aed41a0a Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Mon, 13 Jan 2014 19:30:05 +0000 Subject: [PATCH] Add icon to indicate if a ticket has collaborators --- include/staff/tickets.inc.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 1415ce76d..bbd837c9c 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -265,11 +265,15 @@ while ($row = db_fetch_array($res)) { // Fetch attachment and thread entry counts if ($results) { - $counts_sql = 'SELECT ticket.ticket_id, count(attach.attach_id) as attachments, - count(DISTINCT thread.id) as thread_count + $counts_sql = 'SELECT ticket.ticket_id, + count(DISTINCT attach.attach_id) as attachments, + count(DISTINCT thread.id) as thread_count, + count(DISTINCT collab.id) as collaborators FROM '.TICKET_TABLE.' ticket LEFT JOIN '.TICKET_ATTACHMENT_TABLE.' attach ON (ticket.ticket_id=attach.ticket_id) ' .' LEFT JOIN '.TICKET_THREAD_TABLE.' thread ON ( ticket.ticket_id=thread.ticket_id) ' + .' LEFT JOIN '.TICKET_COLLABORATOR_TABLE.' collab + ON ( ticket.ticket_id=collab.ticket_id) ' .' WHERE ticket.ticket_id IN ('.implode(',', db_input(array_keys($results))).') GROUP BY ticket.ticket_id'; $ids_res = db_query($counts_sql); @@ -404,11 +408,17 @@ if ($results) { <a class="Icon <?php echo strtolower($row['source']); ?>Ticket ticketPreview" title="Preview Ticket" href="tickets.php?id=<?php echo $row['ticket_id']; ?>"><?php echo $tid; ?></a></td> <td align="center" nowrap><?php echo Format::db_datetime($row['effective_date']); ?></td> - <td><a <?php if($flag) { ?> class="Icon <?php echo $flag; ?>Ticket" title="<?php echo ucfirst($flag); ?> Ticket" <?php } ?> + <td><a <?php if ($flag) { ?> class="Icon <?php echo $flag; ?>Ticket" title="<?php echo ucfirst($flag); ?> Ticket" <?php } ?> href="tickets.php?id=<?php echo $row['ticket_id']; ?>"><?php echo $subject; ?></a> - - <?php echo ($threadcount>1)?" <small>($threadcount)</small> ":''?> - <?php echo $row['attachments']?"<span class='Icon file'> </span>":''; ?> + <?php + if ($threadcount>1) + echo "<small>($threadcount)</small> ".'<i + class="icon-fixed-width icon-comments-alt"></i> '; + if ($row['collaborators']) + echo '<i class="icon-fixed-width icon-group faded"></i> '; + if ($row['attachments']) + echo '<i class="icon-fixed-width icon-paperclip"></i> '; + ?> </td> <td nowrap> <?php echo Format::truncate($row['name'],22,strpos($row['name'],'@')); ?> </td> <?php -- GitLab