This commit was generated by cvs2svn to compensate for changes in r3921,
[freeside.git] / rt / html / Search / Elements / PickBasics
1 %# {{{ BEGIN BPS TAGGED BLOCK
2 %# 
3 %# COPYRIGHT:
4 %#  
5 %# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC 
6 %#                                          <jesse@bestpractical.com>
7 %# 
8 %# (Except where explicitly superseded by other copyright notices)
9 %# 
10 %# 
11 %# LICENSE:
12 %# 
13 %# This work is made available to you under the terms of Version 2 of
14 %# the GNU General Public License. A copy of that license should have
15 %# been provided with this software, but in any event can be snarfed
16 %# from www.gnu.org.
17 %# 
18 %# This work is distributed in the hope that it will be useful, but
19 %# WITHOUT ANY WARRANTY; without even the implied warranty of
20 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 %# General Public License for more details.
22 %# 
23 %# You should have received a copy of the GNU General Public License
24 %# along with this program; if not, write to the Free Software
25 %# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 %# 
27 %# 
28 %# CONTRIBUTION SUBMISSION POLICY:
29 %# 
30 %# (The following paragraph is not intended to limit the rights granted
31 %# to you to modify and distribute this software under the terms of
32 %# the GNU General Public License and is only of importance to you if
33 %# you choose to contribute your changes and enhancements to the
34 %# community by submitting them to Best Practical Solutions, LLC.)
35 %# 
36 %# By intentionally submitting any modifications, corrections or
37 %# derivatives to this work, or any other work intended for use with
38 %# Request Tracker, to Best Practical Solutions, LLC, you confirm that
39 %# you are the copyright holder for those contributions and you grant
40 %# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
41 %# royalty-free, perpetual, license to use, copy, create derivative
42 %# works based on those contributions, and sublicense and distribute
43 %# those contributions and any derivatives thereof.
44 %# 
45 %# }}} END BPS TAGGED BLOCK
46 <tr><td>
47 % foreach my $field (@fields) {
48 <tr><td align=right>
49 % if ($field eq "Attachment") {
50 <& /Elements/SelectAttachmentField, Name => 'AttachmentField' &>
51 </td><td>
52 <& /Elements/SelectBoolean, Name => "AttachmentOp", 
53                             True => loc("matches"), 
54                             False => loc("does not match"), 
55                             TrueVal => 'LIKE', 
56                             FalseVal => 'NOT LIKE' 
57 &> 
58 </td><td>
59 <Input Name="ValueOfAttachment" Size=20>
60 % } elsif ($field eq "Dates") {
61 <& /Elements/SelectDateType, Name=>"DateField" &>
62 </td><td>
63 <& /Elements/SelectDateRelation, Name=>"DateOp" &>
64 </td><td>
65 <& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
66 % } elsif ($field eq "Links") {
67 <& SelectLinks, Name=>"LinksField" &>
68 </td><td>
69 <& /Elements/SelectBoolean, Name => "LinksOp", 
70                             True => loc("is"), 
71                             False => loc("isn't"), 
72                             TrueVal=> '=', 
73                             FalseVal => '!=' 
74 &>  
75 </td><td>
76 <INPUT Name="ValueOfLinks" value="" SIZE=5>
77 %} elsif ($field eq "Priority") {
78 <SELECT NAME="PriorityField">
79 <OPTION VALUE="Priority"><&|/l&>Priority</&></OPTION>
80 <OPTION VALUE="InitialPriority"><&|/l&>Initial Priority</&></OPTION>
81 <OPTION VALUE="FinalPriority"><&|/l&>Final Priority</&></OPTION>
82 </SELECT>
83 </td><td>
84 <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
85 </td><td>
86 <INPUT Name="ValueOfPriority" SIZE=5>
87 %} elsif ($field =~ m/Time.*/) {
88 <SELECT NAME="TimeField">
89 <OPTION VALUE="TimeWorked"><&|/l&>Time Worked</&></OPTION>
90 <OPTION VALUE="TimeEstimated"><&|/l&>Time Estimated</&></OPTION>
91 <OPTION VALUE="TimeLeft"><&|/l&>Time Left</&></OPTION>
92 </SELECT>
93 </td><td>
94 <& /Elements/SelectEqualityOperator, Name => "TimeOp" &>
95 </td><td>
96 <INPUT Name="ValueOfTime" SIZE=5>
97 % } elsif ($field eq "Status") {
98 <&|/l&>Status</&>
99 </td><td>
100 <& /Elements/SelectBoolean, Name => "StatusOp", 
101                             True => loc("is"), 
102                             False => loc("isn't"), 
103                             TrueVal=> '=', 
104                             FalseVal => '!=' 
105 &>  
106 </td><td>
107 <& /Elements/SelectStatus, Name => "ValueOfStatus", SkipDeleted => 1 &>
108 %} elsif ($field =~ m/.*Priority/ || $field =~ m/Time.*/) {
109 <&|/l&><%$field%></&>
110 </td><td>
111 <& /Elements/SelectEqualityOperator, Name => $field . "Op" &>
112 </td><td>
113 <INPUT Name="<%"ValueOf" . $field%>" SIZE=5>
114 % } elsif ($field eq "Queue") {
115 <&|/l&>Queue</&>
116 </td><td>
117 <& /Elements/SelectBoolean,  Name => "QueueOp" , 
118                                         True => loc("is"), 
119                                         False => loc("isn't"), 
120                                         TrueVal=> '=', 
121                                         FalseVal => '!=' &>
122 </td><td>
123 <& /Elements/SelectQueue, Name => "ValueOfQueue", NamedValues => 1 &>
124 % } elsif ($field eq "id") {
125 <&|/l&>Id</&>
126 </td><td>
127 <& /Elements/SelectEqualityOperator, Name => "idOp" &>
128 </td><td>
129 <INPUT Name="ValueOfid" SIZE=5>
130 % } elsif ($field eq "People") {
131 % foreach my $field (@people) {
132 <tr><td class="label">
133 % if ($field eq "Actor") {
134 <SELECT NAME="ActorField">
135 <OPTION VALUE="Owner"><&|/l&>Owner</&></OPTION>
136 <OPTION VALUE="Creator"><&|/l&>Creator</&></OPTION>
137 <OPTION VALUE="LastUpdatedBy"><&|/l&>LastUpdatedBy</&></OPTION>
138 </SELECT>
139 </td><td>
140 <& /Elements/SelectBoolean, Name => "ActorOp", 
141                                           TrueVal=> '=', 
142                                           FalseVal => '!=' 
143 &> 
144 </td><td>
145 <& /Elements/SelectOwner, Name => "ValueOfActor" &>
146 % } elsif ($field eq 'Watcher') {
147 <& SelectPersonType, Name => 'WatcherField', Default => 'Requestor' &>
148 </td><td>
149 <& /Elements/SelectMatch, Name => "WatcherOp" &>
150 </td><td>
151 <Input Name="ValueOfWatcher" Size=20>
152 % } else {
153 <&|/l&><%$field%></&>
154 <& /Elements/SelectMatch, Name => "$field" . "Op" &>
155 <INPUT Name="<%"ValueOf" . $field%>" value=""SIZE=20>
156 % }
157 </td></tr>
158 % }
159 % } else {
160 <&|/l&><%$field%></&>
161 </td><td>
162 <& /Elements/SelectMatch, Name => "$field" . "Op" &>
163 </td><td>
164 <INPUT Name="<%"ValueOf" . $field%>" value="" SIZE=20>
165 % }
166 </td></tr>
167 % }
168 <& '/Elements/Callback', _CallbackName => 'EndOfList' &>
169 <%INIT>
170 my @fields = ('Attachment',
171     'Queue',
172     'Status',
173     'People',
174     'Dates',
175     'Time',
176     'Priority',
177     'Links',
178     'id',
179     );
180
181 my @people = ('Actor',
182               'Watcher',
183               );
184 </%INIT>