From 88628a5ca0c8af56440d08b09bb088fc337b3c56 Mon Sep 17 00:00:00 2001 From: Albert Ting Date: Tue, 5 May 2015 13:45:04 +0800 Subject: Bug 1119336: Add css classes to html emails, such as the comment block r=glob,a=glob --- template/en/default/email/bugmail.html.tmpl | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/email/bugmail.html.tmpl b/template/en/default/email/bugmail.html.tmpl index e3b63f10b..abdae8cf8 100644 --- a/template/en/default/email/bugmail.html.tmpl +++ b/template/en/default/email/bugmail.html.tmpl @@ -19,14 +19,30 @@

[% SET comment_anchor = '' %] [% FOREACH comment = new_comments.reverse %] -

+
[% IF comment.count %] [% comment_anchor = "#c$comment.count" %] - [% 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 %] + + [% 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 + %] + [% END %] [% comment_div = comment.is_markdown ? "div" : "pre" %] [% wrap = comment.is_markdown ? 0 : 1 %] @@ -81,6 +97,7 @@ [% BLOCK generate_diffs %] [% SET in_table = 0 %] + [% class_name = isnew ? "bz_new_table" : "bz_diff_table" %] [% last_changer = 0 %] [% FOREACH change = diffs %] [% IF !isnew && change.who.id != last_changer %] @@ -101,7 +118,7 @@ [% END %]
[% IF in_table == 0 %] - +
[% SET in_table = 1 %] [% END %] @@ -113,7 +130,7 @@ [% PROCESS "email/bugmail-common.txt.tmpl" %] [% IF in_table == 0 %] -
+
[% SET in_table = 1 %] [% END %] [% IF isnew %] -- cgit v1.2.3-24-g4f1b