summaryrefslogtreecommitdiffstats
path: root/template/en/default/reports
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-01-29 22:22:19 +0100
committermkanat%bugzilla.org <>2009-01-29 22:22:19 +0100
commitfc293fbd39f14308fbccd0cf9b523664ae813761 (patch)
tree2eff5448dfbcf0fb0a0671fad80da0752db8f727 /template/en/default/reports
parent25e6018ac8a6cf1a99b299fe60ce6c5b1e1d61e6 (diff)
downloadbugzilla-fc293fbd39f14308fbccd0cf9b523664ae813761.tar.gz
bugzilla-fc293fbd39f14308fbccd0cf9b523664ae813761.tar.xz
Bug 219021: Only display email addresses to logged-in users
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'template/en/default/reports')
-rw-r--r--template/en/default/reports/components.html.tmpl6
-rw-r--r--template/en/default/reports/report-table.csv.tmpl39
-rw-r--r--template/en/default/reports/report-table.html.tmpl34
-rw-r--r--template/en/default/reports/report.html.tmpl2
4 files changed, 45 insertions, 36 deletions
diff --git a/template/en/default/reports/components.html.tmpl b/template/en/default/reports/components.html.tmpl
index 351c7d01b..eb08a35ac 100644
--- a/template/en/default/reports/components.html.tmpl
+++ b/template/en/default/reports/components.html.tmpl
@@ -74,13 +74,11 @@
<a name="[% comp.name FILTER html %]">[% comp.name FILTER html %]</a>
</td>
<td>
- <a href="mailto:[% comp.default_assignee.email FILTER html %]">
- [% comp.default_assignee.login FILTER html %]</a>
+ [% INCLUDE global/user.html.tmpl who = comp.default_assignee %]
</td>
[% IF Param("useqacontact") %]
<td>
- <a href="mailto:[% comp.default_qa_contact.email FILTER html %]">
- [% comp.default_qa_contact.login FILTER html %]</a>
+ [% INCLUDE global/user.html.tmpl who = comp.default_qa_contact %]
</td>
[% END %]
</tr>
diff --git a/template/en/default/reports/report-table.csv.tmpl b/template/en/default/reports/report-table.csv.tmpl
index cf3774973..0f315cc02 100644
--- a/template/en/default/reports/report-table.csv.tmpl
+++ b/template/en/default/reports/report-table.csv.tmpl
@@ -30,7 +30,14 @@
[% row_field_disp = field_descs.$row_field || row_field %]
[% IF tbl_field %]
- [% tbl_field_disp FILTER csv %]: [% tbl FILTER csv %]
+ [% IF tbl_field == 'assigned_to' OR tbl_field == 'reporter'
+ OR tbl_field == 'qa_contact'
+ %]
+ [% tbl_disp = tbl FILTER email %]
+ [% ELSE %]
+ [% tbl_disp = tbl %]
+ [% END %]
+ [% tbl_field_disp FILTER csv %]: [% tbl_disp FILTER csv %]
[% END %]
[% IF row_field %]
[% row_field_disp FILTER csv %]
@@ -40,26 +47,14 @@
[% IF col_field -%]
[% FOREACH col = col_names -%]
[% colsepchar %]
- [% IF col_field == 'bug_status' %]
- [% get_status(col) FILTER csv -%]
- [% ELSIF col_field == 'resolution' %]
- [% get_resolution(col) FILTER csv -%]
- [% ELSE %]
- [% col FILTER csv -%]
- [% END %]
+ [% PROCESS value_display value = col field = col_field %]
[% END -%]
[% ELSE -%]
[% colsepchar %][% num_bugs FILTER csv %]
[% END %]
[% FOREACH row = row_names %]
- [% IF row_field == 'bug_status' %]
- [% get_status(row) FILTER csv -%]
- [% ELSIF row_field == 'resolution' %]
- [% get_resolution(row) FILTER csv -%]
- [% ELSE %]
- [% row FILTER csv -%]
- [% END %]
+ [% PROCESS value_display value = row field = row_field %]
[% FOREACH col = col_names %]
[% colsepchar %]
[% IF data.$tbl AND data.$tbl.$col AND data.$tbl.$col.$row %]
@@ -70,3 +65,17 @@
[% END %]
[% END %]
+
+[% BLOCK value_display %]
+ [% SET disp_value = value %]
+ [% IF field == 'bug_status' %]
+ [% SET disp_value = get_status(value) %]
+ [% ELSIF field == 'resolution' %]
+ [% SET disp_value = get_resolution(value) %]
+ [% ELSIF field == 'assigned_to' OR field == 'reporter'
+ OR field == 'qa_contact'
+ %]
+ [% disp_value = value FILTER email %]
+ [% END %]
+ [% disp_value FILTER csv %]
+[% END %]
diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl
index 0ebe631d1..6c5d6ede2 100644
--- a/template/en/default/reports/report-table.html.tmpl
+++ b/template/en/default/reports/report-table.html.tmpl
@@ -44,7 +44,7 @@
[% END %]
[% IF tbl_field %]
- <h2>[% tbl_disp FILTER html %]</h2>
+ <h2>[% tbl_disp FILTER email FILTER html %]</h2>
[% END %]
<table>
@@ -79,13 +79,7 @@
[% col_idx = 1 - col_idx %]
<td class="[% classes.$row_idx.$col_idx %]">
- [% IF col_field == 'bug_status' %]
- [% get_status(col) FILTER html FILTER replace('^ $','&nbsp;') %]
- [% ELSIF col_field == 'resolution' %]
- [% get_resolution(col) FILTER html FILTER replace('^ $','&nbsp;') %]
- [% ELSE %]
- [% col FILTER html FILTER replace('^ $','&nbsp;') %]
- [% END %]
+ [% PROCESS value_display value = col field = col_field %]
</td>
[% END %]
<td class="ttotal">
@@ -100,13 +94,7 @@
[% row_idx = 1 - row_idx %]
<tr>
<td class="[% classes.$row_idx.$col_idx %]" align="right">
- [% IF row_field == 'bug_status' %]
- [% get_status(row) FILTER html FILTER replace('^ $','&nbsp;') %]
- [% ELSIF row_field == 'resolution' %]
- [% get_resolution(row) FILTER html FILTER replace('^ $','&nbsp;') %]
- [% ELSE %]
- [% row FILTER html FILTER replace('^ $','&nbsp;') %]
- [% END %]
+ [% PROCESS value_display value = row field = row_field %]
</td>
[% FOREACH col = col_names %]
[% row_total = row_total + data.$tbl.$col.$row %]
@@ -163,4 +151,18 @@
</td>
</tr>
-</table>
+</table>
+
+[% BLOCK value_display %]
+ [% SET disp_value = value %]
+ [% IF field == 'bug_status' %]
+ [% SET disp_value = get_status(value) %]
+ [% ELSIF field == 'resolution' %]
+ [% SET disp_value = get_resolution(value) %]
+ [% ELSIF field == 'assigned_to' OR field == 'reporter'
+ OR field == 'qa_contact'
+ %]
+ [% disp_value = value FILTER email %]
+ [% END %]
+ [% disp_value FILTER html FILTER replace('^ $','&nbsp;') %]
+[% END %]
diff --git a/template/en/default/reports/report.html.tmpl b/template/en/default/reports/report.html.tmpl
index 37af0b300..4f7ee49b6 100644
--- a/template/en/default/reports/report.html.tmpl
+++ b/template/en/default/reports/report.html.tmpl
@@ -96,7 +96,7 @@
[% PROCESS "reports/report-table.html.tmpl" %]
[% ELSE %]
[% IF tbl %]
- <h2>[% tbl_disp FILTER html %]</h2>
+ <h2>[% tbl_disp FILTER email FILTER html %]</h2>
[% END %]
[% imageurl = BLOCK %]report.cgi?[% imagebase FILTER html %]&amp;format=