3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 %# (Except where explictly superceded by other copyright notices)
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %# General Public License for more details.
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
24 <FORM ACTION="Listing.html" METHOD="GET">
25 <INPUT TYPE=HIDDEN NAME="Bookmark" VALUE="<% $session{'tickets'}->FreezeLimits()|u %>">
26 <& /Elements/TitleBoxStart, title => loc('Refine search')&>
27 <INPUT TYPE=HIDDEN NAME="CompileRestriction" VALUE=1>
30 <li><&|/l&>Owner is</&> <& /Elements/SelectBoolean, Name => "OwnerOp",
34 <& /Elements/SelectOwner, Name => "ValueOfOwner" &>
37 <&|/l&>Requestor email address</&>
38 <& /Elements/SelectMatch, Name => "RequestorOp" &>
39 <INPUT Name="ValueOfRequestor" SIZE=20>
42 <&|/l&>Subject</&> <& /Elements/SelectMatch, Name => "SubjectOp" &>
43 <INPUT Name="ValueOfSubject" SIZE=20>
45 <li><&|/l&>Queue</&> <& /Elements/SelectBoolean, Name => "QueueOp" ,
47 False => loc("isn't"),
50 <& /Elements/SelectQueue, Name => loc("ValueOfQueue") &>
53 <li><&|/l&>Priority</&> <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
55 <INPUT Name="ValueOfPriority" SIZE=5>
58 <& /Elements/SelectDateType, Name => 'DateType' &>
59 <& /Elements/SelectDateRelation, Name=>"DateOp" &>
60 <& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
62 <li><&|/l&>Ticket attachment</&>
64 <& /Elements/SelectAttachmentField, Name => 'AttachmentField' &>
65 <& /Elements/SelectBoolean, Name => "AttachmentFieldOp",
66 True => loc("matches"),
67 False => loc("does not match"),
69 FalseVal => 'NOT LIKE'
71 <Input Name="ValueOfAttachmentField" Size=20>
74 <& /Elements/SelectBoolean, Name => "StatusOp",
76 False => loc("isn't"),
80 <& /Elements/SelectStatus, Name => "ValueOfStatus" &>
83 % while ( my $CustomField = $CustomFields->Next ) {
85 <li><% $CustomField->Name %>
86 <& /Elements/SelectCustomFieldOperator, Name => "CustomFieldOp". $CustomField->id,
88 False => loc("isn't"),
89 TrueVal=> '=', FalseVal => '!=' &>
91 <& /Elements/SelectCustomFieldValue, Name => "CustomField".$CustomField->id,
92 CustomField => $CustomField,
98 <& /Elements/TitleBoxEnd &>
100 <& /Elements/TitleBoxStart, title => loc('Ordering and sorting')&>
104 <li><&|/l&>Results per page</&> <& /Elements/SelectResultsPerPage, Name => "RowsPerPage",
105 Default => $session{'tickets_rows_per_page'} || '50'
108 <li><&|/l&>Sort results by</&> <& /Elements/SelectTicketSortBy, Name => "TicketsSortBy",
109 Default => $session{'tickets_sort_by'}
111 <& /Elements/SelectSortOrder, Name => 'TicketsSortOrder', Default => $session{'tickets_sort_order'} &>
113 <li><input type="checkbox" name="HideResults" <%$ARGS{'HideResults'} && 'CHECKED'%>> <&|/l&>Don't show search results</&>
114 <li><& /Elements/Refresh, Name => 'RefreshSearchInterval' , Default => $session{'tickets_refresh_interval'} &>
123 <& /Elements/TitleBoxEnd &>
125 <& /Elements/Submit, Label => loc('Search'), Name => 'Action'&>
131 my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
132 foreach ( $session{'tickets'}->RestrictionValues('Queue') ) {
133 # Gotta load up the $queue object, since queues get stored by name now.
134 my $queue = RT::Queue->new($session{'CurrentUser'});
136 $CustomFields->LimitToQueue($queue->Id);
139 $CustomFields->LimitToGlobal();