From 6e29c7cd06afac55962dac20421bddbf17954906 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 8 Jul 2005 04:03:03 +0000 Subject: Bug 289580: Templatize the 'confirm delete' bit of editproducts.cgi - Patch by Tiago R. Mello r=LpSolit a=justdave --- .../admin/products/confirm-delete.html.tmpl | 282 +++++++++++++++++++++ .../en/default/admin/products/deleted.html.tmpl | 41 +++ template/en/default/filterexceptions.pl | 5 + template/en/default/global/user-error.html.tmpl | 5 + 4 files changed, 333 insertions(+) create mode 100644 template/en/default/admin/products/confirm-delete.html.tmpl create mode 100644 template/en/default/admin/products/deleted.html.tmpl (limited to 'template') diff --git a/template/en/default/admin/products/confirm-delete.html.tmpl b/template/en/default/admin/products/confirm-delete.html.tmpl new file mode 100644 index 000000000..672f345e9 --- /dev/null +++ b/template/en/default/admin/products/confirm-delete.html.tmpl @@ -0,0 +1,282 @@ +[%# 1.0@bugzilla.org %] +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # Contributor(s): Gavin Shelley + #%] + +[%# INTERFACE: + # product_name: string; The name of the product + # + # prod_description: string; Product description, may be empty + # + # (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. + # + #%] + +[% title = BLOCK %]Delete Product '[% product_name FILTER html %]' +[% END %] + +[% PROCESS global/header.html.tmpl + title = title + style_urls = ['skins/standard/admin.css'] +%] + +[% IF classification %] + [% classification_url_part = BLOCK %]&classification= + [%- classification 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 %] + + + + + + + + [% 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') %] + + + + + [% END %] + + + + + + + + + + + + + + + + + + + + + + + + +
FieldValue
Classification:[% classification FILTER html %]
Classification Description:[% class_description FILTER none %]
Product: + + [% product_name FILTER html %] + +
Description:[% prod_description FILTER none %]
Milestone URL: + [% IF milestoneurl %] + + [%- milestoneurl FILTER html %] + + [% ELSE %] + none + [% END %] +
Closed for [% terms.bugs %]:[% disallownew FILTER html %]
+ [% IF components.size > 0 %] + + Components: + + [% ELSE %] + Components: + [% END %] + + [% IF components.size > 0 %] + + [% FOREACH c = components %] + + + [%# descriptions are intentionally not filtered to allow html content %] + + + [% END %] +
[% c.name FILTER html %]: + [% IF c.description %] + [% c.description FILTER none %] + [% ELSE %] + missing + [% END %] +
+ [% ELSE %] + none + [% END %] +
+ [% IF versions.size > 0 %] + + Versions: + + [% ELSE %] + Versions: + [% END %] + + [% IF versions.size > 0 %] + [% FOREACH v = versions %] + [% v FILTER html %]
+ [% END %] + [% ELSE %] + none + [% END %] +
+ [% IF milestones.size > 0 %] + + Milestones: + + [% ELSE %] + Milestones: + [% END %] + + [% IF milestones.size > 0 %] + [% FOREACH m = milestones %] + [% m FILTER html %]
+ [% END %] + [% ELSE %] + none + [% END %] +
[% terms.Bugs %]: + [% IF bug_count %] + + [% bug_count %] + + [% ELSE %] + none + [% END %] +
+ +

Confirmation

+ +[% IF bug_count %] + + [% IF !Param("allowbugdeletion") %] + + Sorry, there + + [% IF bug_count > 1 %] + are [% bug_count %] [%+ terms.bugs %] + [% ELSE %] + is 1 [% terms.bug %] + [% END %] + + outstanding for this product. You must reassign + + [% IF bug_count > 1 %] + those [% terms.bugs %] + [% ELSE %] + that [% terms.bug %] + [% END %] + + to another product before you can delete this one. + + [% ELSE %] + + + + + +
+ There + [% IF bug_count > 1 %] + are [% bug_count %] [%+ terms.bugs %] + [% ELSE %] + is 1 [% terms.bug %] + [% END %] + entered for this product! When you delete this + product, ALL stored [% terms.bugs %] and + their history will be deleted, too. +
+ + [% END %] + +[% END %] + +[% IF bug_count == 0 || Param('allowbugdeletion') %] + +

Do you really want to delete this product?

+ +

+ + + + +
+ +[% END %] + +[% PROCESS admin/products/footer.html.tmpl %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/products/deleted.html.tmpl b/template/en/default/admin/products/deleted.html.tmpl new file mode 100644 index 000000000..6b31dbb09 --- /dev/null +++ b/template/en/default/admin/products/deleted.html.tmpl @@ -0,0 +1,41 @@ +[%# 1.0@bugzilla.org %] +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # Contributor(s): Tiago R. Mello + # + #%] + +[% PROCESS global/header.html.tmpl + title = 'Deleting product' +%] + +[% IF nb_bugs %] + All references to deleted [% terms.bugs %] removed. +[% END %] + +

+ Components deleted.
+ Versions deleted.
+ Milestones deleted. +

+ +

+ Group controls deleted.
+ Flag inclusions and exclusions deleted. +

+ +

+ Product [% product FILTER html %] deleted. +

+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 39de4fcac..bfa469481 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -535,6 +535,11 @@ 'classification_url_part', ], +'admin/products/confirm-delete.html.tmpl' => [ + 'classification_url_part', + 'bug_count', +], + 'admin/products/footer.html.tmpl' => [ 'classification_url_part', 'classification_text', diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 20d8371f4..800257ad9 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -234,6 +234,11 @@ [% title = "Classification Does Not Exist" %] The classification '[% name FILTER html %]' does not exist. + [% ELSIF error == "classification_doesnt_exist_for_product" %] + [% title = "Classification Does Not Exist For Product" %] + The classification '[% classification FILTER html %]' does not exist + for product '[% product FILTER html %]'. + [% ELSIF error == "classification_not_deletable" %] [% title = "Default Classification Can Not Be Deleted" %] You can not delete the default classification -- cgit v1.2.3-24-g4f1b