%# BEGIN LICENSE BLOCK %# %# Copyright (c) 1996-2002 Jesse Vincent %# %# (Except where explictly superceded by other copyright notices) %# %# This work is made available to you under the terms of Version 2 of %# the GNU General Public License. A copy of that license should have %# been provided with this software, but in any event can be snarfed %# from www.gnu.org %# %# This work is distributed in the hope that it will be useful, but %# WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU %# General Public License for more details. %# %# %# Unless otherwise specified, all modifications, corrections or %# extensions to this work which alter its source code become the %# property of Best Practical Solutions, LLC when submitted for %# inclusion in the work. %# %# %# END LICENSE BLOCK <& /RTIR/Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &> <& Elements/Tabs, current_subtab => 'RTIR/Incident/ShowReports.html', Title => $title &>
> %if ($ticketcount && ! $ARGS{'HideResults'}) { <& /RTIR/Elements/TicketHeader, check => "radio", Type => 'Incident', %ARGS &> % my $i; %while (my $Ticket = $session{'tickets'}->Next) { % $i++; <& /RTIR/Elements/TicketRow, Type => 'Incident', Ticket => $Ticket, i=> $i, check => "radio", %ARGS &> % }
<&|/l&>First page    % if ( $session{'tickets'}->FirstRow >= $session{'tickets_rows_per_page'}-1 ) { <<&|/l&>Previous page    % } % if ( $session{'tickets'}->FirstRow + $session{'tickets_rows_per_page'} < $ticketcount ) { <&|/l&>Next page> % } %#  <&|/l&>Goto page
(<&|/l, ($session{'tickets'}->FirstRow+1), ($session{'tickets'}->FirstRow() + $session{'tickets'}->RowsPerPage() ) &>[_1] - [_2] shown)
% }
<& /Elements/Submit, Name => "SubmitTicket", Caption => $SubmitCaption, Label => loc("Link") &>
<& /Elements/TitleBoxStart, title => loc('Current search criteria')&> <& /RTIR/Elements/SearchCriteria, Path => "/RTIR/Incident/LinkToIncident.html", %ARGS &> <& /Elements/TitleBoxEnd&> <& /RTIR/Elements/PickRestriction, Queue => $q->id, %ARGS &>
<%INIT> my $ChildObj = LoadTicket($id); my $SubmitCaption = loc("Link #[_1] with selected Incident", $ChildObj->id); my $q = RT::Queue->new($session{'CurrentUser'}); $q->Load('Incidents'); $ARGS{'QueueOp'}="="; $ARGS{'ValueOfQueue'}=$q->Id; my ($title, $ticketcount); $session{'i'}++; if ($session{'tickets'}) { if ($ARGS{'DeleteRestriction'}) { $session{'tickets'}->DeleteRestriction($ARGS{'DeleteRestriction'}); } if ( ($ARGS{'ClearRestrictions'}) || ($ARGS{'NewSearch'}) ) { $session{'tickets'}->ClearRestrictions; } } ProcessSearchQuery(ARGS=>\%ARGS); $session{'tickets'}->RedoSearch(); if ( $session{'tickets'}->DescribeRestrictions()) { $ticketcount = $session{tickets}->Count(); $title = loc('Found [quant,_1,incident]', $ticketcount); } else { $title = loc("Find incidents"); } # Iterate through the ARGS hash and remove anything with a null value. map ($ARGS{$_} =~ /^$/ && (delete $ARGS{$_}), keys %ARGS); my ($bgcolor); my @cols = qw(id Status Priority Subject QueueObj->Name OwnerObj->Name RequestorAddresses DueAsString ); Abort(loc("No search to operate on.")) unless ($session{'tickets'}); #Iterate through each ticket we've been handed <%ARGS> $id => undef