aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-03-15 06:37:16 +0000
committerlpsolit%gmail.com <>2006-03-15 06:37:16 +0000
commit577a3b3540fa2331e41f51cc2a2201ce902df289 (patch)
treec96a82490c6640d98c299bfdf7c09a8c01aae4e2 /template/en/default
parent0f3a9f4b320a7068a9f776b3e0ea4dad3df3d448 (diff)
downloadbugs-577a3b3540fa2331e41f51cc2a2201ce902df289.tar
bugs-577a3b3540fa2331e41f51cc2a2201ce902df289.tar.gz
bugs-577a3b3540fa2331e41f51cc2a2201ce902df289.tar.bz2
bugs-577a3b3540fa2331e41f51cc2a2201ce902df289.tar.xz
bugs-577a3b3540fa2331e41f51cc2a2201ce902df289.zip
Bug 311422: describecomponents.cgi and enter_bug.cgi need some cleanup - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=myk
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/filterexceptions.pl2
-rw-r--r--template/en/default/global/choose-product.html.tmpl17
-rw-r--r--template/en/default/reports/components.html.tmpl68
3 files changed, 38 insertions, 49 deletions
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index 3dd671b38..b7e43c3c6 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -96,7 +96,6 @@
'reports/components.html.tmpl' => [
'numcols',
- 'comp.description',
],
'reports/duplicates-table.html.tmpl' => [
@@ -240,7 +239,6 @@
'global/choose-product.html.tmpl' => [
'target',
- 'proddesc.$p',
],
# You are not permitted to add any values here. Everything in this file should
diff --git a/template/en/default/global/choose-product.html.tmpl b/template/en/default/global/choose-product.html.tmpl
index 078b9b700..346a53751 100644
--- a/template/en/default/global/choose-product.html.tmpl
+++ b/template/en/default/global/choose-product.html.tmpl
@@ -20,8 +20,11 @@
#%]
[%# INTERFACE:
- # proddesc: hash. May be empty. The hash keys are the products, and the values
- # are their descriptions.
+ # products: array of product objects. The list of products
+ # the user can enter bugs into.
+ # target: the script that displays this template.
+ # cloned_bug_id: ID of the bug being cloned.
+ # format: the desired format to display the target.
#%]
[% PROCESS global/variables.none.tmpl %]
@@ -39,18 +42,16 @@
<table>
-[% FOREACH p = proddesc.keys.sort %]
+[% FOREACH p = products %]
<tr>
<th align="right" valign="top">
- <a href="[% target %]?product=[% p FILTER url_quote -%]
+ <a href="[% target %]?product=[% p.name FILTER url_quote -%]
[%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER url_quote %][% END -%]
[%- IF format %]&amp;format=[% format FILTER url_quote %][% END %]">
- [% p FILTER html %]</a>:&nbsp;
+ [% p.name FILTER html %]</a>:&nbsp;
</th>
- [% IF proddesc.$p %]
- <td valign="top">[% proddesc.$p %]</td>
- [% END %]
+ <td valign="top">[% p.description FILTER none %]</td>
</tr>
[% END %]
diff --git a/template/en/default/reports/components.html.tmpl b/template/en/default/reports/components.html.tmpl
index 3578a86e4..3950932bd 100644
--- a/template/en/default/reports/components.html.tmpl
+++ b/template/en/default/reports/components.html.tmpl
@@ -20,18 +20,14 @@
#%]
[%# INTERFACE:
- # product: string. The product this is the components list for.
- # components: List of hashes. May be empty. Each hash has four members:
- # name: string. Name of the component.
- # description: string. Description of the component. May contain HTML.
- # initialowner: string. Component's default assignee.
- # initialqacontact: string. Component's default QA contact.
+ # product: object. The product for which we want to display component descriptions.
#%]
-
-[% filtered_product = product FILTER html %]
-[% PROCESS global/header.html.tmpl
- title = "Components for $product"
- h2 = filtered_product %]
+
+[% title = BLOCK %]
+ Components for [% product.name FILTER html %]
+[% END %]
+
+[% PROCESS global/header.html.tmpl title = title %]
[% IF Param("useqacontact") %]
[% numcols = 3 %]
@@ -39,28 +35,24 @@
[% numcols = 2 %]
[% END %]
-[% IF components.size == 0 %]
- This product has no components.
-[% ELSE %]
- <table>
- <tr>
- <th align="left">Component</th>
- <th align="left">Default Assignee</th>
- [% IF Param("useqacontact") %]
- <th align="left">Default QA Contact</th>
- [% END %]
- </tr>
-
- [% FOREACH comp = components %]
- [% INCLUDE describe_comp %]
+<table>
+ <tr>
+ <th align="left">Component</th>
+ <th align="left">Default Assignee</th>
+ [% IF Param("useqacontact") %]
+ <th align="left">Default QA Contact</th>
[% END %]
- <tr>
- <td colspan="[% numcols %]">
- <hr>
- </td>
- </tr>
- </table>
-[% END %]
+ </tr>
+
+ [% FOREACH comp = product.components %]
+ [% INCLUDE describe_comp %]
+ [% END %]
+ <tr>
+ <td colspan="[% numcols %]">
+ <hr>
+ </td>
+ </tr>
+</table>
[% PROCESS global/footer.html.tmpl %]
@@ -79,21 +71,19 @@
<a name="[% comp.name FILTER html %]">[% comp.name FILTER html %]</a>
</td>
<td>
- <a href="mailto:[% comp.initialowner FILTER html %]
- [% Param('emailsuffix') %]">
- [% comp.initialowner FILTER html %]</a>
+ <a href="mailto:[% comp.default_assignee.email FILTER html %]">
+ [% comp.default_assignee.login FILTER html %]</a>
</td>
[% IF Param("useqacontact") %]
<td>
- <a href="mailto:[% comp.initialqacontact FILTER html %]
- [% Param('emailsuffix') %]">
- [% comp.initialqacontact FILTER html %]</a>
+ <a href="mailto:[% comp.default_qa_contact.email FILTER html %]">
+ [% comp.default_qa_contact.login FILTER html %]</a>
</td>
[% END %]
</tr>
<tr>
<td colspan="[% numcols - 1 %]">
- [% comp.description %]
+ [% comp.description FILTER none %]
</td>
</tr>
[% END %]