97a10d4ab2b9ea8838ac3ff476a6bf1de2189337
[vuplus_webkit] / Websites / bugs.webkit.org / template / en / default / search / boolean-charts.html.tmpl
1 [%# The contents of this file are subject to the Mozilla Public
2   # License Version 1.1 (the "License"); you may not use this file
3   # except in compliance with the License. You may obtain a copy of
4   # the License at http://www.mozilla.org/MPL/
5   #
6   # Software distributed under the License is distributed on an "AS
7   # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8   # implied. See the License for the specific language governing
9   # rights and limitations under the License.
10   #
11   # The Original Code is the Bugzilla Bug Tracking System.
12   #
13   # The Initial Developer of the Original Code is Netscape Communications
14   # Corporation. Portions created by Netscape are
15   # Copyright (C) 1998 Netscape Communications Corporation. All
16   # Rights Reserved.
17   #
18   # Contributor(s): Gervase Markham <gerv@gerv.net>
19   #%]
20   
21 [% types = [
22   { name => "noop", description => "---" },
23   { name => "equals", description => "is equal to" },
24   { name => "notequals", description => "is not equal to" },
25   { name => "anyexact", description => "is equal to any of the strings" },
26   { name => "substring", description => "contains the string" },
27   { name => "casesubstring", description => "contains the string (exact case)" },
28   { name => "notsubstring", description => "does not contain the string" },
29   { name => "anywordssubstr", description => "contains any of the strings" },
30   { name => "allwordssubstr", description => "contains all of the strings" },
31   { name => "nowordssubstr", description => "contains none of the strings" },
32   { name => "regexp", description => "contains regexp" },
33   { name => "notregexp", description => "does not contain regexp" },
34   { name => "lessthan", description => "is less than" },
35   { name => "greaterthan", description => "is greater than" },
36   { name => "anywords", description => "contains any of the words" },
37   { name => "allwords", description => "contains all of the words" },
38   { name => "nowords", description => "contains none of the words" },
39   { name => "changedbefore", description => "changed before" },
40   { name => "changedafter", description => "changed after" },
41   { name => "changedfrom", description => "changed from" },
42   { name => "changedto", description => "changed to" },
43   { name => "changedby", description => "changed by" },
44   { name => "matches", description => "matches" } ] %]
45
46   <p>
47     <strong>
48       <a name="chart">Advanced Searching Using Boolean Charts</a>:
49     </strong>
50   </p>
51
52 [%# Whoever wrote the original version of boolean charts had a seriously twisted mind %]
53
54 [% jsmagic = "onclick=\"this.form.action='query.cgi#chart'; this.form.method='POST'; return 1;\"" %]
55
56 [% FOREACH chart = default.charts %]
57   [% chartnum = loop.count - 1 %]
58   <table>
59     <tr>
60       <td>
61         <input type="checkbox" id="negate[% chartnum FILTER html %]"
62              name="negate[% chartnum FILTER html %]" value="1"
63             [%+ "checked" IF chart.negate %]>
64         <label for="negate[% chartnum FILTER html %]">
65           Not (negate this whole chart)
66         </label>
67       </td>
68     </tr>
69   [% FOREACH row = chart.rows %]
70     [% rownum = loop.count - 1 %]
71     <tr>
72     [% FOREACH col = row %]
73       [% colnum = loop.count - 1 %]
74       <td>
75         <select name="[% "field${chartnum}-${rownum}-${colnum}" %]">
76           [% FOREACH field = fields %]
77             <option value="[% field.name %]" [% "selected" IF field.name == col.field %]>
78               [% field_descs.${field.name} || field.description FILTER html %]
79             </option>
80           [% END %]
81         </select>
82
83         <select name="[% "type${chartnum}-${rownum}-${colnum}" %]">
84           [% FOREACH type = types %]
85             <option value="[% type.name %]"
86               [%- " selected" IF type.name == col.type %]>[% type.description %]</option>
87           [% END %]
88         </select>
89
90         <input name="[% "value${chartnum}-${rownum}-${colnum}" %]" 
91                value="[% col.value FILTER html %]"> 
92       </td>
93       
94       [% UNLESS loop.last %]
95         <td align="center"> 
96           Or 
97         </td>    
98       </tr>
99       <tr>
100       [% ELSE %]
101         <td>
102           [% newor = colnum + 1 %]
103           <input type="submit" value="Or" [% jsmagic %]
104                  name="cmd-add[% "${chartnum}-${rownum}-${newor}" %]"
105                  id="cmd-add[% "${chartnum}-${rownum}-${newor}" %]">
106         </td>
107       [% END %]
108       
109     [% END %]
110     </tr>
111     
112     [% UNLESS loop.last %]
113     <tr>
114       <td>And</td>
115     </tr>    
116     [% ELSE %]
117     <tr>
118       <td>
119         [% newand = rownum + 1; newchart = chartnum + 1 %]
120         <input type="submit" value="And" [% jsmagic %]
121                name="cmd-add[% "${chartnum}-${newand}-0" %]"
122                id="cmd-add[% "${chartnum}-${newand}-0" %]">
123         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
124         <input type="submit" value="Add another boolean chart" [% jsmagic %]
125                name="cmd-add[% newchart %]-0-0"
126                id="cmd-add[% newchart %]-0-0">
127         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
128       </td>
129     </tr>   
130     [% END %]
131     
132   [% END %]
133   </table>
134   <hr>
135 [% END %]