import rt 2.0.14
[freeside.git] / rt / webrt / Search / PickRestriction
1 %# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/PickRestriction,v 1.1 2002-08-12 06:17:09 ivan Exp $
2 <FORM ACTION="Listing.html" METHOD="GET">
3 <INPUT TYPE=HIDDEN NAME="Bookmark" VALUE="<% $session{'tickets'}->FreezeLimits()|u %>">
4 <& /Elements/TitleBoxStart, title => 'Refine Search'&>
5 <INPUT TYPE=HIDDEN NAME="CompileRestriction" VALUE=1>
6
7 <ul>
8 <li>Owner is  <& /Elements/SelectBoolean, Name => "OwnerOp", 
9                                           TrueVal=> '=', 
10                                           FalseVal => '!=' 
11 &> 
12 <& /Elements/SelectOwner, Name => "ValueOfOwner" &>
13
14 <li>
15 Requestor email address 
16 <& /Elements/SelectMatch, Name => "RequestorOp" &>
17 <INPUT Name="ValueOfRequestor" SIZE=20>
18
19 <li>
20 Subject <& /Elements/SelectMatch, Name => "SubjectOp" &> 
21 <INPUT Name="ValueOfSubject" SIZE=20>
22
23 <li>Queue  <& /Elements/SelectBoolean,  Name => "QueueOp" , 
24                                         True => "is", 
25                                         False => "isn't", 
26                                         TrueVal=> '=', 
27                                         FalseVal => '!=' &>
28 <& /Elements/SelectQueue, Name => "ValueOfQueue" &>
29
30
31 <li>Priority  <& /Elements/SelectEqualityOperator,  Name => "PriorityOp" &>
32
33 <INPUT Name="ValueOfPriority" SIZE=5>
34
35
36 <li>
37 <& /Elements/SelectDateType, Name => 'DateType' &>
38 <& /Elements/SelectDateRelation, Name=>"DateOp" &>
39 <& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
40
41 <li>Ticket content 
42 <& /Elements/SelectBoolean, Name => "ContentOp", 
43                             True => "matches", 
44                             False => "does not match", 
45                             TrueVal => 'LIKE', 
46                             FalseVal => 'NOT LIKE' 
47 &> 
48 <Input Name="ValueOfContent" Size=20>
49
50 <li>Status 
51 <& /Elements/SelectBoolean, Name => "StatusOp", 
52                             True => "is", 
53                             False => "isn't", 
54                             TrueVal=> '=', 
55                             FalseVal => '!=' 
56 &>  
57 <& /Elements/SelectStatus, Name => "ValueOfStatus" &>
58
59 % while ( my $KeywordSelect = $KeywordSelects->Next ) {
60
61 <li><% $KeywordSelect->Name %> 
62         <& /Elements/SelectBoolean, Name => "KeywordSelectOp". $KeywordSelect->id, 
63                                     True => "is", False => "isn't", 
64                                     TrueVal=> '=', FalseVal => '!=' &>
65
66 <& /Elements/SelectKeyword, Name => "KeywordSelect".$KeywordSelect->id,
67                             KeywordObj => $KeywordSelect->KeywordObj
68                             &>
69 % }
70
71 </UL>
72
73 <& /Elements/TitleBoxEnd &>
74
75 <& /Elements/TitleBoxStart, title => 'Ordering and sorting'&>
76
77 <UL>
78
79 <li>Results per page <& /Elements/SelectResultsPerPage, Name => "RowsPerPage", 
80                                                         Default => $session{'tickets_rows_per_page'} || '50'
81 &>
82
83 <li>Sort results by <& /Elements/SelectTicketSortBy, Name => "TicketsSortBy", 
84                                                      Default => $session{'tickets_sort_by'} 
85 &> 
86 <& /Elements/SelectSortOrder, Name => 'TicketsSortOrder', Default => $session{'tickets_sort_order'} &>
87
88 <li> <& /Elements/Refresh, Name => 'RefreshSearchInterval' , Default => $session{'tickets_refresh_interval'} &>
89
90
91 </UL>
92
93
94 </DIV>
95
96
97
98 <& /Elements/TitleBoxEnd &>
99
100 <& /Elements/Submit, Label => 'Show Results', AlternateLabel => 'Refine', Name => 'Action'&>
101
102 </FORM>
103
104
105  <%INIT>
106  my $KeywordSelects = new RT::KeywordSelects $session{'CurrentUser'};
107  foreach ( $session{'tickets'}->RestrictionValues('Queue') ) {
108         $KeywordSelects->LimitToQueue($_);
109  }
110
111  $KeywordSelects->IncludeGlobals;
112 </%INIT>