1 %# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/Listing.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
2 %# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
3 <& /Elements/Header, Title => "Search", Refresh => $session{'tickets_refresh_interval'} &>
4 <& /Elements/Tabs, current_toptab => 'Search/Listing.html' &>
7 % unless ($ARGS{'Action'} eq 'Refine') {
8 <TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=1>
10 %foreach my $col (@{Config(\%ARGS, 'QueueListingCols')}) {
15 my $attr = $col->{'TicketAttribute'};
16 $attr =~ s/Obj->(Name|AsString|AgeAsString)//g;
17 if ($session{'tickets_sort_order'} =~ /^asc$/i) {
24 % if (grep (/^$attr$/i, $session{'tickets'}->SortFields)) {
26 % if ($attr eq $session{'tickets_sort_by'}) {
29 HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|u%>&TicketsSortBy=<%$attr%>&TicketsSortOrder=<%$order%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>">
43 $session{'tickets'}->RedoSearch();
44 while (my $Ticket = $session{'tickets'}->Next) {
53 <TR bgcolor="<%$bgcolor%>" >
54 %# The ticket view is controlled by config.pm, WebOptions
55 %foreach my $col (@{Config(\%ARGS,'QueueListingCols')}) {
56 <TD><& TicketCell , Ticket=>$Ticket, Column=>$col &></TD>
67 <a href="Listing.html?GotoPage=1">First page</a>
69 <a href="Listing.html?GotoPage=Prev"><Previous page</a>
71 <a href="Listing.html?GotoPage=Next">Next page></a>
72 %# <form method=get action="Listing.html">Goto page <input name=GotoPage size=2></form>
75 % if ($session{'tickets'}->Count()) {
77 <a href="Bulk.html">Update all these tickets at once</a>
82 % } #endif {$ARGS{'Action'} eq 'Refine')
86 <& /Elements/TitleBoxStart, title => 'Search Criteria'&>
88 <A HREF="<% $RT::WebPath%>/Search/Listing.html?ClearRestrictions=1">New search</a><br>
89 <A HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|u%>&TicketsSortBy=<%$session{'tickets_sort_by'}%>&TicketsSortOrder=<%$session{'tickets_sort_order'}%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>">Bookmarkable URL for this search</a>
92 % my %restrictions=$session{'tickets'}->DescribeRestrictions();
93 % my %seen_restrictions=();
94 % foreach $row (keys %restrictions){
95 % my $tmp=$restrictions{"$row"};
96 % if( ! defined( $seen_restrictions{"$tmp"} ) ){
97 <%$restrictions{"$row"}%> <A HREF="<% $RT::WebPath%>/Search/Listing.html?DeleteRestriction=<%$row%>">[delete]</a><br>
99 % $session{'tickets'}->DeleteRestriction($row);
100 <b>Deleted Duplicate Restriction <i><%$tmp%></i></b><br>
102 % $seen_restrictions{"$tmp"}++;
104 <& /Elements/TitleBoxEnd&>
108 <& PickRestriction &>
117 require RT::Interface::Web;
120 if ($session{'tickets'}) {
121 if ( ($ARGS{'ClearRestrictions'}) ||
122 ($ARGS{'NewSearch'}) ) {
123 $session{'tickets'}->ClearRestrictions;
126 if ($ARGS{'DeleteRestriction'}) {
127 $session{'tickets'}->DeleteRestriction($ARGS{'DeleteRestriction'});
130 &ProcessSearchQuery(ARGS=>\%ARGS);