From b3e936bf2bbc1fb1ec55732703650d9f78dfd5f0 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 14 Aug 2008 21:36:07 +0000 Subject: Bug 448593: Move code to edit product group settings from editproducts.cgi to Bugzilla/Product.pm - Patch by Frédéric Buclin r=mkanat a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/admin/products/edit.html.tmpl | 2 +- .../admin/products/groupcontrol/edit.html.tmpl | 48 +++++++++++----------- .../admin/products/groupcontrol/updated.html.tmpl | 14 +++---- 3 files changed, 30 insertions(+), 34 deletions(-) (limited to 'template/en/default/admin') 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: [% IF product.group_controls.size %] - [% FOREACH g = product.group_controls.values %] + [% FOREACH g = product.group_controls.values.sort("name") %] [% g.group.name FILTER html %]:  [% 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 @@ - @@ -46,23 +44,23 @@ - [% 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 %] - [% ELSIF group.isactive != 0 %] + [% ELSIF group.group.is_active %] [% 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 %]

-[% 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

[% g.bug_count FILTER html %] [%+ terms.bugs %] removed

[% 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

[% g.bug_count FILTER html %] [%+ terms.bugs %] added

-- cgit v1.2.3-24-g4f1b

editbugs [% terms.Bugs %]
- [% group.name FILTER html %] + [% group.group.name FILTER html %] Disabled - [% group.bugcount %] + [% group.bug_count FILTER html %]
- [% group.name FILTER html %] + [% group.group.name FILTER html %] @@ -133,7 +131,7 @@ [% " checked=\"checked\"" IF group.editbugs %]> - [% group.bugcount %] + [% group.bug_count || 0 FILTER html %]