From 88d26275229b5f52f435130496169766313c87b7 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Sat, 21 Aug 2004 04:49:17 +0000 Subject: Bug 224208 Add a higher level of categorization (.ie departments, locations, etc.) patch by Albert Ting r=joel, glob a=myk --- .../en/default/admin/classifications/add.html.tmpl | 45 +++++++++ .../en/default/admin/classifications/del.html.tmpl | 60 ++++++++++++ .../default/admin/classifications/delete.html.tmpl | 31 ++++++ .../default/admin/classifications/edit.html.tmpl | 70 ++++++++++++++ .../en/default/admin/classifications/new.html.tmpl | 32 +++++++ .../admin/classifications/reclassify.html.tmpl | 84 ++++++++++++++++ .../default/admin/classifications/select.html.tmpl | 70 ++++++++++++++ .../default/admin/classifications/update.html.tmpl | 37 +++++++ .../admin/products/groupcontrol/edit.html.tmpl | 2 + template/en/default/bug/edit.html.tmpl | 5 + template/en/default/bug/show-multiple.html.tmpl | 10 +- template/en/default/filterexceptions.pl | 1 + .../default/global/choose-classification.html.tmpl | 65 +++++++++++++ template/en/default/global/field-descs.none.tmpl | 1 + template/en/default/global/useful-links.html.tmpl | 11 ++- template/en/default/global/user-error.html.tmpl | 38 ++++++++ template/en/default/search/form.html.tmpl | 106 ++++++++++++++++++++- .../en/default/search/search-advanced.html.tmpl | 35 +------ template/en/default/search/search-help.html.tmpl | 7 +- .../default/search/search-report-graph.html.tmpl | 8 +- .../default/search/search-report-select.html.tmpl | 2 +- .../default/search/search-report-table.html.tmpl | 8 +- .../en/default/search/search-specific.html.tmpl | 22 ++++- 23 files changed, 702 insertions(+), 48 deletions(-) create mode 100644 template/en/default/admin/classifications/add.html.tmpl create mode 100644 template/en/default/admin/classifications/del.html.tmpl create mode 100644 template/en/default/admin/classifications/delete.html.tmpl create mode 100644 template/en/default/admin/classifications/edit.html.tmpl create mode 100644 template/en/default/admin/classifications/new.html.tmpl create mode 100644 template/en/default/admin/classifications/reclassify.html.tmpl create mode 100644 template/en/default/admin/classifications/select.html.tmpl create mode 100644 template/en/default/admin/classifications/update.html.tmpl create mode 100644 template/en/default/global/choose-classification.html.tmpl (limited to 'template/en') diff --git a/template/en/default/admin/classifications/add.html.tmpl b/template/en/default/admin/classifications/add.html.tmpl new file mode 100644 index 000000000..d6a7c3880 --- /dev/null +++ b/template/en/default/admin/classifications/add.html.tmpl @@ -0,0 +1,45 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Add new classification" +%] + +
+ + + + + + + + + +
Classification:
Description:
+
+ + +
+ +

Back to the main [% terms.bugs %] page +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/del.html.tmpl b/template/en/default/admin/classifications/del.html.tmpl new file mode 100644 index 000000000..008971562 --- /dev/null +++ b/template/en/default/admin/classifications/del.html.tmpl @@ -0,0 +1,60 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Delete classification" +%] + + + + + + + + + + + + + + + +
PartValue
Classification:[% classification FILTER html %]
Description: + [% IF description %] + [% description FILTER html %] + [% ELSE %] + description missing + [% END %] +
+ +

Confirmation

+ +

Do you really want to delete this classification?

+

+ + + +
+ +

Back to the main [% terms.bugs %] page +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/delete.html.tmpl b/template/en/default/admin/classifications/delete.html.tmpl new file mode 100644 index 000000000..b2ec26cbb --- /dev/null +++ b/template/en/default/admin/classifications/delete.html.tmpl @@ -0,0 +1,31 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Classification deleted" +%] + +Classification [% classification FILTER html %] deleted.
+ +

Back to the main [% terms.bugs %] page +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/edit.html.tmpl b/template/en/default/admin/classifications/edit.html.tmpl new file mode 100644 index 000000000..ebc16e82e --- /dev/null +++ b/template/en/default/admin/classifications/edit.html.tmpl @@ -0,0 +1,70 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Edit classification" +%] + +

+ + + + + + + + + + + + + +
Classification:
Description:
Edit products + [% IF products AND products.size > 0 %] + + [% FOREACH product = products %] + + + + + [% END %] +
[% product.name FILTER html %] + [% IF product.description %] + [% product.description FILTER html %] + [% ELSE %] + description missing + [% END %] +
+ [% ELSE %] + none + [% END %] +
+ + + + + +
+ +

