diff options
author | lpsolit%gmail.com <> | 2008-08-14 23:36:07 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-08-14 23:36:07 +0200 |
commit | b3e936bf2bbc1fb1ec55732703650d9f78dfd5f0 (patch) | |
tree | 1f0255c87dd566dc033fdd2bd1e931cf33b6479b /template/en | |
parent | ce2c60359dfee59049d578501d6ce9e0c8b61dd1 (diff) | |
download | bugzilla-b3e936bf2bbc1fb1ec55732703650d9f78dfd5f0.tar.gz bugzilla-b3e936bf2bbc1fb1ec55732703650d9f78dfd5f0.tar.xz |
Bug 448593: Move code to edit product group settings from editproducts.cgi to Bugzilla/Product.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
Diffstat (limited to 'template/en')
6 files changed, 50 insertions, 40 deletions
diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl index a3d5089c3..e6480c453 100644 --- a/template/en/default/admin/products/edit.html.tmpl +++ b/template/en/default/admin/products/edit.html.tmpl @@ -107,7 +107,7 @@ versions:</a> </th> <td> [% IF product.group_controls.size %] - [% FOREACH g = product.group_controls.values %] + [% FOREACH g = product.group_controls.values.sort("name") %] <b>[% g.group.name FILTER html %]:</b> [% IF g.group.isactive %] [% group_control.${g.membercontrol} FILTER html %]/ diff --git a/template/en/default/admin/products/groupcontrol/edit.html.tmpl b/template/en/default/admin/products/groupcontrol/edit.html.tmpl index c793ff683..8c634ebfe 100644 --- a/template/en/default/admin/products/groupcontrol/edit.html.tmpl +++ b/template/en/default/admin/products/groupcontrol/edit.html.tmpl @@ -31,8 +31,6 @@ <input type="hidden" name="action" value="updategroupcontrols"> <input type="hidden" name="product" value="[% product.name FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> - <input type="hidden" name="classification" - value="[% classification.name FILTER html %]"> <table id="form" cellspacing="0" cellpadding="4" border="1"> <tr bgcolor="#6666ff"> @@ -46,23 +44,23 @@ <th>editbugs</th> <th>[% terms.Bugs %]</th> </tr> - [% FOREACH group = groups %] - [% IF group.isactive == 0 AND group.bugcount > 0 %] + [% FOREACH group = product.group_controls(1).values.sort("name") %] + [% IF !group.group.isactive AND group.bug_count %] <tr bgcolor="#bbbbbb"> <td> - [% group.name FILTER html %] + [% group.group.name FILTER html %] </td> <td align="center" colspan=7> Disabled </td> <td> - [% group.bugcount %] + [% group.bug_count FILTER html %] </td> <tr> - [% ELSIF group.isactive != 0 %] + [% ELSIF group.group.is_active %] <tr> <td> - [% group.name FILTER html %] + [% group.group.name FILTER html %] </td> <td> <input type=checkbox value=1 name=entry_[% group.id %] @@ -70,48 +68,48 @@ </td> <td> <select name="membercontrol_[% group.id %]"> - <option value=[% const.CONTROLMAPNA %] + <option value=[% constants.CONTROLMAPNA %] [% " selected=\"selected\"" - IF group.membercontrol == const.CONTROLMAPNA %] + IF group.membercontrol == constants.CONTROLMAPNA %] >NA </option> - <option value=[% const.CONTROLMAPSHOWN %] + <option value=[% constants.CONTROLMAPSHOWN %] [% " selected=\"selected\"" - IF group.membercontrol == const.CONTROLMAPSHOWN %] + IF group.membercontrol == constants.CONTROLMAPSHOWN %] >Shown </option> - <option value=[% const.CONTROLMAPDEFAULT %] + <option value=[% constants.CONTROLMAPDEFAULT %] [% " selected=\"selected\"" - IF group.membercontrol == const.CONTROLMAPDEFAULT %] + IF group.membercontrol == constants.CONTROLMAPDEFAULT %] >Default </option> - <option value=[% const.CONTROLMAPMANDATORY %] + <option value=[% constants.CONTROLMAPMANDATORY %] [% " selected=\"selected\"" - IF group.membercontrol == const.CONTROLMAPMANDATORY %] + IF group.membercontrol == constants.CONTROLMAPMANDATORY %] >Mandatory </option> </select> </td> <td> <select name="othercontrol_[% group.id %]"> - <option value=[% const.CONTROLMAPNA %] + <option value=[% constants.CONTROLMAPNA %] [% " selected=\"selected\"" - IF group.othercontrol == const.CONTROLMAPNA %] + IF group.othercontrol == constants.CONTROLMAPNA %] >NA </option> - <option value=[% const.CONTROLMAPSHOWN %] + <option value=[% constants.CONTROLMAPSHOWN %] [% " selected=\"selected\"" - IF group.othercontrol == const.CONTROLMAPSHOWN %] + IF group.othercontrol == constants.CONTROLMAPSHOWN %] >Shown </option> - <option value=[% const.CONTROLMAPDEFAULT %] + <option value=[% constants.CONTROLMAPDEFAULT %] [% " selected=\"selected\"" - IF group.othercontrol == const.CONTROLMAPDEFAULT %] + IF group.othercontrol == constants.CONTROLMAPDEFAULT %] >Default </option> - <option value=[% const.CONTROLMAPMANDATORY %] + <option value=[% constants.CONTROLMAPMANDATORY %] [% " selected=\"selected\"" - IF group.othercontrol == const.CONTROLMAPMANDATORY %] + IF group.othercontrol == constants.CONTROLMAPMANDATORY %] >Mandatory </option> </select> @@ -133,7 +131,7 @@ [% " checked=\"checked\"" IF group.editbugs %]> </td> <td> - [% group.bugcount %] + [% group.bug_count || 0 FILTER html %] </td> </tr> [% END %] diff --git a/template/en/default/admin/products/groupcontrol/updated.html.tmpl b/template/en/default/admin/products/groupcontrol/updated.html.tmpl index 52456a473..2f59cae68 100644 --- a/template/en/default/admin/products/groupcontrol/updated.html.tmpl +++ b/template/en/default/admin/products/groupcontrol/updated.html.tmpl @@ -15,10 +15,8 @@ #%] [%# INTERFACE: - # removed_na: array of hashes; groups not applicable for the product. - # added_mandatory: array of hashes; groups mandatory for the product. - # classification: Bugzilla::Classification object; product classification. - # product: Bugzilla::Product object; the product. + # product: Bugzilla::Product object; the product. + # changes: Hashref with changes made to the product group controls. #%] [% title = BLOCK %] @@ -29,16 +27,16 @@ title = title %] <p> -[% IF removed_na.size > 0 %] - [% FOREACH g = removed_na %] +[% IF changes.group_controls.now_na.size %] + [% FOREACH g = changes.group_controls.now_na %] Removing [% terms.bugs %] from group '[% g.name FILTER html %]' which no longer applies to this product<p> [% g.bug_count FILTER html %] [%+ terms.bugs %] removed<p> [% END %] [% END %] -[% IF added_mandatory.size > 0 %] - [% FOREACH g = added_mandatory %] +[% IF changes.group_controls.now_mandatory.size %] + [% FOREACH g = changes.group_controls.now_mandatory %] Adding [% terms.bugs %] to group '[% g.name FILTER html %]' which is mandatory for this product<p> [% g.bug_count FILTER html %] [%+ terms.bugs %] added<p> diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 056341b53..361a1f469 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -462,12 +462,11 @@ ], 'admin/products/groupcontrol/edit.html.tmpl' => [ - 'group.bugcount', - 'group.id', - 'const.CONTROLMAPNA', - 'const.CONTROLMAPSHOWN', - 'const.CONTROLMAPDEFAULT', - 'const.CONTROLMAPMANDATORY', + 'group.id', + 'constants.CONTROLMAPNA', + 'constants.CONTROLMAPSHOWN', + 'constants.CONTROLMAPDEFAULT', + 'constants.CONTROLMAPMANDATORY', ], 'admin/products/list.html.tmpl' => [ diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 80645a851..b93b92efd 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -324,6 +324,16 @@ a <code>[% param FILTER html %]</code> argument, and that argument was not set. + [% ELSIF error == "product_empty_group_controls" %] + [% title = "Missing Group Controls" %] + New settings must be defined to edit group controls for + the [% group.name FILTER html %] group. + + [% ELSIF error == "product_illegal_group_control" %] + [% title = "Illegal Group Control" %] + '[% value FILTER html %]' is not a legal value for + the '[% field FILTER html %]' field. + [% ELSIF error == "protection_violation" %] The function <code>[% function FILTER html %]</code> was called diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index b04c9e7dc..c8df08e5e 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -1236,6 +1236,11 @@ [% title = "Specified Product Does Not Exist" %] The product '[% product FILTER html %]' does not exist. + [% ELSIF error == "product_illegal_group" %] + [% title = "Illegal Group" %] + [% group.name FILTER html %] is not an active [% terms.bug %] group + and so you cannot edit group controls for it. + [% ELSIF error == "product_illegal_votes" %] [% title = "Votes Must Be Non-negative" %] [% admindocslinks = {'voting.html' => 'Setting up the voting feature'} %] |