From f7aef6b20e4d76c3e246ac6f7804ec3edeb6d71f Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" Date: Sun, 16 Jan 2005 13:56:40 +0000 Subject: [PATCH] Patch for bug 190226: templatize editversions.cgi; patch by GavinS , r=jouni, a=myk. --- .../admin/versions/confirm-delete.html.tmpl | 124 ++++++++++++++++++ .../default/admin/versions/create.html.tmpl | 54 ++++++++ .../default/admin/versions/created.html.tmpl | 44 +++++++ .../default/admin/versions/deleted.html.tmpl | 69 ++++++++++ .../en/default/admin/versions/edit.html.tmpl | 59 +++++++++ .../default/admin/versions/footer.html.tmpl | 66 ++++++++++ .../en/default/admin/versions/list.html.tmpl | 71 ++++++++++ .../admin/versions/select-product.html.tmpl | 62 +++++++++ .../default/admin/versions/updated.html.tmpl | 49 +++++++ 9 files changed, 598 insertions(+) create mode 100644 webtools/bugzilla/template/en/default/admin/versions/confirm-delete.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/create.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/created.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/deleted.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/edit.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/footer.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/list.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/select-product.html.tmpl create mode 100644 webtools/bugzilla/template/en/default/admin/versions/updated.html.tmpl diff --git a/webtools/bugzilla/template/en/default/admin/versions/confirm-delete.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/confirm-delete.html.tmpl new file mode 100644 index 000000000000..5f9b9394309d --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/confirm-delete.html.tmpl @@ -0,0 +1,124 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # name: string; The name of the version + # + # bug_count: number; The number of bugs targetted at the version + # + # product: string; The name of the product + # + #%] + +[% title = BLOCK %]Delete Version of Product '[% product FILTER html %]' + [% END %] + +[% PROCESS global/header.html.tmpl + title = title +%] + + + + + + + + + + + + + + + + + + +
FieldValue
Version:[% name FILTER html %]
Version of Product:[% product FILTER html %]
[% 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 [% bug_count %] [%+ terms.bug %] + [% END %] + + outstanding for this version. You must move + + [% IF bug_count > 1 %] + those [% terms.bugs %] + [% ELSE %] + that [% terms.bug %] + [% END %] + + to another version 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 version! When you delete this + version, ALL stored [% terms.bugs %] will be deleted, + too. + You could not even see the [% terms.bug %] history for this version anymore! +
+ + [% END %] + +[% END %] + +[% IF bug_count == 0 || Param('allowbugdeletion') %] + +

Do you really want to delete this version?

+ +

+ + + + +
+ +[% END %] + +[% PROCESS admin/versions/footer.html.tmpl %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/create.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/create.html.tmpl new file mode 100644 index 000000000000..594bf4f8749a --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/create.html.tmpl @@ -0,0 +1,54 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # product: string; name of the product the version is being created for + #%] + +[% title = BLOCK %]Add Version to Product '[% product FILTER html %]'[% END %] +[% h2 = BLOCK %]This page allows you to add a new version to product + '[% product FILTER html %]'.[% END %] +[% PROCESS global/header.html.tmpl + title = title + h2 = h2 +%] + +
+ + + + + +
+ + + + +
+ +

+ +[% PROCESS admin/versions/footer.html.tmpl + no_add_version_link = 1 + %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/created.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/created.html.tmpl new file mode 100644 index 000000000000..84445cccd920 --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/created.html.tmpl @@ -0,0 +1,44 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # name: string; the name of the newly created version + # + # product: string; the name of the product the version belongs to + #%] + +[% title = BLOCK %]Adding new Version of Product + '[% product FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title +%] + +

The version ' + [%- name FILTER html %]' has been created.

+ +

+ +[% PROCESS admin/versions/footer.html.tmpl %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/deleted.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/deleted.html.tmpl new file mode 100644 index 000000000000..f6945ccd34fe --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/deleted.html.tmpl @@ -0,0 +1,69 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # name: string; the name of the deleted version. + # + # product: string; the name of the product the version belonged to + # + # deleted_bug_count: number; the number of bugs which were deleted + # (if bug deletion is allowed) + #%] + +[% title = BLOCK %]Deleted Version '[% name FILTER html %]' of Product + '[% product FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title +%] + +

+[% IF deleted_bug_count %] + Attachments, [% terms.bug %] activity and dependencies deleted for + [%+ deleted_bug_count %] + [% IF deleted_bug_count > 1 %] + [%+ terms.bugs %] + [% ELSE %] + [%+ terms.bug %] + [% END %]. + +

+ [% deleted_bug_count %] + [% IF deleted_bug_count > 1 %] + [%+ terms.bugs %] + [% ELSE %] + [%+ terms.bug %] + [% END %] + deleted. + +[% ELSE %] + No [% terms.bugs %] were targetted at the version. +[% END %] +

+ +

Version '[% name FILTER html %]' deleted.

+ +

+ +[% PROCESS admin/versions/footer.html.tmpl + no_edit_version_link = 1 + %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/edit.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/edit.html.tmpl new file mode 100644 index 000000000000..ef1fbd270b7c --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/edit.html.tmpl @@ -0,0 +1,59 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # name: string; The name of the version + # + # product: string; The product the version belongs to + #%] + +[% PROCESS global/variables.none.tmpl %] + +[% title = BLOCK %]Edit Version '[% name FILTER html %]' of product ' + [%- product FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title +%] + +

+ + + + + + + +
+ + + + + + +
+ +

+ +[% PROCESS admin/versions/footer.html.tmpl + no_edit_version_link = 1 %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/footer.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/footer.html.tmpl new file mode 100644 index 000000000000..252005697d58 --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/footer.html.tmpl @@ -0,0 +1,66 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # name: string; the name of the version + # + # product: string; the name of the product which the version + # belongs/belonged to + # + # no_XXX_link: boolean; if defined, then don't show the corresponding + # link. Supported parameters are: + # + # no_edit_version_link + # no_edit_other_versions_link + # no_add_version_link + #%] + +

+ +


+ +[% UNLESS no_add_version_link %] + Add a version. +[% END %] + +[% IF name && !no_edit_version_link %] + Edit version + '[% name FILTER html %]'. +[% END %] + +[% UNLESS no_edit_other_versions_link %] + Edit other versions of product '[% product FILTER html %]'. + +[% END %] + + Edit product '[% product FILTER html %]'. + +

diff --git a/webtools/bugzilla/template/en/default/admin/versions/list.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/list.html.tmpl new file mode 100644 index 000000000000..ec47c18d750c --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/list.html.tmpl @@ -0,0 +1,71 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # versions: array of hashes having the following properties: + # - name: string; The name of the version. + # + # product: string; the name of the product we are editing versions for + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS global/variables.none.tmpl %] + +[% title = BLOCK %]Select version of product + '[% product FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title +%] + +[% edit_contentlink = BLOCK %]editversions.cgi?action=edit&product= + [%- product FILTER url_quote %]&version=%%name%%[% END %] +[% delete_contentlink = BLOCK %]editversions.cgi?action=del&product= + [%- product FILTER url_quote %]&version=%%name%%[% END %] + + +[% columns = [ + { + name => "name" + heading => "Edit version..." + contentlink => edit_contentlink + }, + { + heading => "Action" + content => "Delete" + contentlink => delete_contentlink + } + ] +%] + +[% PROCESS admin/table.html.tmpl + columns = columns + data = versions +%] + +

+ +[% PROCESS admin/versions/footer.html.tmpl + no_edit_other_versions_link = 1 + %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/select-product.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/select-product.html.tmpl new file mode 100644 index 000000000000..621649cd2bc5 --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/select-product.html.tmpl @@ -0,0 +1,62 @@ +[%# 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): Gavin Shelley (bugzilla@chimpychompy.org) + # + #%] + +[%# INTERFACE: + # products: array of hashes having the following properties: + # - name: string; The name of the product. + # - description: string; The description of the product. + #%] + +[% USE Bugzilla %] +[% cgi = Bugzilla.cgi %] + +[% PROCESS global/variables.none.tmpl %] + +[% PROCESS global/header.html.tmpl + title = "Edit versions for which product?" +%] + +[% bug_count_contentlink = BLOCK %]buglist.cgi?version=%%name%%&product= + [%- product FILTER url_quote %][% END %] + +[% columns = [ + { + name => "name" + heading => "Edit versions of..." + contentlink => "editversions.cgi?product=%%name%%" + }, + { + name => "description" + heading => "Description" + allow_html_content => 1 + } + ] +%] + +[% PROCESS admin/table.html.tmpl + columns = columns + data = products +%] + +

+ +[% PROCESS global/footer.html.tmpl %] diff --git a/webtools/bugzilla/template/en/default/admin/versions/updated.html.tmpl b/webtools/bugzilla/template/en/default/admin/versions/updated.html.tmpl new file mode 100644 index 000000000000..04851adaed20 --- /dev/null +++ b/webtools/bugzilla/template/en/default/admin/versions/updated.html.tmpl @@ -0,0 +1,49 @@ +[%# 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): Gavin Shelley + #%] + +[%# INTERFACE: + # + # updated_name: boolean; defined if the 'name' field was updated + # + # name: string; the new name of the version + # + # product: string; the name of the product the version belongs to + #%] + +[% title = BLOCK %]Updating Version '[% name FILTER html %]' of Product + '[% product FILTER html %]'[% END %] +[% PROCESS global/header.html.tmpl + title = title +%] + +[% IF updated_name %] +

Updated Version name to: '[% name FILTER html %]'.

+[% END %] + +[% UNLESS updated_name %] +

Nothing changed for version '[% name FILTER html %]'. +[% END %] + +

+ +[% PROCESS admin/versions/footer.html.tmpl %] + +[% PROCESS global/footer.html.tmpl %]