From e66bfda7983913ac93247d3e6f993c0ce1bbe7c7 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 18 Oct 2005 04:43:40 +0000 Subject: Bug 299753: Replace old code in editproducts.cgi by routines from Product.pm - Patch by André Batosti r=LpSolit a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/products/confirm-delete.html.tmpl | 131 ++++++++++----------- 1 file changed, 60 insertions(+), 71 deletions(-) (limited to 'template/en/default/admin/products/confirm-delete.html.tmpl') diff --git a/template/en/default/admin/products/confirm-delete.html.tmpl b/template/en/default/admin/products/confirm-delete.html.tmpl index 672f345e9..9358974de 100644 --- a/template/en/default/admin/products/confirm-delete.html.tmpl +++ b/template/en/default/admin/products/confirm-delete.html.tmpl @@ -15,32 +15,16 @@ #%] [%# INTERFACE: - # product_name: string; The name of the product - # - # prod_description: string; Product description, may be empty + # product: Bugzilla::Product object; The product # # (classification fields available if Param('useclassification') is enabled:) # - # classification: string; The name of the classification the product is in - # - # class_description: string; Classification description, may be empty - # - # bug_count: number; The number of bugs belonging to the product - # - # milestoneurl: string; milestone url, if milestones are in use, - # may be empty - # - # disallownew: boolean; Are new bugs allowed for the product flag - # - # components: list of hashes, members are: name, description - # - # versions: list of version values. - # - # milestones: list of milestone values. + # classification: Bugzilla::Classification object; The classification + # the product is in # #%] -[% title = BLOCK %]Delete Product '[% product_name FILTER html %]' +[% title = BLOCK %]Delete Product '[% product.name FILTER html %]' [% END %] [% PROCESS global/header.html.tmpl @@ -50,25 +34,12 @@ [% IF classification %] [% classification_url_part = BLOCK %]&classification= - [%- classification FILTER url_quote %] + [%- classification.name FILTER url_quote %] [%- END %] [% ELSE %] [% classification_url_part = "" %] [% END %] -[% UNLESS class_description %] - [% class_description = 'missing' %] -[% END %] -[% UNLESS prod_description %] - [% prod_description = 'missing' %] -[% END %] - -[% IF disallownew %] - [% disallownew = "closed" %] -[% ELSE %] - [% disallownew = "open" %] -[% END %] - @@ -78,37 +49,49 @@ [% IF Param('useclassification') %] - + [%# descriptions are intentionally not filtered to allow html content %] - + [% END %] [%# descriptions are intentionally not filtered to allow html content %] - + [% IF Param('usetargetmilestone') %] - +
Field
Classification:[% classification FILTER html %][% classification.name FILTER html %]
Classification Description:[% class_description FILTER none %] + [% IF classification.description %] + [% classification.description FILTER none %] + [% ELSE %] + missing + [% END %] +
Product: - - [% product_name FILTER html %] + [% product.name FILTER html %]
Description:[% prod_description FILTER none %] + [% IF product.description %] + [% product.description FILTER none %] + [% ELSE %] + missing + [% END %] +
Milestone URL: - [% IF milestoneurl %] - - [%- milestoneurl FILTER html %] + [% IF product.milestone_url %] + + [%- product.milestone_url FILTER html %] [% ELSE %] none @@ -119,15 +102,21 @@
Closed for [% terms.bugs %]:[% disallownew FILTER html %] + [% IF product.disallownew %] + closed + [% ELSE %] + open + [% END %] +
- [% IF components.size > 0 %] - + title="Edit components for product '[% product.name FILTER html %]'"> Components: [% ELSE %] @@ -135,9 +124,9 @@ [% END %] - [% IF components.size > 0 %] + [% IF product.components.size > 0 %] - [% FOREACH c = components %] + [% FOREACH c = product.components %] [%# descriptions are intentionally not filtered to allow html content %] @@ -159,8 +148,8 @@
[% c.name FILTER html %]:
- [% IF versions.size > 0 %] - Versions: @@ -168,9 +157,9 @@ Versions: [% END %] - [% IF versions.size > 0 %] - [% FOREACH v = versions %] - [% v FILTER html %]
+ [% IF product.versions.size > 0 %] + [% FOREACH v = product.versions %] + [% v.name FILTER html %]
[% END %] [% ELSE %] none @@ -180,8 +169,8 @@
- [% IF milestones.size > 0 %] - Milestones: @@ -190,9 +179,9 @@ [% END %] - [% IF milestones.size > 0 %] - [% FOREACH m = milestones %] - [% m FILTER html %]
+ [% IF product.milestones.size > 0 %] + [% FOREACH m = product.milestones %] + [% m.name FILTER html %]
[% END %] [% ELSE %] none @@ -203,12 +192,12 @@
[% terms.Bugs %]: - [% IF bug_count %] - - [% bug_count %] + [%- product.name FILTER html %]'"> + [% product.bug_count FILTER html %] [% ELSE %] none @@ -219,21 +208,21 @@

Confirmation

-[% IF bug_count %] +[% IF product.bug_count %] [% IF !Param("allowbugdeletion") %] Sorry, there - [% IF bug_count > 1 %] - are [% bug_count %] [%+ terms.bugs %] + [% IF product.bug_count > 1 %] + are [% product.bug_count FILTER html %] [%+ terms.bugs %] [% ELSE %] is 1 [% terms.bug %] [% END %] outstanding for this product. You must reassign - [% IF bug_count > 1 %] + [% IF product.bug_count > 1 %] those [% terms.bugs %] [% ELSE %] that [% terms.bug %] @@ -247,8 +236,8 @@
There - [% IF bug_count > 1 %] - are [% bug_count %] [%+ terms.bugs %] + [% IF product.bug_count > 1 %] + are [% product.bug_count FILTER html %] [%+ terms.bugs %] [% ELSE %] is 1 [% terms.bug %] [% END %] @@ -263,16 +252,16 @@ [% END %] -[% IF bug_count == 0 || Param('allowbugdeletion') %] +[% IF product.bug_count == 0 || Param('allowbugdeletion') %]

Do you really want to delete this product?

- + + value="[% classification.name FILTER html %]">
[% END %] -- cgit v1.2.3-24-g4f1b