Commit 88628a5c authored by Albert Ting's avatar Albert Ting Committed by Byron Jones

Bug 1119336: Add css classes to html emails, such as the comment block

r=glob,a=glob
parent 7b85e3b1
...@@ -19,14 +19,30 @@ ...@@ -19,14 +19,30 @@
<p> <p>
[% SET comment_anchor = '' %] [% SET comment_anchor = '' %]
[% FOREACH comment = new_comments.reverse %] [% FOREACH comment = new_comments.reverse %]
<div> <div class="bz_comment_block">
[% IF comment.count %] [% IF comment.count %]
[% comment_anchor = "#c$comment.count" %] [% comment_anchor = "#c$comment.count" %]
<b>[% INCLUDE bug/link.html.tmpl bug = bug, link_text = "Comment # ${comment.count}", <b class="bz_comment_head">
comment_num = comment.count, full_url = 1, user = to_user %] [% INCLUDE bug/link.html.tmpl
on [% INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.bug $bug.id", bug = bug,
full_url = 1, user = to_user %] link_text = "Comment # ${comment.count}",
from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]</b> 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 %] [% END %]
[% comment_div = comment.is_markdown ? "div" : "pre" %] [% comment_div = comment.is_markdown ? "div" : "pre" %]
[% wrap = comment.is_markdown ? 0 : 1 %] [% wrap = comment.is_markdown ? 0 : 1 %]
...@@ -81,6 +97,7 @@ ...@@ -81,6 +97,7 @@
[% BLOCK generate_diffs %] [% BLOCK generate_diffs %]
[% SET in_table = 0 %] [% SET in_table = 0 %]
[% class_name = isnew ? "bz_new_table" : "bz_diff_table" %]
[% last_changer = 0 %] [% last_changer = 0 %]
[% FOREACH change = diffs %] [% FOREACH change = diffs %]
[% IF !isnew && change.who.id != last_changer %] [% IF !isnew && change.who.id != last_changer %]
...@@ -101,7 +118,7 @@ ...@@ -101,7 +118,7 @@
[% END %] [% END %]
<br> <br>
[% IF in_table == 0 %] [% IF in_table == 0 %]
<table border="1" cellspacing="0" cellpadding="8"> <table border="1" cellspacing="0" cellpadding="8" class="[% class_name FILTER none %]">
[% SET in_table = 1 %] [% SET in_table = 1 %]
[% END %] [% END %]
<tr> <tr>
...@@ -113,7 +130,7 @@ ...@@ -113,7 +130,7 @@
[% PROCESS "email/bugmail-common.txt.tmpl" %] [% PROCESS "email/bugmail-common.txt.tmpl" %]
[% IF in_table == 0 %] [% IF in_table == 0 %]
<table border="1" cellspacing="0" cellpadding="8"> <table border="1" cellspacing="0" cellpadding="8" class="[% class_name FILTER none %]">
[% SET in_table = 1 %] [% SET in_table = 1 %]
[% END %] [% END %]
[% IF isnew %] [% IF isnew %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment