summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/products/edit.html.tmpl
blob: fdbbe42c2146e826d02a3f17418424647ad5c7f3 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[%# 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:
  # product: Bugzilla::Product object; The product
  #
  # (classification fields available if Param('useclassification') is enabled:)
  #
  # classification: Bugzilla::Classification object; The classification 
  #                                                  the product is in
  #%]

[% title = BLOCK %]Edit Product '[% product.name FILTER html %]'[% END %]

[% PROCESS global/header.html.tmpl
  title = title
  style_urls = ['skins/standard/admin.css']
  javascript_urls = ['js/util.js']
%]

[% group_control = {${constants.CONTROLMAPNA}        => 'NA',
                    ${constants.CONTROLMAPSHOWN}     => 'Shown',
                    ${constants.CONTROLMAPDEFAULT}   => 'Default',
                    ${constants.CONTROLMAPMANDATORY} => 'Mandatory'}
 %]

<form method="post" action="editproducts.cgi">
  <table border="0" cellpadding="4" cellspacing="0">

    [% PROCESS "admin/products/edit-common.html.tmpl" %]

    <tr>
      <th valign="top">
        <a href="editcomponents.cgi?product=[% product.name FILTER uri %]">
        Edit components:
        </a>
      </th>
      <td>
        [% IF product.components.size -%]
          [% FOREACH component = product.components %]
            <a href="editcomponents.cgi?action=edit&product=
            [%- product.name FILTER uri %]&component=
            [%- component.name FILTER uri %]">[% component.name FILTER html %]</a>:
            [% component.description FILTER html_light %]
            <br>
          [% END %]
        [% ELSE %]
          <span class="warning">missing</span>
        [% END %]
      </td>
    </tr>
    <tr>
      <th valign="top">
        <a href="editversions.cgi?product=[% product.name FILTER uri %]">Edit
versions:</a>
      </th>
      <td>
        [%- IF product.versions.size -%]
          [% FOREACH v = product.versions %]
            [% v.name FILTER html %]
            <br>
          [% END %]
        [% ELSE %]
          <span class="warning">missing</span>
        [% END %]
      </td>
    </tr>
    [% IF Param('usetargetmilestone') %]
      <tr>
        <th valign="top">
          <a href="editmilestones.cgi?product=[% product.name FILTER uri %]">
          Edit milestones:</a>
        </th>
        <td>
          [%- IF product.milestones.size -%]
            [%- FOREACH m = product.milestones -%]
              [% m.name FILTER html %]
            <br>
            [% END %]
          [% ELSE %]
            <span class="warning">missing</span>
          [% END %]
        </td>
      </tr>
    [% END %]
    <tr>
      <th valign="top">
        <a href="editproducts.cgi?action=editgroupcontrols&product=
          [%- product.name FILTER uri %]">
          Edit Group Access Controls:
        </a>
      </th>
      <td>
        [% IF product.group_controls.size %]
          [% FOREACH g = product.group_controls.values.sort("name") %]
            <b>[% g.group.name FILTER html %]:</b>&nbsp;
            [% IF g.group.isactive %]
              [% group_control.${g.membercontrol} FILTER html %]/
              [% group_control.${g.othercontrol} FILTER html %]
              [% IF g.entry %], ENTRY[% END %]
              [% IF g.canedit %], CANEDIT[% END %]
              [% IF g.editcomponents %], editcomponents[% END %]
              [% IF g.canconfirm %], canconfirm[% END %]
              [% IF g.editbugs %], editbugs[% END %]
            [% ELSE %]
              DISABLED
            [% END %]
            <br>
          [% END %]
        [% ELSE %]
          no groups
        [% END %]
      </td>
    </tr>
    <tr>
      <th>[% terms.Bugs %]:</th>
      <td><a href="buglist.cgi?product=[% product.name FILTER uri %]">
            [% product.bug_count FILTER html %]</a></td>
    </tr>
  </table>
  
  <input type="hidden" name="product_old_name" 
        value="[% product.name FILTER html %]">
  <input type="hidden" name="action" value="update">
  <input type="hidden" name="token" value="[% token FILTER html %]">
  <input type="submit" id="update-product" value="Save Changes">
</form>
  
[% PROCESS "admin/products/footer.html.tmpl"
   no_add_product_link = 1 
   no_edit_product_link = 1 %]

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