aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/search/search-report-select.html.tmpl
blob: 40eeda1c13961db7f19d8659cb0e6453372e8e7c (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
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[%# INTERFACE:
  # name: string. The name of the select block to output.
  # default.$name.0: string. The default value for the block, if any.
  #%]

[% BLOCK select %]
  [% Hook.process('rep_fields', 'search/search-report-select.html.tmpl') %]

  <select name="[% name FILTER html %]">
    <option value="">&lt;none&gt;</option>
    
    [% FOREACH field = report_columns.keys.sort_by_field_name(field_descs) %]
      [% NEXT IF field == "classification" AND !Param('useclassification') %]
      [% NEXT IF field == "target_milestone" AND !Param('usetargetmilestone') %]
      [% NEXT IF field == "qa_contact" AND !Param('useqacontact') %]
      <option value="[% field FILTER html %]" 
        [% " selected" IF default.$name.0 == field %]>
        [% field_descs.$field || field FILTER html %]</option>
    [% END %]
  </select>
[% END %]