From 91b171e7584920d03abb9c45e779c84f3dee975c Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Sun, 29 Sep 2002 01:42:23 +0000 Subject: Fix for bug 98801: Implementation of the request tracker, a set of enhancements to attachment statuses. r=gerv,bbaetz --- template/en/default/account/prefs/email.html.tmpl | 20 ++- .../admin/flag-type/confirm-delete.html.tmpl | 58 +++++++ template/en/default/admin/flag-type/edit.html.tmpl | 189 ++++++++++++++++++++ template/en/default/admin/flag-type/list.html.tmpl | 107 ++++++++++++ template/en/default/attachment/edit.html.tmpl | 21 +-- template/en/default/attachment/list.html.tmpl | 35 ++-- template/en/default/bug/edit.html.tmpl | 20 ++- template/en/default/flag/list.html.tmpl | 94 ++++++++++ template/en/default/global/code-error.html.tmpl | 42 +++++ template/en/default/global/messages.html.tmpl | 28 +++ template/en/default/global/select-menu.html.tmpl | 12 +- template/en/default/global/useful-links.html.tmpl | 4 +- template/en/default/global/user-error.html.tmpl | 39 ++++- template/en/default/request/created-email.txt.tmpl | 41 +++++ .../en/default/request/fulfilled-email.txt.tmpl | 42 +++++ template/en/default/request/queue.html.tmpl | 193 +++++++++++++++++++++ template/en/default/request/verify.html.tmpl | 108 ++++++++++++ 17 files changed, 1013 insertions(+), 40 deletions(-) create mode 100644 template/en/default/admin/flag-type/confirm-delete.html.tmpl create mode 100644 template/en/default/admin/flag-type/edit.html.tmpl create mode 100644 template/en/default/admin/flag-type/list.html.tmpl create mode 100644 template/en/default/flag/list.html.tmpl create mode 100644 template/en/default/request/created-email.txt.tmpl create mode 100644 template/en/default/request/fulfilled-email.txt.tmpl create mode 100644 template/en/default/request/queue.html.tmpl create mode 100644 template/en/default/request/verify.html.tmpl (limited to 'template/en') diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl index e14ea9910..5d73a357b 100644 --- a/template/en/default/account/prefs/email.html.tmpl +++ b/template/en/default/account/prefs/email.html.tmpl @@ -83,9 +83,27 @@ - + +
+ + + + + + + +
+ + + + + + +
diff --git a/template/en/default/admin/flag-type/confirm-delete.html.tmpl b/template/en/default/admin/flag-type/confirm-delete.html.tmpl new file mode 100644 index 000000000..b022e621e --- /dev/null +++ b/template/en/default/admin/flag-type/confirm-delete.html.tmpl @@ -0,0 +1,58 @@ + +[%# 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): Myk Melez + #%] + +[%# Filter off the name here to be used multiple times below %] +[% name = BLOCK %][% flag_type.name FILTER html %][% END %] + +[% PROCESS global/header.html.tmpl + title = "Confirm Deletion of Flag Type '$name'" +%] + +

+ There are [% flag_count %] flags of type [% name %]. + If you delete this type, those flags will also be deleted. Note that + instead of deleting the type you can + deactivate it, + in which case the type and its flags will remain in the database + but will not appear in the Bugzilla UI. +

+ + + + + + + + + +
+ Do you really want to delete this type? +
+ + Yes, delete + + + + No, don't delete + +
+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/flag-type/edit.html.tmpl b/template/en/default/admin/flag-type/edit.html.tmpl new file mode 100644 index 000000000..ca01f6365 --- /dev/null +++ b/template/en/default/admin/flag-type/edit.html.tmpl @@ -0,0 +1,189 @@ +[%# 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): Myk Melez + #%] + +[%# The javascript and header_html blocks get used in header.html.tmpl. %] +[% javascript = BLOCK %] + var usetms = 0; // do we have target milestone? + var first_load = 1; // is this the first time we load the page? + var last_sel = []; // caches last selection + var cpts = new Array(); + [% FOREACH p = products %] + cpts['[% p FILTER js %]'] = [ + [%- FOREACH item = components_by_product.$p %]'[% item FILTER js %]'[% ", " UNLESS loop.last %] [%- END -%] ]; + [% END %] +[% END %] + +[% header_html = BLOCK %] + +[% END %] + +[% IF type.target_type == "bug" %] + [% title = "Create Flag Type for Bugs" %] +[% ELSE %] + [% title = "Create Flag Type for Attachments" %] +[% END %] + +[% IF last_action == "copy" %] + [% title = "Create Flag Type Based on $type.name" %] +[% ELSIF last_action == "edit" %] + [% title = "Edit Flag Type $type.name" %] +[% END %] + +[% PROCESS global/header.html.tmpl + title = title + style = " + table#form th { text-align: right; vertical-align: baseline; white-space: nowrap; } + table#form td { text-align: left; vertical-align: baseline; } + " + onload="selectProduct(forms[0], 'product', 'component', '__Any__');" +%] + +
+ + + + [% FOREACH category = type.inclusions %] + + [% END %] + [% FOREACH category = type.exclusions %] + + [% END %] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name: + a short name identifying this type
+ +
Description: + a comprehensive description of this type
+ +
Category: + the products/components to which [% type.target_type %]s must + (inclusions) or must not (exclusions) belong in order for users + to be able to set flags of this type for them + + + + + + +
+ Product/Component:
+
+
+ + +
+ Inclusions:
+ [% PROCESS "global/select-menu.html.tmpl" name="inclusion_to_remove" multiple=1 size=4 options=type.inclusions %]
+ +
+ Exclusions:
+ [% PROCESS "global/select-menu.html.tmpl" name="exclusion_to_remove" multiple=1 size=4 options=type.exclusions %]
+ +
+
Sort Key: + a number between 1 and 32767 by which this type will be sorted + when displayed to users in a list; ignore if you don't care + what order the types appear in or if you want them to appear + in alphabetical order
+ +
  + + active (flags of this type appear in the UI and can be set) +
  + + requestable (users can ask for flags of this type to be set) +
CC List: + if requestable, who should get carbon copied on email notification of requests
+ +
  + + specifically requestable (users can ask specific other users to set flags of this type as opposed to just asking the wind) +
  + + multiplicable (multiple flags of this type can be set on the same [% type.target_type %]) +
+ +
+ +
+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/flag-type/list.html.tmpl b/template/en/default/admin/flag-type/list.html.tmpl new file mode 100644 index 000000000..76a835639 --- /dev/null +++ b/template/en/default/admin/flag-type/list.html.tmpl @@ -0,0 +1,107 @@ +[%# 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): Myk Melez + #%] + +[% PROCESS global/header.html.tmpl + title = 'Administer Flag Types' + style = " + table#flag_types tr th { text-align: left; } + .inactive { color: #787878; } + " +%] + +

+ Flags are markers that identify whether a bug or attachment has been granted + or denied some status. Flags appear in the UI as a name and a status symbol + ("+" for granted, "-" for denied, and "?" for statuses requested by users). +

+ +

+ For example, you might define a "review" status for users to request review + for their patches. When a patch writer requests review, the string "review?" + will appear in the attachment. When a patch reviewer reviews the patch, + either the string "review+" or the string "review-" will appear in the patch, + depending on whether the patch passed or failed review. +

+ +

Flag Types for Bugs

+ +[% PROCESS display_flag_types types=bug_types %] + +

+ Create Flag Type for Bugs +

+ +

Flag Types for Attachments

+ +[% PROCESS display_flag_types types=attachment_types %] + +

+ Create Flag Type For Attachments +

+ + + +[% PROCESS global/footer.html.tmpl %] + + +[% BLOCK display_flag_types %] + + + + + + + + + [% FOREACH type = types %] + + + + + + + + [% END %] + +
NameDescriptionActions
[% type.name FILTER html %][% type.description FILTER html %] + Edit + | Copy + | Delete +
+[% END %] diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index ec2616bf9..32449f041 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -32,6 +32,8 @@ table.attachment_info th { text-align: right; vertical-align: top; } table.attachment_info td { text-align: left; vertical-align: top; } #noview { text-align: left; vertical-align: center; } + + table#flags th, table#flags td { font-size: small; vertical-align: baseline; } " %] @@ -158,8 +160,7 @@ MIME Type:

- - Flags:
+ @@ -168,20 +169,14 @@
[% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] private

+ [% ELSE %]
[% END %] - [% IF statusdefs.size %] - Status:
- [% FOREACH def = statusdefs %] - -
- [% END %] + [% IF flag_types.size > 0 %] + Flags:
+ [% PROCESS "flag/list.html.tmpl" bug_id=bugid attach_id=attachid %]
[% END %] - +
Comment (on the bug):

diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index e7aa8b0ef..59f749695 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -19,13 +19,18 @@ # Contributor(s): Myk Melez #%] +[%# Whether or not to include flags. %] +[% display_flags = num_attachment_flag_types > 0 %] +
- + [% IF display_flags %] + + [% END %] [% canseeprivate = !Param("insidergroup") || UserInGroup(Param("insidergroup")) %] @@ -50,16 +55,24 @@ - - + + [% END %] + - -[%# *** QAContact URL Summary Whiteboard Keywords *** %] +[%# *** QAContact URL Requests Summary Whiteboard Keywords *** %] [% IF Param('useqacontact') %] @@ -218,17 +218,23 @@ [% END %] - + - @@ -239,7 +245,7 @@ - @@ -252,7 +258,7 @@ Keywords: - @@ -263,8 +269,8 @@ [%# *** Attachments *** %] [% PROCESS attachment/list.html.tmpl - attachments = bug.attachments - bugid = bug.bug_id %] + attachments = bug.attachments + bugid = bug.bug_id %] [%# *** Dependencies Votes *** %] diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl new file mode 100644 index 000000000..951f248db --- /dev/null +++ b/template/en/default/flag/list.html.tmpl @@ -0,0 +1,94 @@ +[%# 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): Myk Melez + #%] + +
Attachment Type CreatedStatusFlagsActions
[% attachment.date %] - [% IF attachment.statuses.size == 0 %] - none - [% ELSE %] - [% FOREACH s = attachment.statuses %] - [% s FILTER html FILTER replace('\s', ' ') %]
+ [% IF display_flags %] +
+ [% IF attachment.flags.size == 0 %] + none + [% ELSE %] + [% FOR flag = attachment.flags %] + [% IF flag.setter %] + [% flag.setter.nick FILTER html %]: + [% END %] + [%+ flag.type.name %][% flag.status %] + [%+ IF flag.status == "?" && flag.requestee %] + ([% flag.requestee.nick %]) + [% END %]
+ [% END %] [% END %] - [% END %] -
[% IF attachment.canedit %] Edit @@ -72,7 +85,7 @@ [% END %]
+ Create a New Attachment (proposed patch, testcase, etc.) diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 9cf33b8b5..ef9ec2d7f 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -194,7 +194,7 @@ [% END %]
+ + [% IF flag_types.size > 0 %] + Flags:
+ [% PROCESS "flag/list.html.tmpl" %] + [% END %] +
Summary: + Status Whiteboard: + +
+ + [% FOREACH type = flag_types %] + [% FOREACH flag = type.flags %] + + + + + + + [% END %] + [% IF !type.flags || type.flags.size == 0 %] + + + + + + + [% END %] + [% END %] + + [% FOREACH type = flag_types %] + [% NEXT UNLESS type.flags.size > 0 && type.is_multiplicable %] + [% IF !separator_displayed %] + + [% separator_displayed = 1 %] + [% END %] + + + + + + [% END %] + +
+ [% flag.setter.nick FILTER html %]: + + [% type.name FILTER html %] + + + + [% IF flag.status == "?" && flag.requestee %]([% flag.requestee.nick FILTER html %])[% END %] +
 [% type.name %] + + + [% IF type.is_requestable && type.is_requesteeble %] + () + [% END %] +

addl. [% type.name %] + + + [% IF type.is_requestable && type.is_requesteeble %] + () + [% END %] +
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index bf93977ad..1981364f1 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -40,6 +40,10 @@ to any [% parameters %] which you may have set before calling ThrowCodeError. + [% ELSIF error == "action_unrecognized" %] + I don't recognize the value ([% variables.action FILTER html %]) + of the action variable. + [% ELSIF error == "attachment_already_obsolete" %] Attachment #[% attachid FILTER html %] ([% description FILTER html %]) is already obsolete. @@ -78,10 +82,40 @@ [% ELSIF error == "no_bug_data" %] No data when fetching bug [% bug_id %]. + [% ELSIF error == "flag_nonexistent" %] + There is no flag with ID #[% variables.id %]. + + [% ELSIF error == "flag_status_invalid" %] + The flag status [% variables.status FILTER html %] is invalid. + + [% ELSIF error == "flag_type_component_nonexistent" %] + The component [% variables.component FILTER html %] does not exist + in the product [% variables.product FILTER html %]. + + [% ELSIF error == "flag_type_component_without_product" %] + A component was selected without a product being selected. + + [% ELSIF error == "flag_type_id_invalid" %] + The flag type ID [% variables.id FILTER html %] is not + a positive integer. + + [% ELSIF error == "flag_type_nonexistent" %] + There is no flag type with the ID [% variables.id %]. + + [% ELSIF error == "flag_type_product_nonexistent" %] + The product [% variables.product FILTER html %] does not exist. + + [% ELSIF error == "flag_type_target_type_invalid" %] + The target type was neither bug nor attachment + but rather [% variables.target_type FILTER html %]. + [% ELSIF error == "no_y_axis_defined" %] No Y axis was defined when creating report. The X axis is optional, but the Y axis is compulsory. + [% ELSIF error == "request_queue_group_invalid" %] + The group field [% group FILTER html %] is invalid. + [% ELSIF error == "template_error" %] [% template_error_msg %] @@ -91,6 +125,14 @@ [% ELSIF error == "unknown_action" %] Unknown action [% action FILTER html %]! + [% ELSIF error == "unknown_component" %] + [% title = "Unknown Component" %] + There is no component named [% variables.component FILTER html %]. + + [% ELSIF error == "unknown_product" %] + [% title = "Unknown Product" %] + There is no product named [% variables.product FILTER html %]. + [% ELSE %] [%# Give sensible error if error functions are used incorrectly. #%] diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index 584c4a93e..85c678fdc 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -81,6 +81,34 @@ [% title = "Password Changed" %] Your password has been changed. + [% ELSIF message_tag == "flag_type_created" %] + [% title = "Flag Type Created" %] + The flag type [% name FILTER html %] has been created. + Back to flag types. + + [% ELSIF message_tag == "flag_type_changes_saved" %] + [% title = "Flag Type Changes Saved" %] +

+ Your changes to the flag type [% name FILTER html %] + have been saved. + Back to flag types. +

+ + [% ELSIF message_tag == "flag_type_deleted" %] + [% title = "Flag Type Deleted" %] +

+ The flag type [% name FILTER html %] has been deleted. + Back to flag types. +

+ + [% ELSIF message_tag == "flag_type_deactivated" %] + [% title = "Flag Type Deactivated" %] +

+ The flag type [% flag_type.name FILTER html %] + has been deactivated. + Back to flag types. +

+ [% ELSIF message_tag == "shutdown" %] [% title = "Bugzilla is Down" %] [% Param("shutdownhtml") %] diff --git a/template/en/default/global/select-menu.html.tmpl b/template/en/default/global/select-menu.html.tmpl index c27f60e8b..7b7fddb29 100644 --- a/template/en/default/global/select-menu.html.tmpl +++ b/template/en/default/global/select-menu.html.tmpl @@ -22,12 +22,18 @@ [%# INTERFACE: # name: string; the name of the menu. # + # multiple: boolean; whether or not the menu is multi-select + # + # size: integer; if multi-select, the number of items to display at once + # # options: array or hash; the items with which to populate the array. # If a hash is passed, the hash keys become the names displayed # to the user while the hash values become the value of the item. # # default: string; the item selected in the menu by default. # + # onchange: code; JavaScript to be run when the user changes the value + # selected in the menu. #%] [%# Get the scalar representation of the options reference, @@ -37,7 +43,9 @@ #%] [% options_type = BLOCK %][% options %][% END %] - [% IF options_type.search("ARRAY") %] [% FOREACH value = options %]