From 7ce67eec4fb2c17ee3621b1aad2f99295ed4649f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 2 Sep 2005 04:33:06 +0000 Subject: Bug 302370: Remove the EmitFormElements() routine from editproducts.cgi and templatize that code - Patch by Gabriel Sales de Oliveira r=LpSolit a=myk --- .../en/default/admin/products/create.html.tmpl | 64 +++++++++ .../default/admin/products/edit-common.html.tmpl | 89 ++++++++++++ template/en/default/admin/products/edit.html.tmpl | 152 +++++++++++++++++++++ 3 files changed, 305 insertions(+) create mode 100644 template/en/default/admin/products/create.html.tmpl create mode 100644 template/en/default/admin/products/edit-common.html.tmpl create mode 100644 template/en/default/admin/products/edit.html.tmpl (limited to 'template/en') diff --git a/template/en/default/admin/products/create.html.tmpl b/template/en/default/admin/products/create.html.tmpl new file mode 100644 index 000000000..8dc6615b4 --- /dev/null +++ b/template/en/default/admin/products/create.html.tmpl @@ -0,0 +1,64 @@ +[%# 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. + # + # Contributor(s): Gabriel S. Oliveira + #%] + +[%# INTERFACE: + # classification: string; name of the classification in which the new + # product is created. + # + #%] + +[% title = BLOCK %]Add Product[% END %] + +[% PROCESS global/header.html.tmpl + title = title +%] + +[% DEFAULT + product.votesperuser = "0", + product.maxvotesperbug = "10000", + product.votestoconfirm = "0", + version = "unspecified", + product.defaultmilestone = "---" +%] + +
+ + + [% PROCESS "admin/products/edit-common.html.tmpl" %] + + + + + + + + + +
Version: +
Create chart datasets for this product:
+ + + + + + +
+ +[% PROCESS "admin/products/footer.html.tmpl" no_add_product_link = 1 %] + +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/products/edit-common.html.tmpl b/template/en/default/admin/products/edit-common.html.tmpl new file mode 100644 index 000000000..cbbbd8232 --- /dev/null +++ b/template/en/default/admin/products/edit-common.html.tmpl @@ -0,0 +1,89 @@ +[%# 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. + # + # Contributor(s): Jack Nerad + # Tiago R. Mello + # Gabriel S. Oliveira + #%] + +[%# INTERFACE: + # classification: string; name of classification product is in. + # product: array; an array of product objects. + #%] + +[% IF Param('useclassification') %] + + Classification: + [% classification FILTER html %] + +[% END %] + + + Product: + + + + + Description: + + + + +[% IF Param('usetargetmilestone') -%] + + URL describing milestones for this product: + + + + + Default milestone: + + + +[% END %] + + + Closed for [% terms.bug %] entry: + + + + + Maximum votes per person: + + + + + + Maximum votes a person can put on a single [% terms.bug %]: + + + + + + + Number of votes [% terms.abug %] in this product needs to + automatically get out of the + UNCONFIRMED state: + + + + diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl new file mode 100644 index 000000000..da58e6722 --- /dev/null +++ b/template/en/default/admin/products/edit.html.tmpl @@ -0,0 +1,152 @@ +[%# 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. + # + # Contributor(s): Jack Nerad + # Tiago R. Mello + # Gabriel S. Oliveira + #%] + +[%# INTERFACE: + # classification: string; name of classification product is in. + # product: an array of product objects. + # components: an array of component object(s) related to the product. + # groups: an array of group objects related to the product. + # versions: an array of version objects related to product. + # milestones: an array of milestones objects related to product. + # bug_count: integer; number of bugs in this product. + #%] + +[% title = BLOCK %]Edit Product[% END %] + +[% PROCESS global/header.html.tmpl + title = title +%] + +
+ + + [% PROCESS "admin/products/edit-common.html.tmpl" %] + + + + + + + + + + [% IF Param('usetargetmilestone') %] + + + + + [% END %] + + + + + + + + +
+ + Edit components: + + + [% IF components.size -%] + [% FOREACH component = components %] + [% component.name FILTER html %]:  + [% IF component.description %] + [% component.description FILTER none %] + [% ELSE %] + description missing + [% END %] +
+ [% END %] + [% ELSE %] + missing + [% END %] +
+ Edit +versions: + + [%- IF versions.size -%] + [% FOREACH v = versions %] + [% v FILTER html %] +
+ [% END %] + [% ELSE %] + missing + [% END %] +
+ + Edit milestones: + + [%- IF milestones.size -%] + [%- FOREACH m = milestones -%] + [% m FILTER html %] +
+ [% END %] + [% ELSE %] + missing + [% END %] +
+ + Edit Group Access Controls: + + + [% IF groups.size %] + [% FOREACH g = groups %] + [% g.name FILTER html %]:  + [% IF g.isactive %] + [% g.membercontrol FILTER html %]/ + [% g.othercontrol FILTER html %] + [% IF g.entry %], ENTRY[% END %] + [% IF g.canedit %], CANEDIT[% END %] + [% ELSE %] + DISABLED + [% END %] +
+ [% END %] + [% ELSE %] + no groups + [% END %] +
[% terms.Bugs %]:[% bug_count FILTER html %]
+ + + + + + + + + + + + +
+ +[% PROCESS "admin/products/footer.html.tmpl" no_add_product_link = 1 %] + +[% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b