aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/email
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-04-05 21:31:10 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-04-05 21:31:10 +0200
commit467bef6d90360a43bfdcaf2d24985cb171435bf9 (patch)
tree427413c3e153d9bafcb6dfd1e80402cea1706cf8 /template/en/default/email
parent038774eddcba5451d6e6362b851d859d1073870c (diff)
downloadbugs-467bef6d90360a43bfdcaf2d24985cb171435bf9.tar
bugs-467bef6d90360a43bfdcaf2d24985cb171435bf9.tar.gz
bugs-467bef6d90360a43bfdcaf2d24985cb171435bf9.tar.bz2
bugs-467bef6d90360a43bfdcaf2d24985cb171435bf9.tar.xz
bugs-467bef6d90360a43bfdcaf2d24985cb171435bf9.zip
Bug 1143864: Replace |FILTER bug_link| in loops by direct calls to bug/link.html.tmpl to improve performance
r=dkl a=sgreen
Diffstat (limited to 'template/en/default/email')
-rw-r--r--template/en/default/email/bugmail.html.tmpl23
1 files changed, 12 insertions, 11 deletions
diff --git a/template/en/default/email/bugmail.html.tmpl b/template/en/default/email/bugmail.html.tmpl
index 9473a4459..fd348a656 100644
--- a/template/en/default/email/bugmail.html.tmpl
+++ b/template/en/default/email/bugmail.html.tmpl
@@ -20,9 +20,10 @@
[% FOREACH comment = new_comments.reverse %]
<div>
[% IF comment.count %]
- <b>[% "Comment # ${comment.count}" FILTER bug_link(bug,
- {comment_num => comment.count, full_url => 1, user => to_user}) FILTER none %]
- on [% "$terms.bug $bug.id" FILTER bug_link(bug, { full_url => 1, user => to_user }) FILTER none %]
+ <b>[% INCLUDE bug/link.html.tmpl bug = bug, link_text = "Comment # ${comment.count}",
+ comment_num = comment.count, full_url = 1, user = to_user %]
+ on [% INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.bug $bug.id",
+ full_url = 1, user = to_user %]
from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]</b>
[% END %]
<pre>[% comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment, to_user) %]</pre>
@@ -75,14 +76,14 @@
[% SET in_table = 0 %]
[% END %]
[% IF change.blocker %]
- [% "${terms.Bug} ${bug.id}" FILTER bug_link(bug, {full_url => 1, user => to_user}) FILTER none %]
- depends on
- [%+ "${terms.bug} ${change.blocker.id}"
- FILTER bug_link(change.blocker, {full_url => 1, user => to_user}) FILTER none %],
- which changed state.
+ [% INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.Bug $bug.id", full_url = 1, user = to_user %]
+ depends on
+ [%+ INCLUDE bug/link.html.tmpl bug = change.blocker, link_text = "$terms.bug $change.blocker.id",
+ full_url = 1, user = to_user %],
+ which changed state.
[% ELSE %]
- [% INCLUDE global/user.html.tmpl user = to_user, who = change.who %] changed
- [%+ "${terms.bug} ${bug.id}" FILTER bug_link(bug, {full_url => 1, user => to_user}) FILTER none %]
+ [% INCLUDE global/user.html.tmpl user = to_user, who = change.who %] changed
+ [%+ INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.bug $bug.id", full_url = 1, user = to_user %]
[% END %]
<br>
[% IF in_table == 0 %]
@@ -106,7 +107,7 @@
<th>[% field_label FILTER html %]</th>
<td>
[% IF change.field_name == "bug_id" %]
- [% new_value FILTER bug_link(bug, {full_url => 1, user => to_user}) FILTER none %]
+ [% INCLUDE bug/link.html.tmpl bug = bug, link_text = new_value, full_url = 1, user = to_user %]
[% ELSE %]
[% new_value FILTER html %]
[% END %]