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 --- .../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 +++++++++++++ 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 template/en/default/global/choose-classification.html.tmpl (limited to 'template/en/default/global') 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('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 -- cgit v1.2.3-24-g4f1b