Back to the main [% terms.bugs %] page +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/new.html.tmpl b/template/en/default/admin/classifications/new.html.tmpl new file mode 100644 index 000000000..c8046b898 --- /dev/null +++ b/template/en/default/admin/classifications/new.html.tmpl @@ -0,0 +1,32 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Adding new classification" +%] + +OK, done. + +

Back to the main [% terms.bugs %] page, +add products to this new classification, +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/reclassify.html.tmpl b/template/en/default/admin/classifications/reclassify.html.tmpl new file mode 100644 index 000000000..d860f67cf --- /dev/null +++ b/template/en/default/admin/classifications/reclassify.html.tmpl @@ -0,0 +1,84 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Reclassify products" +%] + +[% main_classification = classification %] + +

+ + + + + + + + + + + + + + + + + + + + + + + +
Classification:[% main_classification FILTER html %]
Description: + [% IF description %] + [% description FILTER html %] + [% ELSE %] + description missing + [% END %] +
Products:Products[% main_classification FILTER html %] Products
+ +

+ +
+
+ + + +
+ +

Back to the main [% terms.bugs %] page, +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/select.html.tmpl b/template/en/default/admin/classifications/select.html.tmpl new file mode 100644 index 000000000..5908375d2 --- /dev/null +++ b/template/en/default/admin/classifications/select.html.tmpl @@ -0,0 +1,70 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Select classification" +%] + +[% filt_classification = classification FILTER html %] + + + + + + + + + + [% FOREACH cl = classifications %] + + + + [% IF (cl.id == 1) %] + + [% ELSE %] + + [% END %] + + [%# don't allow user to delete the default id. %] + [% IF (cl.id == 1) %] + + [% ELSE %] + + [% END %] + + [% END %] + + + + + +
Edit Classification ...DescriptionProductsAction
[% cl.classification FILTER html %] + [% IF cl.description %] + [% cl.description FILTER html %] + [% ELSE %] + none + [% END %] + [% cl.total FILTER html %]reclassify ([% cl.total FILTER html %]) delete
Add a new classificationAdd
+ +

Back to the main [% terms.bugs %] page +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/classifications/update.html.tmpl b/template/en/default/admin/classifications/update.html.tmpl new file mode 100644 index 000000000..3ad7bbc69 --- /dev/null +++ b/template/en/default/admin/classifications/update.html.tmpl @@ -0,0 +1,37 @@ +[%# 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. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Albert Ting + #%] + +[% PROCESS global/header.html.tmpl + title = "Update classification" +%] + +[% IF updated_description %] + Updated description.
+[% END %] + +[% IF updated_classification %] + Updated classification name.
+[% END %] + +

Back to the main [% terms.bugs %] page +or edit more classifications. + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/products/groupcontrol/edit.html.tmpl b/template/en/default/admin/products/groupcontrol/edit.html.tmpl index 85816398b..6bd30040d 100644 --- a/template/en/default/admin/products/groupcontrol/edit.html.tmpl +++ b/template/en/default/admin/products/groupcontrol/edit.html.tmpl @@ -22,6 +22,7 @@ [% PROCESS global/variables.none.tmpl %] [% filt_product = product FILTER html %] +[% filt_classification = classification FILTER html %] [% PROCESS global/header.html.tmpl title = "Edit Group Controls for '$filt_product'" %] @@ -29,6 +30,7 @@

+ diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index f4c68bb4d..b898afee1 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -119,6 +119,11 @@
- [% PROCESS cell attr = { description => "Product", - name => "product" } %] + + [% PROCESS cell attr = { description => "Version", name => "version" } %] [% PROCESS cell attr = { description => "Platform", diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 8d25e2536..c1921a908 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -500,6 +500,7 @@ ], 'admin/products/groupcontrol/edit.html.tmpl' => [ + 'filt_classification', 'filt_product', 'group.bugcount', 'group.id', diff --git a/template/en/default/global/choose-classification.html.tmpl b/template/en/default/global/choose-classification.html.tmpl new file mode 100644 index 000000000..b7b8fb66e --- /dev/null +++ b/template/en/default/global/choose-classification.html.tmpl @@ -0,0 +1,65 @@ + + +[%# 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. + # + # The Initial Developer of the Original Code is Albert Ting + # + # Contributor(s): Albert Ting + #%] + +[%# INTERFACE: + # classdesc: hash. May be empty. The hash keys are the classifications, and the values + # are their descriptions. + #%] + +[% IF target == "enter_bug.cgi" %] + [% title = "Select Classification" %] + [% h2 = "Please select the classification." %] +[% END %] + +[% DEFAULT title = "Choose the classification" %] +[% PROCESS global/header.html.tmpl %] + +
+ [% IF Param('useclassification') %] + [% IF bug.classification_id != "1" %] + [[% bug.classification FILTER html %]] + [% END %] + [% END %] [% terms.Bug %]#: diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 6b48feb00..8cf86dd5f 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -62,8 +62,14 @@ ([% bug.alias FILTER html %]) [% END %] + Product:   + [% IF Param("useclassification") %] + [[% bug.classification FILTER html %]]  + [% END %] + [% bug.product FILTER html %] +
+ +[% IF Param('showallproducts') %] + + + + + +[% END %] + +[% FOREACH p = classdesc.keys.sort %] + [% IF classifications.$p.size > 0 %] + + + + [% IF classdesc.$p %] + + [% END %] + + [% END %] +[% END %] + +
+ + All: +  Show all products
+ + [% p FILTER html %]: +  [% classdesc.$p FILTER html %]
+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 7a21ca056..1080e8e44 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -32,6 +32,7 @@ "bug_status" => "Status", "changeddate" => "Last Changed Date", "cc" => "CC", + "classification" => "Classification", "cclist_accessible" => "CC list accessible?", "component_id" => "Component ID", "component" => "Component", diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl index 7e568372c..8a11b2ad3 100644 --- a/template/en/default/global/useful-links.html.tmpl +++ b/template/en/default/global/useful-links.html.tmpl @@ -77,8 +77,17 @@ IF user.groups.tweakparams %] [% ' | Users' IF user.groups.editusers || user.can_bless %] - [% ' | Products' + [% IF Param('useclassification') %] + [% IF user.groups.editclassifications %] + [% ' | Classifications' %] + [% END %] + [% IF user.groups.editcomponents %] + [% ' | Products' %] + [% END %] + [% ELSE %] + [% ' | Products' IF user.groups.editcomponents %] + [% END %] [% ' | Flags' IF user.groups.editcomponents %] [% ' | Groups' diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index a17b1275b..7638806cf 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -142,6 +142,40 @@ [% title = "Comment Too Long" %] Comments cannot be longer than 65,535 characters. + [% ELSIF error == "auth_classification_not_enabled" %] + [% title = "Classification Not Enabled" %] + Sorry, classification is not enabled. + + [% ELSIF error == "auth_cant_edit_classifications" %] + [% title = "Access Denied" %] + Sorry, you aren't a member of the 'editclassifications' group, and so + you aren't allowed to add, modify or delete classifications. + + [% ELSIF error == "classification_not_specified" %] + [% title = "You Must Supply A Classification Name" %] + You must enter a classification name. + + [% ELSIF error == "classification_already_exists" %] + [% title = "Classification Already Exists" %] + A classification with the name '[% name FILTER html %]' already exists. + + [% ELSIF error == "classification_doesnt_exist" %] + [% title = "Classification Does Not Exist" %] + The classification '[% name FILTER html %]' does not exist. + + [% ELSIF error == "classification_not_deletable" %] + [% title = "Default Classification Can Not Be Deleted" %] + You can not delete the default classification + + [% ELSIF error == "classification_has_products" %] + Sorry, there are products for this classification. You + must reassign those products to another classification before you + can delete this one. + + [% ELSIF error == "cant_delete_default_classification" %] + Sorry, but you can not delete the default classification, + '[% name FILTER html %]'. + [% ELSIF error == "auth_cant_edit_components" %] [% title = "Access Denied" %] Sorry, you aren't a member of the 'editcomponents' group, and so @@ -463,6 +497,10 @@ [% title = "Invalid group name" %] The group you specified, [% name FILTER html %], is not valid here. + [% ELSIF error == "invalid_group_name" %] + [% title = "Invalid group name" %] + The group you specified, [% name FILTER html %], is not valid here. + [% ELSIF error == "invalid_maxrows" %] [% title = "Invalid Max Rows" %] The maximum number of rows, '[% maxrows FILTER html %]', must be diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index f875f3541..77308f28b 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -21,6 +21,81 @@ # Gervase Markham #%] + + + [% PROCESS global/variables.none.tmpl %] [% query_variants = [ @@ -56,7 +131,7 @@ @@ -67,12 +142,35 @@ -[%# *** Product Component Version Target *** %] - +[%# *** Classification Product Component Version Target *** %] + [% IF Param('useclassification') %] + + [% END %]
+ + + + + + + +
Classification:
+ +
+
@@ -83,7 +181,7 @@ -- cgit v1.2.3-24-g4f1b