summaryrefslogtreecommitdiff
path: root/rt/webrt/Search/PickRestriction
blob: 82f576c1f0bbd2311fb7ba49caebd5181e0481ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/PickRestriction,v 1.1 2002-08-12 06:17:09 ivan Exp $
<FORM ACTION="Listing.html" METHOD="GET">
<INPUT TYPE=HIDDEN NAME="Bookmark" VALUE="<% $session{'tickets'}->FreezeLimits()|u %>">
<& /Elements/TitleBoxStart, title => 'Refine Search'&>
<INPUT TYPE=HIDDEN NAME="CompileRestriction" VALUE=1>

<ul>
<li>Owner is  <& /Elements/SelectBoolean, Name => "OwnerOp", 
					  TrueVal=> '=', 
					  FalseVal => '!=' 
&> 
<& /Elements/SelectOwner, Name => "ValueOfOwner" &>

<li>
Requestor email address 
<& /Elements/SelectMatch, Name => "RequestorOp" &>
<INPUT Name="ValueOfRequestor" SIZE=20>

<li>
Subject <& /Elements/SelectMatch, Name => "SubjectOp" &> 
<INPUT Name="ValueOfSubject" SIZE=20>

<li>Queue  <& /Elements/SelectBoolean,  Name => "QueueOp" , 
					True => "is", 
					False => "isn't", 
					TrueVal=> '=', 
					FalseVal => '!=' &>
<& /Elements/SelectQueue, Name => "ValueOfQueue" &>


<li>Priority  <& /Elements/SelectEqualityOperator,  Name => "PriorityOp" &>

<INPUT Name="ValueOfPriority" SIZE=5>


<li>
<& /Elements/SelectDateType, Name => 'DateType' &>
<& /Elements/SelectDateRelation, Name=>"DateOp" &>
<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>

<li>Ticket content 
<& /Elements/SelectBoolean, Name => "ContentOp", 
			    True => "matches", 
			    False => "does not match", 
			    TrueVal => 'LIKE', 
			    FalseVal => 'NOT LIKE' 
&> 
<Input Name="ValueOfContent" Size=20>

<li>Status 
<& /Elements/SelectBoolean, Name => "StatusOp", 
			    True => "is", 
  			    False => "isn't", 
			    TrueVal=> '=', 
			    FalseVal => '!=' 
&>  
<& /Elements/SelectStatus, Name => "ValueOfStatus" &>

% while ( my $KeywordSelect = $KeywordSelects->Next ) {

<li><% $KeywordSelect->Name %> 
	<& /Elements/SelectBoolean, Name => "KeywordSelectOp". $KeywordSelect->id, 
				    True => "is", False => "isn't", 
  				    TrueVal=> '=', FalseVal => '!=' &>

<& /Elements/SelectKeyword, Name => "KeywordSelect".$KeywordSelect->id,
			    KeywordObj => $KeywordSelect->KeywordObj
			    &>
% }

</UL>

<& /Elements/TitleBoxEnd &>

<& /Elements/TitleBoxStart, title => 'Ordering and sorting'&>

<UL>

<li>Results per page <& /Elements/SelectResultsPerPage, Name => "RowsPerPage", 
							Default => $session{'tickets_rows_per_page'} || '50'
&>

<li>Sort results by <& /Elements/SelectTicketSortBy, Name => "TicketsSortBy", 
						     Default => $session{'tickets_sort_by'} 
&> 
<& /Elements/SelectSortOrder, Name => 'TicketsSortOrder', Default => $session{'tickets_sort_order'} &>

<li> <& /Elements/Refresh, Name => 'RefreshSearchInterval' , Default => $session{'tickets_refresh_interval'} &>


</UL>


</DIV>



<& /Elements/TitleBoxEnd &>

<& /Elements/Submit, Label => 'Show Results', AlternateLabel => 'Refine', Name => 'Action'&>

</FORM>


 <%INIT>
 my $KeywordSelects = new RT::KeywordSelects $session{'CurrentUser'};
 foreach ( $session{'tickets'}->RestrictionValues('Queue') ) {
        $KeywordSelects->LimitToQueue($_);
 }

 $KeywordSelects->IncludeGlobals;
</%INIT>