summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-11-26 16:33:44 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-11-26 16:33:44 +0100
commitf36dc49c5b475b19201113f8a37cd5b226eed7d4 (patch)
tree2ca93ee6276b3a9b33cd23040c709e28990a397a /template/en/default
parent79a12728c9f7ee27c427d93967f5c38bc467d297 (diff)
downloadbugzilla-f36dc49c5b475b19201113f8a37cd5b226eed7d4.tar.gz
bugzilla-f36dc49c5b475b19201113f8a37cd5b226eed7d4.tar.xz
Bug 812543 - Back port patch from bug 797636 to bmo/4.2 to bring in performance enhancements
r=glob
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/bug/time.html.tmpl8
-rw-r--r--template/en/default/filterexceptions.pl3
-rw-r--r--template/en/default/list/table.html.tmpl44
3 files changed, 26 insertions, 29 deletions
diff --git a/template/en/default/bug/time.html.tmpl b/template/en/default/bug/time.html.tmpl
index e070e7de0..c58675b96 100644
--- a/template/en/default/bug/time.html.tmpl
+++ b/template/en/default/bug/time.html.tmpl
@@ -18,7 +18,7 @@
# Contributor(s): Jeff Hedlund <jeff.hedlund@matrixsi.com>
#
#%]
-
+
[% BLOCK formattimeunit %]
[%# INTERFACE:
# time_unit: the number converting, converts to 2 decimal places
@@ -26,11 +26,7 @@
# 1 decimal place
#%]
[% time_unit = time_unit FILTER format('%.2f') %]
- [% IF time_unit.match('0\Z') %]
- [% time_unit FILTER format('%.1f') %]
- [% ELSE %]
- [% time_unit FILTER format('%.2f') %]
- [% END %]
+ [% time_unit.replace('0\Z', '') %]
[% END %]
[% BLOCK calculatepercentage %]
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index 917dc85ae..08757cfe7 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -280,8 +280,7 @@
'bug/time.html.tmpl' => [
- 'time_unit FILTER format(\'%.1f\')',
- 'time_unit FILTER format(\'%.2f\')',
+ "time_unit.replace('0\\Z', '')",
'(act / (act + rem)) * 100
FILTER format("%d")',
],
diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl
index 547a9cbe3..b4c36f575 100644
--- a/template/en/default/list/table.html.tmpl
+++ b/template/en/default/list/table.html.tmpl
@@ -42,6 +42,7 @@
[% field_descs.reporter_realname = field_descs.reporter %]
[% field_descs.qa_contact_realname = field_descs.qa_contact %]
+[%# Setting maxlength => 0 means no limit. We set it for performance reasons. %]
[% abbrev =
{
"bug_severity" => { maxlength => 3 , title => "Sev" } ,
@@ -55,19 +56,19 @@
"qa_contact" => { maxlength => 30 , ellipsis => "..." , title => "QAContact" } ,
"qa_contact_realname" => { maxlength => 20 , ellipsis => "..." , title => "QAContact" } ,
"resolution" => { maxlength => 4 } ,
- "short_desc" => { wrap => 1 } ,
+ "short_desc" => { maxlength => 0, wrap => 1 } ,
"short_short_desc" => { maxlength => 60 , ellipsis => "..." , wrap => 1 } ,
- "status_whiteboard" => { title => "Whiteboard" , wrap => 1 } ,
- "keywords" => { wrap => 1 } ,
- "flagtypes.name" => { wrap => 1 } ,
+ "status_whiteboard" => { maxlength => 0, title => "Whiteboard" , wrap => 1 } ,
+ "keywords" => { maxlength => 0, wrap => 1 } ,
+ "flagtypes.name" => { maxlength => 0, wrap => 1 } ,
"component" => { maxlength => 8 , title => "Comp" } ,
"product" => { maxlength => 8 } ,
"version" => { maxlength => 5 , title => "Vers" } ,
"op_sys" => { maxlength => 4 } ,
"bug_file_loc" => { maxlength => 30 } ,
- "target_milestone" => { title => "TargetM" } ,
- "longdescs.count" => { title => "# Comments" },
- "percentage_complete" => { format_value => "%d %%" } ,
+ "target_milestone" => { maxlength => 0, title => "TargetM" } ,
+ "longdescs.count" => { maxlength => 0, title => "# Comments" },
+ "percentage_complete" => { maxlength => 0, format_value => "%d %%" } ,
}
%]
@@ -157,13 +158,13 @@
[% END %]
[% BLOCK order_arrow %]
- [% IF order.match("^$id DESC") %]
+ [% IF order.search("^$id DESC") %]
<span class="bz_sort_order_primary">&#x25BC;</span>
- [% ELSIF order.match("^$id(,\\s*|\$)") %]
+ [% ELSIF order.search("^$id(,\\s*|\$)") %]
<span class="bz_sort_order_primary">&#x25B2;</span>
- [% ELSIF order.match("\\b$id DESC") %]
+ [% ELSIF order.search("\\b$id DESC") %]
<span class="bz_sort_order_secondary">&#x25BC;</span>
- [% ELSIF order.match("\\b$id(,\\s*|\$)") %]
+ [% ELSIF order.search("\\b$id(,\\s*|\$)") %]
<span class="bz_sort_order_secondary">&#x25B2;</span>
[% END %]
[% END %]
@@ -199,7 +200,8 @@
</td>
[% FOREACH column = displaycolumns %]
- <td [% 'style="white-space: nowrap"' IF NOT abbrev.$column.wrap %]
+ [% col_abbrev = abbrev.$column %]
+ <td [% 'style="white-space: nowrap"' IF NOT col_abbrev.wrap %]
class="bz_[% column FILTER css_class_quote %]_column"
[% SWITCH column %]
[% CASE 'opendate' %]
@@ -211,11 +213,11 @@
sorttable_customkey="[% sortkey FILTER html %]"
[% END %]
>
- [% IF abbrev.$column.maxlength %]
+ [% IF col_abbrev.maxlength %]
<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 -%]
+ [% IF col_abbrev.format_value %]
+ [%- bug.$column FILTER format(col_abbrev.format_value) FILTER html -%]
[% ELSIF column == 'actual_time' ||
column == 'remaining_time' ||
column == 'estimated_time' %]
@@ -223,16 +225,16 @@
[%# 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$') %]
- [% bug.${login_column}.truncate(abbrev.$column.maxlength,
- abbrev.$column.ellipsis) FILTER html %]
+ [% bug.${login_column}.truncate(col_abbrev.maxlength,
+ col_abbrev.ellipsis) FILTER html %]
[% ELSIF column == 'short_desc' || column == "short_short_desc" %]
<a href="show_bug.cgi?id=[% bug.bug_id FILTER html %]">
- [%- bug.$column.truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%]
+ [%- bug.$column.truncate(col_abbrev.maxlength, col_abbrev.ellipsis) FILTER html -%]
</a>
[% ELSE %]
- [%- display_value(column, bug.$column).truncate(abbrev.$column.maxlength, abbrev.$column.ellipsis) FILTER html -%]
+ [%- display_value(column, bug.$column).truncate(col_abbrev.maxlength, col_abbrev.ellipsis) FILTER html -%]
[% END %]
- [% IF abbrev.$column.maxlength %]
+ [% IF col_abbrev.maxlength %]
</span>
[% END %]
</td>
@@ -240,7 +242,7 @@
</tr>
- [% IF loop.last() && time_info.time_present == 1 %]
+ [% IF time_info.time_present %]
[% PROCESS time_summary_line %]
[% END %]