summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/components
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-03-02 07:10:22 +0100
committerlpsolit%gmail.com <>2006-03-02 07:10:22 +0100
commitbf646df2bc21afc10dc0b074b13c8742ef43d461 (patch)
tree6e9955da4b5d96e907f5858e93ed4b7e07cdee54 /template/en/default/admin/components
parent6efc4495cf42c61f31397374618ea55bd31a9983 (diff)
downloadbugzilla-bf646df2bc21afc10dc0b074b13c8742ef43d461.tar.gz
bugzilla-bf646df2bc21afc10dc0b074b13c8742ef43d461.tar.xz
Bug 311258: use objects in admin templates (products & co) - Patch by André Batosti <batosti@async.com.br> r=LpSolit a=justdave
Diffstat (limited to 'template/en/default/admin/components')
-rw-r--r--template/en/default/admin/components/confirm-delete.html.tmpl25
-rw-r--r--template/en/default/admin/components/create.html.tmpl9
-rw-r--r--template/en/default/admin/components/created.html.tmpl13
-rw-r--r--template/en/default/admin/components/deleted.html.tmpl26
-rw-r--r--template/en/default/admin/components/edit.html.tmpl10
-rw-r--r--template/en/default/admin/components/footer.html.tmpl23
-rw-r--r--template/en/default/admin/components/list.html.tmpl22
-rw-r--r--template/en/default/admin/components/updated.html.tmpl29
8 files changed, 76 insertions, 81 deletions
diff --git a/template/en/default/admin/components/confirm-delete.html.tmpl b/template/en/default/admin/components/confirm-delete.html.tmpl
index dabace154..a0387352b 100644
--- a/template/en/default/admin/components/confirm-delete.html.tmpl
+++ b/template/en/default/admin/components/confirm-delete.html.tmpl
@@ -22,11 +22,11 @@
[%# INTERFACE:
# comp: object; Bugzilla::Component object representing the component the
# user wants to delete.
- # prod: object; Bugzilla::Product object representing the product to
+ # product: object; Bugzilla::Product object representing the product to
# which the component belongs.
#%]
-[% title = BLOCK %]Delete Component of Product '[% prod.name FILTER html %]'
+[% title = BLOCK %]Delete Component of Product '[% product.name FILTER html %]'
[% END %]
[% PROCESS global/header.html.tmpl
@@ -60,13 +60,13 @@
</tr>
<tr>
<td valign="top">Component of Product:</td>
- <td valign="top">[% prod.name FILTER html %]</td>
+ <td valign="top">[% product.name FILTER html %]</td>
-[% IF prod.description %]
+[% IF product.description %]
</tr>
<tr>
<td valign="top">Product Description:</td>
- <td valign="top">[% prod.description FILTER html %]</td>
+ <td valign="top">[% product.description FILTER html %]</td>
[% END %]
[% IF Param('usetargetmilestone') %]
@@ -74,8 +74,8 @@
<tr>
<td valign="top">Product Milestone URL:</td>
<td valign="top">
- <a href="[% prod.milestone_url FILTER uri %]">
- [% prod.milestone_url FILTER html %]
+ <a href="[% product.milestone_url FILTER uri %]">
+ [% product.milestone_url FILTER html %]
</a>
</td>
[% END %]
@@ -83,7 +83,7 @@
</tr>
<tr>
<TD VALIGN="top">Closed for [% terms.bugs %]:</TD>
- <TD VALIGN="top">[% IF prod.disallow_new %]Yes[% ELSE %]No[% END %]</td>
+ <TD VALIGN="top">[% IF product.disallow_new %]Yes[% ELSE %]No[% END %]</td>
</tr>
<tr>
<td valign="top">[% terms.Bugs %]:</td>
@@ -91,7 +91,7 @@
[% IF comp.bug_count %]
<a title="List of [% terms.bugs %] for component '[% comp.name FILTER html %]'"
href="buglist.cgi?component=[% comp.name FILTER url_quote %]&amp;product=
- [%- prod.name FILTER url_quote %]">[% comp.bug_count %]</a>
+ [%- product.name FILTER url_quote %]">[% comp.bug_count %]</a>
[% ELSE %]
None
[% END %]
@@ -148,15 +148,12 @@
<form method="post" action="editcomponents.cgi">
<input type="submit" value="Yes, delete">
<input type="hidden" name="action" value="delete">
- <input type="hidden" name="product" value="[% prod.name FILTER html %]">
+ <input type="hidden" name="product" value="[% product.name FILTER html %]">
<input type="hidden" name="component" value="[% comp.name FILTER html %]">
</form>
[% END %]
-[% PROCESS admin/components/footer.html.tmpl
- name = comp.name
- product = prod.name
-%]
+[% PROCESS admin/components/footer.html.tmpl %]
[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/admin/components/create.html.tmpl b/template/en/default/admin/components/create.html.tmpl
index ea4380d50..fa4c05c14 100644
--- a/template/en/default/admin/components/create.html.tmpl
+++ b/template/en/default/admin/components/create.html.tmpl
@@ -20,12 +20,13 @@
#%]
[%# INTERFACE:
- # product: string; name of product
+ # product: object; Bugzilla::Product object representing the product to
+ # which the component belongs.
#%]
-[% title = BLOCK %]Add component to Product '[% product FILTER html %]'[% END %]
+[% title = BLOCK %]Add component to Product '[% product.name FILTER html %]'[% END %]
[% h2 = BLOCK %]This page allows you to add a new component to product
- '[% product FILTER html %]'.[% END %]
+ '[% product.name FILTER html %]'.[% END %]
[% PROCESS global/header.html.tmpl
title = title
h2 = h2
@@ -81,7 +82,7 @@
<input type="hidden" name="action" value="new">
<input type="hidden" name='open_name' value='All Open'>
<input type="hidden" name='nonopen_name' value='All Closed'>
- <input type="hidden" name='product' value="[% product FILTER html %]">
+ <input type="hidden" name='product' value="[% product.name FILTER html %]">
</form>
diff --git a/template/en/default/admin/components/created.html.tmpl b/template/en/default/admin/components/created.html.tmpl
index 54963065d..090cfd87e 100644
--- a/template/en/default/admin/components/created.html.tmpl
+++ b/template/en/default/admin/components/created.html.tmpl
@@ -20,20 +20,21 @@
#%]
[%# INTERFACE:
- # name: string; the name of the newly created component
- #
- # product: string; the name of the product the component belongs to
+ # comp: object; Bugzilla::Component object representing the component the
+ # user created.
+ # product: object; Bugzilla::Product object representing the product to
+ # which the component belongs.
#%]
[% title = BLOCK %]Adding new Component of Product
- '[% product FILTER html %]'[% END %]
+ '[% product.name FILTER html %]'[% END %]
[% PROCESS global/header.html.tmpl
title = title
%]
<p>The component '<a href="editcomponents.cgi?action=edit&amp;product=
- [%- product FILTER url_quote %]&amp;component=[% name FILTER url_quote %]">
- [%- name FILTER html %]</a>' has been created.</p>
+ [%- product.name FILTER url_quote %]&amp;component=[% comp.name FILTER url_quote %]">
+ [%- comp.name FILTER html %]</a>' has been created.</p>
[% PROCESS admin/components/footer.html.tmpl %]
diff --git a/template/en/default/admin/components/deleted.html.tmpl b/template/en/default/admin/components/deleted.html.tmpl
index 83c006869..2b89ac0f3 100644
--- a/template/en/default/admin/components/deleted.html.tmpl
+++ b/template/en/default/admin/components/deleted.html.tmpl
@@ -20,27 +20,25 @@
#%]
[%# INTERFACE:
- # name: string; the name of the deleted component.
- #
- # product: string; the name of the product the component belonged to
- #
- # deleted_bug_count: number; the number of bugs which were deleted
- # (if bug deletion is allowed)
+ # comp: object; Bugzilla::Component object representing the component the
+ # user deleted.
+ # product: object; Bugzilla::Product object representing the product to
+ # which the component belongs.
#%]
-[% title = BLOCK %]Deleted Component '[% name FILTER html %]' from Product
- '[% product FILTER html %]'[% END %]
+[% title = BLOCK %]Deleted Component '[% comp.name FILTER html %]' from Product
+ '[% product.name FILTER html %]'[% END %]
[% PROCESS global/header.html.tmpl
title = title
%]
<p>
-[% IF deleted_bug_count %]
- [% deleted_bug_count %]
- [%- IF deleted_bug_count > 1 %]
- [% terms.bugs %]
+[% IF comp.bug_count %]
+ [% comp.bug_count FILTER none %]
+ [%- IF comp.bug_count > 1 %]
+ [%+ terms.bugs %]
[% ELSE %]
- [% terms.bug %]
+ [%+ terms.bug %]
[% END %]
deleted.
</p><p>
@@ -52,7 +50,7 @@
<p>Flag inclusions and exclusions deleted.</p>
-<p>Component '[% name FILTER html %]' deleted.</p>
+<p>Component '[% comp.name FILTER html %]' deleted.</p>
[% PROCESS admin/components/footer.html.tmpl
no_edit_component_link = 1
diff --git a/template/en/default/admin/components/edit.html.tmpl b/template/en/default/admin/components/edit.html.tmpl
index 920ad1ff6..22b7295dd 100644
--- a/template/en/default/admin/components/edit.html.tmpl
+++ b/template/en/default/admin/components/edit.html.tmpl
@@ -22,7 +22,7 @@
[%# INTERFACE:
# comp: object; Bugzilla::Component object representing the component the
# user wants to edit.
- # prod: object; Bugzilla::Product object representing the product to
+ # product: object; Bugzilla::Product object representing the product to
# which the component belongs.
#%]
@@ -88,7 +88,7 @@
<a title="Bugs in component '[% comp.name FILTER html %]'"
href="buglist.cgi?component=
[%- comp.name FILTER url_quote %]&amp;product=
- [%- prod.name FILTER url_quote %]">[% comp.bug_count %]</a>
+ [%- product.name FILTER url_quote %]">[% comp.bug_count %]</a>
[% ELSE %]
None
[% END %]
@@ -99,18 +99,16 @@
<input type="hidden" name="action" value="update">
<input type="hidden" name="componentold" value="[% comp.name FILTER html %]">
- <input type="hidden" name="product" value="[% prod.name FILTER html %]">
+ <input type="hidden" name="product" value="[% product.name FILTER html %]">
<input type="submit" value="Update"> or <a
href="editcomponents.cgi?action=del&amp;product=
- [%- prod.name FILTER url_quote %]&amp;component=
+ [%- product.name FILTER url_quote %]&amp;component=
[%- comp.name FILTER url_quote %]">Delete</a> this component.
</form>
[% PROCESS admin/components/footer.html.tmpl
no_edit_component_link = 1
- name = comp.name
- product = prod.name
%]
[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/admin/components/footer.html.tmpl b/template/en/default/admin/components/footer.html.tmpl
index 1f58622ae..dfc720921 100644
--- a/template/en/default/admin/components/footer.html.tmpl
+++ b/template/en/default/admin/components/footer.html.tmpl
@@ -20,10 +20,9 @@
#%]
[%# INTERFACE:
- # name: string; the name of the component
- #
- # product: string; the name of the product which the component
- # belongs/belonged to
+ # comp: object; Bugzilla::Component object representing the component
+ # product: object; Bugzilla::Product object representing the product to
+ # which the component belongs.
#%]
<p>
@@ -31,26 +30,26 @@
<hr>
Edit
-[% IF name && !no_edit_component_link %]
+[% IF comp && !no_edit_component_link %]
component <a
- title="Edit Component '[% name FILTER html %]'"
+ title="Edit Component '[% comp.name FILTER html %]'"
href="editcomponents.cgi?action=edit&amp;product=
- [%- product FILTER url_quote %]&amp;component=[% name FILTER url_quote %]">
- '[% name FILTER html %]'</a>
+ [%- product.name FILTER url_quote %]&amp;component=[% comp.name FILTER url_quote %]">
+ '[% comp.name FILTER html %]'</a>
or edit
[% END %]
[% IF !no_edit_other_components_link %]
other components of product <a
- title="Choose a component from product '[% product FILTER html %]' to edit"
+ title="Choose a component from product '[% product.name FILTER html %]' to edit"
href="editcomponents.cgi?product=
- [%- product FILTER url_quote %]">'[% product FILTER html %]'</a>,
+ [%- product.name FILTER url_quote %]">'[% product.name FILTER html %]'</a>,
or edit
[% END %]
product <a
- title="Edit Product '[% product FILTER html %]'"
+ title="Edit Product '[% product.name FILTER html %]'"
href="editproducts.cgi?action=edit&amp;product=
- [%- product FILTER url_quote %]">'[% product FILTER html %]'</a>.
+ [%- product.name FILTER url_quote %]">'[% product.name FILTER html %]'</a>.
</p>
diff --git a/template/en/default/admin/components/list.html.tmpl b/template/en/default/admin/components/list.html.tmpl
index 0b4998679..c0862eb73 100644
--- a/template/en/default/admin/components/list.html.tmpl
+++ b/template/en/default/admin/components/list.html.tmpl
@@ -21,25 +21,25 @@
#%]
[%# INTERFACE:
- # components: array of component objects
# showbugcounts: if defined, then bug counts should be included in the table
- # product: string; the name of the product we are editing components for
+ # product: object; Bugzilla::Product object representing the product to
+ # which the component belongs.
#%]
[% PROCESS global/variables.none.tmpl %]
[% title = BLOCK %]Select component of product
- '[% product FILTER html %]'[% END %]
+ '[% product.name FILTER html %]'[% END %]
[% PROCESS global/header.html.tmpl
title = title
%]
[% edit_contentlink = BLOCK %]editcomponents.cgi?action=edit&amp;product=
- [%- product FILTER url_quote %]&amp;component=%%name%%[% END %]
+ [%- product.name FILTER url_quote %]&amp;component=%%name%%[% END %]
[% delete_contentlink = BLOCK %]editcomponents.cgi?action=del&amp;product=
- [%- product FILTER url_quote %]&amp;component=%%name%%[% END %]
+ [%- product.name FILTER url_quote %]&amp;component=%%name%%[% END %]
[% bug_count_contentlink = BLOCK %]buglist.cgi?component=%%name%%&amp;product=
- [%- product FILTER url_quote %][% END %]
+ [%- product.name FILTER url_quote %][% END %]
[% columns = [
@@ -90,7 +90,7 @@
[% overrides.initialowner = [] %]
[% overrides.initialqacontact = [] %]
-[% FOREACH component = components %]
+[% FOREACH component = product.components %]
[% overrides.initialowner.push({
match_value => component.name
match_field => 'name'
@@ -109,16 +109,16 @@
[% PROCESS admin/table.html.tmpl
columns = columns
- data = components
+ data = product.components
overrides = overrides
%]
-<p><a href="editcomponents.cgi?action=add&amp;product=[% product FILTER url_quote %]">Add</a>
- a new component to product '[% product FILTER html %]'</p>
+<p><a href="editcomponents.cgi?action=add&amp;product=[% product.name FILTER url_quote %]">Add</a>
+ a new component to product '[% product.name FILTER html %]'</p>
[% IF ! showbugcounts %]
- <p><a href="editcomponents.cgi?product=[% product FILTER url_quote %]&amp;showbugcounts=1">
+ <p><a href="editcomponents.cgi?product=[% product.name FILTER url_quote %]&amp;showbugcounts=1">
Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %]
diff --git a/template/en/default/admin/components/updated.html.tmpl b/template/en/default/admin/components/updated.html.tmpl
index b4c4fea3c..e05bc0973 100644
--- a/template/en/default/admin/components/updated.html.tmpl
+++ b/template/en/default/admin/components/updated.html.tmpl
@@ -23,22 +23,23 @@
#
# 'updated_XXX' variables are booleans, and are defined if the
# 'XXX' field was updated during the edit just being handled.
- # Variables called just 'XXX' are strings, and are the _new_ contents
- # of the fields.
#
- # name & updated_name: the name of the component
+ # updated_name: the name of the component updated
#
- # description & updated_description: the component description
+ # updated_description: the component description updated
#
- # initialowner & updated_initialowner: the default assignee
+ # updated_initialowner: the default assignee updated
#
- # initialqacontact & updated_initialqacontact: the default qa contact
+ # updated_initialqacontact: the default qa contact updated
#
- # product: string; the name of the product the component belongs to
+ # comp: object; Bugzilla::Component object representing the component
+ # user updated.
+ # product: object; Bugzilla::Product object representing the product to
+ # which the component belongs.
#%]
-[% title = BLOCK %]Updating Component '[% name FILTER html %]' of Product
- '[% product FILTER html %]'[% END %]
+[% title = BLOCK %]Updating Component '[% comp.name FILTER html %]' of Product
+ '[% product.name FILTER html %]'[% END %]
[% PROCESS global/header.html.tmpl
title = title
%]
@@ -48,19 +49,19 @@
<table>
<tr>
<td>Updated description to:</td>
- <td>'[% description FILTER html %]'</td>
+ <td>'[% comp.description FILTER html %]'</td>
</tr>
</table>
[% END %]
[% IF updated_initialowner %]
- <p>Updated Default Assignee to: '[% initialowner FILTER html %]'.</p>
+ <p>Updated Default Assignee to: '[% comp.initialowner FILTER html %]'.</p>
[% END %]
[% IF updated_initialqacontact %]
<p>
[% IF initialqacontact %]
- Updated Default QA Contact to '[% initialqacontact FILTER html %]'.
+ Updated Default QA Contact to '[% comp.initialqacontact FILTER html %]'.
[% ELSE %]
Removed Default QA Contact.
[% END %]
@@ -68,12 +69,12 @@
[% END %]
[% IF updated_name %]
- <p>Updated Component name to: '[% name FILTER html %]'.</p>
+ <p>Updated Component name to: '[% comp.name FILTER html %]'.</p>
[% END %]
[% UNLESS updated_description || updated_initialowner ||
updated_initialqacontact || updated_name %]
- <p>Nothing changed for component '[% name FILTER html %]'.
+ <p>Nothing changed for component '[% comp.name FILTER html %]'.
[% END %]