choose-product.html.tmpl 1.9 KB
Newer Older
1 2 3
[%# 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/.
4
  #
5 6
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
7 8
  #%]

9
[%# INTERFACE:
10 11 12
  # classifications: array of hashes, with an 'object' key representing a
  #                  classification object and 'products' the list of
  #                  product objects the user can enter bugs into.
13 14 15
  # target:   the script that displays this template.
  # cloned_bug_id: ID of the bug being cloned.
  # format:   the desired format to display the target.
16 17
  #%]

18
[% IF target == "enter_bug.cgi" %]
19
  [% title = "Enter $terms.Bug" %]
20
  [% h2 = BLOCK %]First, you must pick a product on which to enter [% terms.abug %]: [% END %]
21
[% ELSIF target == "describecomponents.cgi" %]
22
  [% title = "Browse" %]
23
  [% h2 = "Select a product category to browse:" %]
24 25
[% END %]

26
[% DEFAULT title = "Choose a Product" %]
27
[% PROCESS global/header.html.tmpl %]
28

29 30
<h2>[% h2 FILTER html %]</h2>

31 32
<table>

33 34 35 36 37 38 39 40 41 42 43
[% FOREACH c = classifications %]
  [% IF c.object %]
    <tr>
      <th colspan="2" align="left">[% c.object.name FILTER html %]:
      [%+ c.object.description FILTER html_light %]</th>
    </tr>
  [% END %]

  [% FOREACH p = c.products %]
    <tr>
      <th align="right" valign="top">
44 45 46
        <a href="[% target %]?product=[% p.name FILTER uri -%]
              [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%] 
              [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
47 48 49 50 51 52 53
        [% p.name FILTER html FILTER no_break %]</a>:&nbsp;
      </th>

      <td valign="top">[% p.description FILTER html_light %]</td>
    </tr>
  [% END %]

54
  <tr>
55
    <th colspan="2">&nbsp;</th>
56 57
  </tr>
[% END %]
58

59 60
</table>

61
[% PROCESS global/footer.html.tmpl %]