summaryrefslogtreecommitdiffstats
path: root/template/en/default/list
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-11-18 08:04:57 +0100
committermkanat%bugzilla.org <>2009-11-18 08:04:57 +0100
commita44e152480c9c22ca9b3a89da774317c5590d21b (patch)
tree035210618c0987beaffc953cbf09611866e0d3e5 /template/en/default/list
parentbc19f61c0c33e71a00dcc8e4ca3e791a9e3b661d (diff)
downloadbugzilla-a44e152480c9c22ca9b3a89da774317c5590d21b.tar.gz
bugzilla-a44e152480c9c22ca9b3a89da774317c5590d21b.tar.xz
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/list')
-rw-r--r--template/en/default/list/edit-multiple.html.tmpl2
-rw-r--r--template/en/default/list/list.atom.tmpl10
-rw-r--r--template/en/default/list/list.html.tmpl12
-rw-r--r--template/en/default/list/table.html.tmpl16
4 files changed, 10 insertions, 30 deletions
diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl
index 528d1bd68..11f3491f2 100644
--- a/template/en/default/list/edit-multiple.html.tmpl
+++ b/template/en/default/list/edit-multiple.html.tmpl
@@ -368,7 +368,7 @@
</option>
[% FOREACH menuitem = menuitems %]
[% IF property %][% menuitem = menuitem.$property %][% END %]
- <option value="[% menuitem FILTER html %]">[% menuitem FILTER html %]</option>
+ <option value="[% menuitem FILTER html %]">[% display_value(menuname, menuitem) FILTER html %]</option>
[% END %]
</select>
[% END %]
diff --git a/template/en/default/list/list.atom.tmpl b/template/en/default/list/list.atom.tmpl
index 5086a044c..3c504f9c9 100644
--- a/template/en/default/list/list.atom.tmpl
+++ b/template/en/default/list/list.atom.tmpl
@@ -23,7 +23,7 @@
# This is a template for generating an Atom representation of a buglist.
#%]
-[% PROCESS global/variables.none.tmpl %]
+[% PROCESS "global/field-descs.none.tmpl" %]
[% DEFAULT title = "$terms.Bugzilla $terms.Bugs" %]
@@ -71,16 +71,16 @@
<td>[% bug.reporter_realname FILTER html %]</td>
</tr><tr class="bz_feed_bug_status">
<td>[% columns.bug_status.title FILTER html %]</td>
- <td>[% bug.bug_status FILTER html %]</td>
+ <td>[% display_value("bug_status", bug.bug_status) FILTER html %]</td>
</tr><tr class="bz_feed_resolution">
<td>[% columns.resolution.title FILTER html %] </td>
- <td>[% bug.resolution FILTER html %]</td>
+ <td>[% display_value("resolution", bug.resolution) FILTER html %]</td>
</tr><tr class="bz_feed_priority">
<td>[% columns.priority.title FILTER html %]</td>
- <td>[% bug.priority FILTER html %]</td>
+ <td>[% display_value("priority", bug.priority) FILTER html %]</td>
</tr><tr class="bz_feed_severity">
<td>[% columns.bug_severity.title FILTER html %] </td>
- <td>[% bug.bug_severity FILTER html %]</td>
+ <td>[% display_value("bug_severity", bug.bug_severity) FILTER html %]</td>
[% IF Param("usetargetmilestone") %]
</tr><tr class="bz_feed_target_milestone">
<td>[% columns.target_milestone.title FILTER html %]</td>
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index 6d7f80585..1e9a9e998 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -91,16 +91,8 @@
[% IF shown_types.contains(desc_item.type) || debug %]
([% search_descs.${desc_item.type} FILTER html %])
[% END %]
- [% IF desc_item.field == 'bug_status' %]
- [% FOREACH status IN desc_item.value.split(',') %]
- [%+ display_value("bug_status", status) FILTER html %][% ',' UNLESS loop.last %]
- [% END %]
- [% ELSIF desc_item.field == 'resolution' %]
- [% FOREACH resolution IN desc_item.value.split(',') %]
- [%+ display_value("resolution", resolution) FILTER html %][% ',' UNLESS loop.last %]
- [% END %]
- [% ELSE %]
- [%+ desc_item.value FILTER html %]
+ [% FOREACH val IN desc_item.value.split(',') %]
+ [%+ display_value(desc_item.field, val) FILTER html %][% ',' UNLESS loop.last %]
[% END %]
[% IF debug %]
(<code>[% desc_item.term FILTER html %]</code>)
diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl
index 6ca90b921..f6a871e19 100644
--- a/template/en/default/list/table.html.tmpl
+++ b/template/en/default/list/table.html.tmpl
@@ -201,14 +201,7 @@
[% FOREACH column = displaycolumns %]
<td [% 'style="white-space: nowrap"' IF NOT abbrev.$column.wrap %]>
[% IF abbrev.$column.maxlength %]
- <span title="
- [%- IF column == 'bug_status' %]
- [%- display_value("bug_status", bug.$column) FILTER html %]
- [% ELSIF column == 'resolution' %]
- [%- display_value("resolution", bug.$column) FILTER html %]
- [% ELSE %]
- [%- bug.$column FILTER html %]
- [% END %]">
+ <span title="[%- display_value(column, bug.$column) FILTER html %]">
[% END %]
[% IF abbrev.$column.format_value %]
[%- bug.$column FILTER format(abbrev.$column.format_value) FILTER html -%]
@@ -216,11 +209,6 @@
column == 'remaining_time' ||
column == 'estimated_time' %]
[% PROCESS formattimeunit time_unit=bug.$column %]
- [% ELSIF column == 'bug_status' %]
- [%- display_value("bug_status", bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %]
- [% ELSIF column == 'resolution' %]
- [%- display_value("resolution", bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html %]
-
[%# Display the login name of the user if their real name is empty. %]
[% ELSIF column.match('_realname$') && bug.$column == '' %]
[% SET login_column = column.remove('_realname$') %]
@@ -228,7 +216,7 @@
abbrev.$column.ellipsis) FILTER html %]
[% ELSE %]
- [%- bug.$column.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%]
+ [%- display_value(column, bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%]
[% END %]
[% IF abbrev.$column.maxlength %]
</span>