footer.html.tmpl 2.64 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
  # product: Bugzilla::Product Object; the product
11
  #
12 13 14
  # classification: Bugzilla::Classification object ; If classifications
  #                         are enabled, then this is the currently 
  #                         selected classification
15 16 17 18 19 20 21 22 23
  #
  # no_XXX_link: boolean; if defined, then don't show the corresponding
  #                       link. Supported parameters are:
  #
  # no_edit_product_link
  # no_edit_other_products_link
  # no_add_product_link
  #%]

24
[% IF Param('useclassification') && classification %]
25
  [% classification_url_part = BLOCK %]&classification=
26
     [%- classification.name FILTER uri %]
27
  [% END %]
28
  [% classification_url_part_start = BLOCK %]classification=
29
     [%- classification.name FILTER uri %]
30
  [% END %]
31
  [% classification_text = BLOCK %] 
32
    of classification '[% classification.name FILTER html %]'
33 34 35 36 37
  [% END %]
[% END %]

<hr>

38
<p>
39
[% UNLESS no_add_product_link || !user.in_group("editcomponents") %]
40
  <a title="Add a product"
41 42 43
     href="editproducts.cgi?action=add">Add</a> a product[% -%]
[%# Strictly speaking, we should not have to check for a
    classification if they are enabled, but I'm just being paranoid %]
44 45
  [% IF Param('useclassification') && classification %]
    (<a title="Add a product to classification '
46
               [%- classification.name FILTER html %]'"
47 48
         href="editproducts.cgi?action=add
               [%- classification_url_part %]">to
49
     classification '[% classification.name FILTER html %]'</a>)
50 51 52
  [% END %].
[% END %]

53
[% IF product && !no_edit_product_link %]
54
  Edit product <a 
55 56
  title="Edit Product '[% product.name FILTER html %]' 
         [%- classification_text %]"
57
  href="editproducts.cgi?action=edit&amp;product=[% product.name FILTER uri %]">
58
        '[% product.name FILTER html %]'</a>.
59 60 61
[% END %]


62
[%# Edit other products (in a classification if specified): %]
63
[% UNLESS no_edit_other_products_link %]
64 65 66 67
  Edit <a 
  href="editproducts.cgi?
        [%- classification_url_part_start FILTER none %]">other products
          [% classification_text %]</a>.
68

69 70
[% END %]

71 72
[% IF Param('useclassification') && classification
      && user.in_group('editclassifications') %]
73 74
  Edit classification <a href="editclassifications.cgi?action=edit
    [%- classification_url_part %]">'
75
    [%- classification.name FILTER html %]'</a>.
76 77 78 79

[% END %]

</p>