1[%# This Source Code Form is subject to the terms of the Mozilla Public
2  # License, v. 2.0. If a copy of the MPL was not distributed with this
3  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4  #
5  # This Source Code Form is "Incompatible With Secondary Licenses", as
6  # defined by the Mozilla Public License, v. 2.0.
7  #%]
8
9[% USE Bugzilla %]
10[% cgi = Bugzilla.cgi %]
11
12[% PROCESS global/header.html.tmpl
13  title="Anfragewarteschlange"
14  onload="var f = document.request_form; selectProduct(f.product, f.component, null, null, 'Beliebig');"
15  javascript_urls=["js/productform.js", "js/field.js"]
16  style_urls = ['skins/standard/buglist.css']
17  yui = ['autocomplete']
18%]
19
20<script type="text/javascript">
21  var useclassification = false; // No classification level in use
22  var first_load = true; // Is this the first time we load the page?
23  var last_sel = []; // Caches last selection
24  var cpts = new Array();
25  [% n = 1 %]
26  [% IF Param('useclassification') %]
27    [% FOREACH clas = user.get_selectable_classifications %]
28      [% FOREACH prod = user.get_selectable_products(clas.id) %]
29        [%+ PROCESS js_comp %]
30      [% END %]
31    [% END %]
32  [% ELSE %]
33    [% FOREACH prod = user.get_selectable_products %]
34      [%+ PROCESS js_comp %]
35    [% END %]
36  [% END %]
37</script>
38
39[% BLOCK js_comp %]
40  cpts['[% n %]'] = [
41    [%- FOREACH comp = prod.components %]'[% comp.name FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%]];
42  [% n = n+1 %]
43[% END %]
44
45<p>
46Wenn Sie eingeloggt sind, dann werden hier standardmäßig nur Anfragen
47aufgelistet, die Sie gestellt haben oder die an Sie gerichtet sind.
48Sie können die Anzeigefilterkriterien im untenstehenden Formular ändern.
49Wenn Sie nicht eingeloggt sind, dann werden hier alle offenen Anfragen
50aufgelistet, die nicht in ihrer Sichtbarkeit auf einzelne Gruppen beschränkt
51sind.
52</p>
53
54<form id="request_form" name="request_form" action="request.cgi" method="get">
55  <input type="hidden" name="action" value="queue">
56
57  <table id="filtering">
58    <tr>
59      <th>Anfragesteller:</th>
60      <td>
61        [% INCLUDE global/userselect.html.tmpl
62           id => "requester"
63           name => "requester"
64           value => cgi.param('requester')
65           size => 20
66           emptyok => 1
67           field_title => "Login des Anfragestellers"
68        %]
69      </td>
70      <th>[% terms.Product %]:</th>
71      <td>
72        <select name="product" onchange="selectProduct(this, this.form.component, null, null, 'Beliebig');">
73          <option value="">Beliebig</option>
74          [% IF Param('useclassification') %]
75            [% FOREACH c = user.get_selectable_classifications %]
76              <optgroup label="[% c.name FILTER html %]">
77                [% FOREACH p = user.get_selectable_products(c.id) %]
78                  <option value="[% p.name FILTER html %]"
79                    [% " selected" IF cgi.param('product') == p.name %]>
80                    [% p.name FILTER html %]
81                  </option>
82                [% END %]
83              </optgroup>
84            [% END %]
85          [% ELSE %]
86            [% FOREACH p = user.get_selectable_products %]
87              <option value="[% p.name FILTER html %]"
88                [% " selected" IF cgi.param('product') == p.name %]>
89                [% p.name FILTER html %]
90              </option>
91            [% END %]
92          [% END %]
93        </select>
94      </td>
95      <th>Markierungstyp:</th>
96      <td>
97        [% PROCESS "global/select-menu.html.tmpl"
98                    name="type"
99                    options=types
100                    default=cgi.param('type') %]
101      </td>
102
103      [%# We could let people see a "queue" of non-pending requests. %]
104      <!--
105      <th>Status:</th>
106      <td>
107        [%# PROCESS "global/select-menu.html.tmpl"
108                    name="status"
109                    options=["alle", "?", "+-", "+", "-"]
110                    default=cgi.param('status') %]
111      </td>
112      -->
113
114    </tr>
115    <tr>
116      <th>Angefragter:</th>
117      <td>
118        [% INCLUDE global/userselect.html.tmpl
119           id => "requestee"
120           name => "requestee"
121           value => cgi.param('requestee')
122           size => 20
123           emptyok => 1
124           hyphenok => 1
125           field_title => "Login des Angefragten oder „-“ (Bindestrich) für Anfragen ohne Angefragtem"
126        %]
127      </td>
128      <th>[% terms.Component %]:</th>
129      <td>
130        <select name="component">
131          <option value="">Beliebig</option>
132          [% FOREACH comp = components %]
133            <option value="[% comp FILTER html %]" [% "selected" IF cgi.param('component') == comp %]>
134              [% comp FILTER html %]</option>
135          [% END %]
136        </select>
137      </td>
138      <th>Gruppieren nach:</th>
139      <td>
140        [% groups = {
141            "Anfragesteller" => 'requester' ,
142            "Angefragter" => 'requestee' ,
143            "Markierungstyp" => 'type' ,
144            "Kategorie" => 'category'
145          } %]
146        [% PROCESS "global/select-menu.html.tmpl" name="group" options=groups default=cgi.param('group') %]
147      </td>
148    </tr>
149    <tr>
150      <th></th>
151      <td>
152        <select id="do_union" name="do_union">
153          <option value="0">Anfragesteller UND Angefragter soll passen</option>
154          <option value="1" [% 'selected="selected"' IF cgi.param('do_union') %]>
155            Anfragesteller ODER Angefragter soll passen</option>
156        </select>
157      </td>
158      <td colspan="3"></td>
159      <td><input type="submit" id="filter" value="Filtern"></td>
160    </tr>
161  </table>
162</form>
163
164[% column_headers = {
165      "type"       => "Markierungstyp" ,
166      "status"     => "Status" ,
167      "bug"        => "$terms.Bug" ,
168      "attachment" => "Anhang" ,
169      "requester"  => "Anfragesteller" ,
170      "requestee"  => "Angefragter" ,
171      "created"    => "Angelegt" ,
172      "category"   => "$terms.product/$terms.component"    } %]
173
174[% DEFAULT display_columns = ["requester", "requestee", "type", "bug", "attachment", "created"]
175           group_field     = "Angefragter"
176           group_value     = ""
177%]
178
179[% IF debug %]
180  <p>[% query FILTER html %]</p>
181[% END %]
182
183[% IF requests.size == 0 %]
184  <p>
185    Keine Anfragen gefunden.
186  </p>
187[% ELSE %]
188  [% FOREACH request = requests %]
189    [% IF request.$group_field != group_value || loop.first %]
190      [% group_value = request.$group_field %]
191      [% PROCESS display_buglist UNLESS loop.first %]
192      [% PROCESS start_new_table %]
193    [% END %]
194    [% buglist.${request.bug_id} = 1 %]
195    <tr>
196      [% FOREACH column = display_columns %]
197        [% NEXT IF column == group_field || excluded_columns.contains(column) %]
198        <td>
199          [% PROCESS "display_$column" %]
200          [% Hook.process('after_column') %]
201        </td>
202      [% END %]
203    </tr>
204  [% END %]
205  [% PROCESS display_buglist %]
206[% END %]
207
208[% PROCESS global/footer.html.tmpl %]
209
210[% BLOCK start_new_table %]
211  [% buglist = {} %]
212
213  <h3>[% column_headers.$group_field %]:
214    [%+ (request.$group_field || "Keiner") FILTER email FILTER html %]</h3>
215  <table class="requests" cellspacing="0" cellpadding="4" border="1">
216    <tr>
217      [% FOREACH column = display_columns %]
218        [% NEXT IF column == group_field || excluded_columns.contains(column) %]
219        <th>[% column_headers.$column %]</th>
220      [% END %]
221    </tr>
222[% END %]
223
224[% BLOCK display_type %]
225  [% request.type FILTER html %]
226[% END %]
227
228[% BLOCK display_status %]
229  [% request.status %]
230[% END %]
231
232[% BLOCK display_bug %]
233  <a href="show_bug.cgi?id=[% request.bug_id %]"
234     [%- ' class="bz_secure"' IF request.restricted %]>
235    [% request.bug_id %]: [%+ request.bug_summary FILTER html %]</a>
236[% END %]
237
238[% BLOCK display_attachment %]
239  [% IF request.attach_id %]
240    <a href="attachment.cgi?id=[% request.attach_id %]&amp;action=edit">
241      [% request.attach_id %]: [%+ request.attach_summary FILTER html %]</a>
242  [% ELSE %]
243    N/A
244  [% END %]
245[% END %]
246
247[% BLOCK display_requestee %]
248  [% request.requestee FILTER email FILTER html %]
249[% END %]
250
251[% BLOCK display_requester %]
252  [% request.requester FILTER email FILTER html %]
253[% END %]
254
255[% BLOCK display_created %]
256  [% request.created FILTER time('%d.%m.%Y, %H:%M %Z') %]
257[% END %]
258
259[% BLOCK display_buglist %]
260  </table>
261  [% NEXT UNLESS buglist.keys.size %]
262  <a href="buglist.cgi?bug_id=
263           [%- buglist.keys.nsort.join(",") FILTER html %]">(als
264  [%+ terms.bug %]liste anzeigen)</a>
265[% END %]
266