%# BEGIN LICENSE BLOCK %# %# Copyright (c) 1996-2003 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 <& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &> <& /Ticket/Elements/Tabs, current_tab => "Search/Results.html".$QueryString, Title => $title, Format => $Format, Query => $Query, Rows => $ARGS{'Rows'}, OrderBy => $ARGS{'OrderBy'}, Order => $ARGS{'Order'} &>
<& /Elements/TicketList, Query => $Query, AllowSorting => 1, OrderBy => $OrderBy, Order => $Order, Rows => $Rows, Page => $Page, Format => $Format, BaseURL => $RT::WebPath."/Search/Results.html?" &>
<&|/l&>Update multiple tickets
<&|/l&>Bookmarkable link
<&|/l&>spreadsheet | <&|/l&>RSS | <&|/l&>Work offline
<%INIT> my ($title, $ticketcount); $session{'i'}++; $session{'tickets'} = RT::Tickets->new($session{'CurrentUser'}) unless ($session{'tickets'}); $session{'tickets'}->FromSQL($Query) if ($Query); $session{'tickets'}->OrderBy(FIELD => $OrderBy, ORDER => $Order); if ($OrderBy ne $session{'CurrentSearchHash'}->{'OrderBy'} or $Order ne $session{'CurrentSearchHash'}->{'Order'}) { $session{'CurrentSearchHash'}->{'OrderBy'} = $OrderBy; $session{'CurrentSearchHash'}->{'Order'} = $Order; # Invalidate the ordering cache undef $session{'tickets'}->{'items_array'}; } if ( $session{'tickets'}->Query()) { $ticketcount = $session{tickets}->CountAll(); $title = loc('Found [quant,_1,ticket]', $ticketcount); } else { $title = loc("Find tickets"); } my $QueryString = "?".$m->comp('/Elements/QueryString', Query => $Query, Format => $Format, Rows => $Rows, OrderBy => $OrderBy, Order => $Order, Page => $Page); <%CLEANUP> $session{'tickets'}->PrepForSerialization(); <%ARGS> $Query => undef $Format => undef $HideResults => 0 $Rows => 50 $Page => 1 $OrderBy => 'id' $Order => 'ASC'