Commit 7044f2f1 authored by Ruslan Zakirov's avatar Ruslan Zakirov
Browse files

RTIR's custom QueueSummary goes, we can use RT's

parent bad34e8e
......@@ -22,6 +22,9 @@
* upgrade script that renames wrongly named scrips, we have
a few scrips that named wrongly
* replace /RTIR/Elements/QueueSummary with RT's QuickSearch
in user's settings for RTIR's home page
=== BRINGING UP TO DATE
* Some pages with forms need new nice layouts like in RT, reply
......
......@@ -423,7 +423,6 @@ Set(@RTIR_HomepageComponents, qw(
/RTIR/Elements/UserDueIncidents
/RTIR/Elements/NobodyDueIncidents
/RTIR/Elements/DueIncidents
/RTIR/Elements/QueueSummary
));
=item C<@Active_MakeClicky>
......
<%ATTR>
Description => loc('RTIR queues summary')
</%ATTR>
<&| /Widgets/TitleBox,
title_class => 'inverse',
title => loc('RTIR queues summary'),
bodyclass=> '',
&>
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<th class="collection-as-table"><&|/l&>Queue</&></th>
% foreach my $s( @states ) {
<th class="collection-as-table"><% $s %></th>
% }
</tr>
% my $i;
% for my $queue (@queues) {
% $i++;
% my $queue_cond = "Queue = '$queue'";
% my $all_q = "$queue_cond AND (". join( ' OR ', map "Status = '$_'", @{ $states{ $queue } } ).')';
<tr class="<% $i%2 ? 'oddline' : 'evenline'%>" >
<td><a href="<% RT->Config->Get('WebPath')%>/Search/Results.html?Query=<% $all_q |un %>""><% $queue %></a></td>
% foreach my $s ( @states ) {
<td align="right">
% if ( grep $_ eq $s, @{ $states{ $queue } } ) {
% my $query = "$queue_cond AND Status = '$s'";
% $Tickets->FromSQL( $query );
% my $qs = $m->comp('/Elements/QueryString', Queue => $queue, Query => $query );
<a href="<% RT->Config->Get('WebPath') %>/RTIR/Search/Results.html?<% $qs |n %>"><% $Tickets->Count %></a></td>
% } else {
-
% }
</td>
% }
</tr>
% }
</table>
</&>
<%ONCE>
my @queues = ('Incidents', 'Incident Reports', 'Investigations');
push @queues, 'Blocks' unless RT->Config->Get('DisableBlocksQueue');
my %states;
$states{$_} = [ RT::IR->Statuses( Queue => $_ ) ] foreach @queues;
my @states = RT::IR->Statuses( Queue => \@queues );
</%ONCE>
<%INIT>
my $Tickets = RT::Tickets->new($session{'CurrentUser'});
</%INIT>
<%ARGS>
</%ARGS>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment