diff options
author | mkanat%bugzilla.org <> | 2009-11-18 07:04:57 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-11-18 07:04:57 +0000 |
commit | a44e152480c9c22ca9b3a89da774317c5590d21b (patch) | |
tree | 035210618c0987beaffc953cbf09611866e0d3e5 /template/en/default/reports | |
parent | bc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d (diff) | |
download | bugs-a44e152480c9c22ca9b3a89da774317c5590d21b.tar bugs-a44e152480c9c22ca9b3a89da774317c5590d21b.tar.gz bugs-a44e152480c9c22ca9b3a89da774317c5590d21b.tar.bz2 bugs-a44e152480c9c22ca9b3a89da774317c5590d21b.tar.xz bugs-a44e152480c9c22ca9b3a89da774317c5590d21b.zip |
Bug 519142: Replace IF/ELSE statements about bug_status/resolution with just a display_value call, and use display_value in more places to translate field values.
Patch by Vitaly Fedrushkov <vitaly.fedrushkov@gmail.com> r=mkanat, a=mkanat
Diffstat (limited to 'template/en/default/reports')
-rw-r--r-- | template/en/default/reports/duplicates-table.html.tmpl | 6 | ||||
-rw-r--r-- | template/en/default/reports/report-bar.png.tmpl | 24 | ||||
-rw-r--r-- | template/en/default/reports/report-line.png.tmpl | 24 | ||||
-rw-r--r-- | template/en/default/reports/report-pie.png.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/reports/report-table.csv.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/reports/report-table.html.tmpl | 8 |
6 files changed, 17 insertions, 65 deletions
diff --git a/template/en/default/reports/duplicates-table.html.tmpl b/template/en/default/reports/duplicates-table.html.tmpl index f651a7fd4..8950f340a 100644 --- a/template/en/default/reports/duplicates-table.html.tmpl +++ b/template/en/default/reports/duplicates-table.html.tmpl @@ -127,9 +127,9 @@ <td><center>[% bug.delta %]</center></td> <td>[% bug.component FILTER html %]</td> - <td><center>[% bug.bug_severity FILTER html %]</center></td> - <td><center>[% bug.op_sys FILTER html %]</center></td> - <td><center>[% bug.target_milestone FILTER html %]</center></td> + <td><center>[% display_value("bug_severity", bug.bug_severity ) FILTER html %]</center></td> + <td><center>[% display_value("op_sys", bug.op_sys ) FILTER html %]</center></td> + <td><center>[% display_value("target_milestone", bug.target_milestone) FILTER html %]</center></td> <td>[% bug.short_desc FILTER html %]</td> </tr> [% END %] diff --git a/template/en/default/reports/report-bar.png.tmpl b/template/en/default/reports/report-bar.png.tmpl index cb9fab24f..649fba426 100644 --- a/template/en/default/reports/report-bar.png.tmpl +++ b/template/en/default/reports/report-bar.png.tmpl @@ -26,28 +26,12 @@ [% col_field_disp = field_descs.$col_field || col_field %] -[% IF col_field == 'bug_status' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("bug_status", data.0.0.$i) %] - [% END %] +[% FOR i IN [ 0 .. data.0.0.max ] %] + [% data.0.0.$i = display_value(col_field, data.0.0.$i) %] [% END %] -[% IF col_field == 'resolution' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("resolution", data.0.0.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'bug_status' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("bug_status", row_names.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'resolution' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("resolution", row_names.$i) %] - [% END %] +[% FOR i IN [ 0 .. row_names.max ] %] + [% row_names.$i = display_value(row_field, row_names.$i) %] [% END %] [% FILTER null; diff --git a/template/en/default/reports/report-line.png.tmpl b/template/en/default/reports/report-line.png.tmpl index fc8b418af..0edc0fee7 100644 --- a/template/en/default/reports/report-line.png.tmpl +++ b/template/en/default/reports/report-line.png.tmpl @@ -26,28 +26,12 @@ [% col_field_disp = field_descs.$col_field || col_field %] -[% IF col_field == 'bug_status' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("bug_status", data.0.0.$i) %] - [% END %] +[% FOR i IN [ 0 .. data.0.0.max ] %] + [% data.0.0.$i = display_value(col_field, data.0.0.$i) %] [% END %] -[% IF col_field == 'resolution' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("resolution", data.0.0.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'bug_status' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("bug_status", row_names.$i) %] - [% END %] -[% END %] - -[% IF row_field == 'resolution' %] - [% FOR i IN [ 0 .. row_names.max ] %] - [% row_names.$i = display_value("resolution", row_names.$i) %] - [% END %] +[% FOR i IN [ 0 .. row_names.max ] %] + [% row_names.$i = display_value(row_field, row_names.$i) %] [% END %] [% IF cumulate %] diff --git a/template/en/default/reports/report-pie.png.tmpl b/template/en/default/reports/report-pie.png.tmpl index 05a359032..27f5525dd 100644 --- a/template/en/default/reports/report-pie.png.tmpl +++ b/template/en/default/reports/report-pie.png.tmpl @@ -22,16 +22,8 @@ [% col_field_disp = field_descs.$col_field || col_field %] -[% IF col_field == 'bug_status' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("bug_status", data.0.0.$i) %] - [% END %] -[% END %] - -[% IF col_field == 'resolution' %] - [% FOR i IN [ 0 .. data.0.0.max ] %] - [% data.0.0.$i = display_value("resolution", data.0.0.$i) %] - [% END %] +[% FOR i IN [ 0 .. data.0.0.max ] %] + [% data.0.0.$i = display_value(col_field, data.0.0.$i) %] [% END %] [% FILTER null; diff --git a/template/en/default/reports/report-table.csv.tmpl b/template/en/default/reports/report-table.csv.tmpl index 3694b9b35..4d8b50a85 100644 --- a/template/en/default/reports/report-table.csv.tmpl +++ b/template/en/default/reports/report-table.csv.tmpl @@ -67,12 +67,8 @@ [% END %] [% BLOCK value_display %] - [% SET disp_value = value %] - [% IF field == 'bug_status' %] - [% SET disp_value = display_value("bug_status", value) %] - [% ELSIF field == 'resolution' %] - [% SET disp_value = display_value("resolution", value) %] - [% ELSIF field == 'assigned_to' OR field == 'reporter' + [% SET disp_value = display_value(field, value) %] + [% IF field == 'assigned_to' OR field == 'reporter' OR field == 'qa_contact' %] [% disp_value = value FILTER email %] diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl index 6c0abe4d3..76b80f893 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -154,12 +154,8 @@ </table> [% BLOCK value_display %] - [% SET disp_value = value %] - [% IF field == 'bug_status' %] - [% SET disp_value = display_value("bug_status", value) %] - [% ELSIF field == 'resolution' %] - [% SET disp_value = display_value("resolution", value) %] - [% ELSIF field == 'assigned_to' OR field == 'reporter' + [% SET disp_value = display_value(field, value) %] + [% IF field == 'assigned_to' OR field == 'reporter' OR field == 'qa_contact' %] [% disp_value = value FILTER email %] |