From 5c0c85df6d698ad183a88a8794ed0212de2895c1 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Sat, 13 Apr 2002 04:01:53 +0000 Subject: Fix for bug 125660: Templatizes process_bug.cgi. Patch by Myk Melez r=gerv,bbaetz --- template/default/global/hidden-fields.html.tmpl | 32 +++++++ template/default/process/confirm-dupe.html.tmpl | 73 +++++++++++++++ template/default/process/mid-air.html.tmpl | 75 ++++++++++++++++ template/default/process/next-bug.html.tmpl | 32 +++++++ template/default/process/results.html.tmpl | 50 +++++++++++ .../default/process/verify-new-product.html.tmpl | 100 +++++++++++++++++++++ 6 files changed, 362 insertions(+) create mode 100644 template/default/global/hidden-fields.html.tmpl create mode 100644 template/default/process/confirm-dupe.html.tmpl create mode 100644 template/default/process/mid-air.html.tmpl create mode 100644 template/default/process/next-bug.html.tmpl create mode 100644 template/default/process/results.html.tmpl create mode 100644 template/default/process/verify-new-product.html.tmpl (limited to 'template') diff --git a/template/default/global/hidden-fields.html.tmpl b/template/default/global/hidden-fields.html.tmpl new file mode 100644 index 000000000..85df62435 --- /dev/null +++ b/template/default/global/hidden-fields.html.tmpl @@ -0,0 +1,32 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # form: hash; the form fields/values for which to generate hidden fields. + # exclude: string; a regular expression matching fields to exclude + # from the list of hidden fields generated by this template + #%] + +[%# Generate hidden form fields for non-excluded fields. %] +[% FOREACH field = form %] + [% NEXT IF field.key.search(exclude) %] + +[% END %] diff --git a/template/default/process/confirm-dupe.html.tmpl b/template/default/process/confirm-dupe.html.tmpl new file mode 100644 index 000000000..d17bfa55f --- /dev/null +++ b/template/default/process/confirm-dupe.html.tmpl @@ -0,0 +1,73 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # form: hash; the form values submitted to the script + # original_bug_id: number; the bug number for the bug + # against which a bug is being duped + # duplicate_bug_id: number; the bug number for the bug + # being duped + # cclist_accessible: boolean; whether or not users on the cc: list + # of the original bug can access that bug. + #%] + +[% PROCESS global/header title="Duplicate Warning" %] + +

+ When marking a bug as a duplicate, the reporter of the duplicate + is normally added to the CC list of the original. The permissions + on bug [% original_bug_id %] (the original) are currently set + such that the reporter would not normally be able to see it. +

+ +

+ Adding the reporter to the CC list of bug [% original_bug_id %] + [% IF cclist_accessible %] + will immediately + [% ELSE %] + might, in the future, + [% END %] + allow him/her access to view this bug. + Do you wish to do this? +

+ +
+ +[% PROCESS "global/hidden-fields.html.tmpl" exclude="^(Bugzilla|LDAP)_(login|password)$" %] + +

+ + Yes, add the reporter to CC list on bug [% original_bug_id %] +

+

+ + No, do not add the reporter to CC list on bug [% original_bug_id %] +

+

+ Throw away my changes, + and revisit bug [% duplicate_bug_id %] +

+ +

+ +
+ +[% PROCESS global/footer %] diff --git a/template/default/process/mid-air.html.tmpl b/template/default/process/mid-air.html.tmpl new file mode 100644 index 000000000..89ac71fe3 --- /dev/null +++ b/template/default/process/mid-air.html.tmpl @@ -0,0 +1,75 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # form: hash; the form values submitted to the script + # operations: array; bug activity since the user last displayed the bug form, + # used by show/activity.html.tmpl to display recent changes that will be + # overwritten if the user submits these changes. See that template + # for further documentation. + # start_at: number; the comment at which show/comments.tmpl should begin + # displaying comments, either the index of the last comment (if the user + # entered a comment along with their change) or a number less than that + # (if they didn't), in which case no comments are displayed. + # comments: array; all the comments on the bug. + # bug_id: number; the ID of the bug being changed. + #%] + +

Mid-air collision detected!

+ +

+ Someone else has made changes to this bug at the same time you were trying to. + The changes made were: +

