diff options
Diffstat (limited to 'rt/share')
| -rw-r--r-- | rt/share/html/Elements/CollectionAsTable/Row | 5 | ||||
| -rw-r--r-- | rt/share/html/Elements/QueueSummaryByLifecycle | 24 | ||||
| -rw-r--r-- | rt/share/static/css/freeside3/ticket-lists.css | 14 | ||||
| -rw-r--r-- | rt/share/static/css/freeside4/ticket-lists.css | 13 |
4 files changed, 53 insertions, 3 deletions
diff --git a/rt/share/html/Elements/CollectionAsTable/Row b/rt/share/html/Elements/CollectionAsTable/Row index deaa312ba..4b2cfae43 100644 --- a/rt/share/html/Elements/CollectionAsTable/Row +++ b/rt/share/html/Elements/CollectionAsTable/Row @@ -57,6 +57,11 @@ $Class => 'RT__Ticket' $Classes => '' </%ARGS> <%init> +# it's a hack, but it has to be applied in every ticket search regardless +# of format, so... +if ( $record and $record->isa('RT::Ticket') and $record->IsUnreplied ) { + $Classes .= ' unreplied-ticket'; +} $m->out( '<tr class="' . $Classes . ' ' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' . "\n" ); diff --git a/rt/share/html/Elements/QueueSummaryByLifecycle b/rt/share/html/Elements/QueueSummaryByLifecycle index f21cb20c3..d6ed1e678 100644 --- a/rt/share/html/Elements/QueueSummaryByLifecycle +++ b/rt/share/html/Elements/QueueSummaryByLifecycle @@ -66,9 +66,13 @@ for my $queue (@queues) { next if lc($queue->{Lifecycle} || '') ne lc $lifecycle->Name; $i++; + + my $classes = $i%2 ? 'oddline' : 'evenline'; + $classes .= ' unreplied-ticket' if $queue->{Unreplied} > 0; </%PERL> -<tr class="<% $i%2 ? 'oddline' : 'evenline'%>" > +<tr class="<% $classes %>"> +<td></td> <td> <a href="<% $link_all->($queue, \@cur_statuses) %>" title="<% $queue->{Description} %>"><% $queue->{Name} %></a> </td> @@ -134,6 +138,24 @@ for my $queue (@queues) { $lifecycle{ lc $cycle->Name } = $cycle; } +use RT::Search::UnrepliedTickets; +my $Tickets = RT::Tickets->new( RT->SystemUser ); +my $Search = RT::Search::UnrepliedTickets->new( TicketsObj => $Tickets ); +$Search->Prepare; + +for my $queue (@queues) { + my $cycle = RT::Lifecycle->Load( Name => $queue->{'Lifecycle'} ); + $lifecycle{ lc $cycle->Name } = $cycle; + + # show whether there are unreplied tickets + # somewhat inefficient but we only use the count query + my $tix = $Tickets->Clone; + $tix->Limit(FIELD => 'Queue', + OPERATOR => '=', + VALUE => $queue->{id}); + $queue->{Unreplied} = $tix->Count; +} + unless (@statuses) { my %seen; foreach my $set ( 'initial', 'active' ) { diff --git a/rt/share/static/css/freeside3/ticket-lists.css b/rt/share/static/css/freeside3/ticket-lists.css index 84c9a92de..257cf3b07 100644 --- a/rt/share/static/css/freeside3/ticket-lists.css +++ b/rt/share/static/css/freeside3/ticket-lists.css @@ -99,8 +99,18 @@ tr.collection-as-table+tr.collection-as-table th { } - - +tr.unreplied-ticket > :first-child::before { + /* green dot */ + border: 1px solid black; + border-radius: 50%; + display: inline-block; + height: 1ex; + width: 1ex; + float: left; + content: ''; + margin-top: 1ex; + background-color: green; +} table.queue-summary td { background: #efefef; diff --git a/rt/share/static/css/freeside4/ticket-lists.css b/rt/share/static/css/freeside4/ticket-lists.css index cdf10193a..3d4706fd2 100644 --- a/rt/share/static/css/freeside4/ticket-lists.css +++ b/rt/share/static/css/freeside4/ticket-lists.css @@ -81,6 +81,19 @@ table.collection-as-table.chart th { border-bottom: 2px solid #ccc } +tr.unreplied-ticket > :first-child::before { + /* green dot */ + border: 1px solid black; + border-radius: 50%; + display: inline-block; + height: 1ex; + width: 1ex; + float: left; + content: ''; + margin-right: 1ex; + background-color: green; +} + table.queue-summary td { background: #efefef; border-bottom: 1px solid #ccc; |
