diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2012-10-04 13:23:52 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2012-10-04 13:23:52 +0200 |
commit | 658c6813fa1bd10d4fd2add711a660720d6fa44b (patch) | |
tree | da3f443c3a2e23b08f8190bbe4a82716b28307b4 /template | |
parent | 58f4a0a76905da82e034fcc88ec8f9a01d5d4b44 (diff) | |
download | bugzilla-658c6813fa1bd10d4fd2add711a660720d6fa44b.tar.gz bugzilla-658c6813fa1bd10d4fd2add711a660720d6fa44b.tar.xz |
Bug 796072: Make admin/table.html.tmpl a bit faster
r=dkl a=LpSolit
Diffstat (limited to 'template')
-rw-r--r-- | template/en/default/admin/table.html.tmpl | 43 | ||||
-rw-r--r-- | template/en/default/filterexceptions.pl | 2 |
2 files changed, 15 insertions, 30 deletions
diff --git a/template/en/default/admin/table.html.tmpl b/template/en/default/admin/table.html.tmpl index 0f572d590..80f6417a3 100644 --- a/template/en/default/admin/table.html.tmpl +++ b/template/en/default/admin/table.html.tmpl @@ -125,41 +125,26 @@ [% IF class %] class="[% class FILTER html %]" [% END %]> [% IF contentlink %] - [% link_uri = contentlink %] - [% WHILE link_uri.search('%%(.+?)%%')%] - [% FOREACH m = link_uri.match('%%(.+?)%%') %] - [% IF row.$m.defined %] - [% replacement_value = FILTER uri; row.$m; END %] - [% ELSE %] - [% replacement_value = "" %] - [% END %] - [% link_uri = link_uri.replace("%%$m%%", replacement_value) %] - [% END %] + [% FOREACH m = contentlink.match('%%(.+?)%%', 1) %] + [% replacement_value = FILTER uri; row.$m; END %] + [% contentlink = contentlink.replace("%%$m%%", replacement_value) %] [% END %] - <a href="[% link_uri %]"> + <a href="[% contentlink %]"> [% END %] - + [% IF content_use_field %] - [% colname = row.${c.name} %] - [% field_descs.${colname} FILTER html %] + [% colname = row.${c.name} %] + [% field_descs.${colname} FILTER html %] [% ELSIF content %] - [% content FILTER html_light %] + [% content FILTER html_light %] + [% ELSIF yesno_field %] + [% row.${c.name} ? "Yes" : "No" %] + [% ELSIF allow_html_content %] + [% row.${c.name} FILTER html_light %] [% ELSE %] - [% IF yesno_field %] - [% IF row.${c.name} %] - Yes - [% ELSE %] - No - [% END %] - [% ELSE %] - [% IF allow_html_content %] - [% row.${c.name} FILTER html_light %] - [% ELSE %] - [% row.${c.name} FILTER html %] - [% END %] - [% END %] + [% row.${c.name} FILTER html %] [% END %] - + [% IF contentlink %] </a> [% END %] diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl index 00ae28f08..7544b6808 100644 --- a/template/en/default/filterexceptions.pl +++ b/template/en/default/filterexceptions.pl @@ -348,7 +348,7 @@ ], 'admin/table.html.tmpl' => [ - 'link_uri' + 'contentlink' ], 'admin/custom_fields/cf-js.js.tmpl' => [ |