+ +

+ [% PROCESS "show/activity.html.tmpl" incomplete_data=0 %] +

+ +[% IF comments.size > start_at %] +

+ Added comments: +

+ [% PROCESS "show/comments.tmpl" %] +
+

+[% END %] + +

+You have the following choices: +

+ +
    +
  • +
    + [% PROCESS "global/hidden-fields.html.tmpl" exclude="^(Bugzilla|LDAP)_(login|password)$" %] + + This will cause all of the above changes to be overwritten + [% ", except for the added comment(s)" IF comments.size > start_at %]. +
    +
  • +
  • + Throw away my changes, + and revisit bug [% bug_id %] +
  • +
+ +[% PROCESS global/footer %] diff --git a/template/default/process/next-bug.html.tmpl b/template/default/process/next-bug.html.tmpl new file mode 100644 index 000000000..b7a2605e9 --- /dev/null +++ b/template/default/process/next-bug.html.tmpl @@ -0,0 +1,32 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # next_id : number; the ID of the next bug in the user's bug list. + #%] + +
+ +

+ The next bug in your list is bug + [% next_id %]: +

+ diff --git a/template/default/process/results.html.tmpl b/template/default/process/results.html.tmpl new file mode 100644 index 000000000..4c1b7d742 --- /dev/null +++ b/template/default/process/results.html.tmpl @@ -0,0 +1,50 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # id: number; the ID of the bug that was changed/checked. + # + # type: string; the type of change/check that was made: "bug" when a bug + # is changed, "dupe" when a duplication notation is added to a bug, + # and "dep" when a bug is checked for changes to its dependencies. + #%] + +[% DEFAULT type="bug" %] + +[% + title = { + 'bug' => "Changes submitted for bug" , + 'dupe' => "Duplicate notation added to bug" , + 'dep' => "Checking for dependency changes on bug" , + } +%] + + + + + + +
+

[% title.$type %] [%+ id %]

+ [% mail %] +
+ Back To BUG# [% id %] +
diff --git a/template/default/process/verify-new-product.html.tmpl b/template/default/process/verify-new-product.html.tmpl new file mode 100644 index 000000000..2f319af2b --- /dev/null +++ b/template/default/process/verify-new-product.html.tmpl @@ -0,0 +1,100 @@ + +[%# 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 + #%] + +[%# INTERFACE: + # form: hash; the form values submitted to the script + # verify_fields: boolean; whether or not to verify + # the version, component, and target milestone fields + # versions: array; versions for the new product. + # components: array; components for the new product. + # milestones: array; milestones for the new product. + # verify_bug_group: boolean; whether or not to ask the user + # if they want to add the bug to its new product's group + # use_target_milestone: boolean; whether or not to use + # the target milestone field + #%] + +[% USE mycgi = CGI %] + +
+ +[% PROCESS "global/hidden-fields.html.tmpl" exclude="^version|component|target_milestone$" %] + +[%# Verify the version, component, and target milestone fields. %] +[% IF verify_fields %] +

Verify Version, Component[% ", Target Milestone" IF use_target_milestone %]

+ +

+ [% IF usetargetmilestone %] + You are moving the bug(s) to the product [% form.product %], + and the version, component, and/or target milestone fields are no longer + correct. Please set the correct version, component, and target milestone now: + [% ELSE %] + You are moving the bug(s) to the product [% form.product %], + and the version and component fields are no longer correct. + Please set the correct version and component now: + [% END %] +

+ + + + + + [% IF use_target_milestone %] + + [% END %] + +
+ Version:
+ [% mycgi.popup_menu(Name => "version" , Values => versions) %] +
+ Component:
+ [% mycgi.popup_menu(Name => "component" , Values => components) %] +
+ Target Milestone:
+ [% mycgi.popup_menu(Name => "target_milestone" , Values => milestones) %] +
+ +[% END %] + +[% IF verify_bug_group %] +

Verify Bug Group

+ +

+ Do you want to add the bug to its new product's group (if any)? +

+ +

+ no
+ yes
+ + yes, but only if the bug was in its old product's group
+

+[% END %] + + + +
+
+Cancel and Return to the Query Page + +[% PROCESS global/footer %] + -- cgit v1.2.3-24-g4f1b