]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1119336: Add css classes to html emails, such as the comment block
authorAlbert Ting <altlist@gmail.com>
Tue, 5 May 2015 05:45:04 +0000 (13:45 +0800)
committerByron Jones <glob@mozilla.com>
Tue, 5 May 2015 05:45:04 +0000 (13:45 +0800)
r=glob,a=glob

template/en/default/email/bugmail.html.tmpl

index e3b63f10b4e1d1e1515b4608fd562349a2b3bff9..abdae8cf88d1d8077c001eec640e72f9500fb2fb 100644 (file)
       <p>
       [% SET comment_anchor = '' %]
       [% FOREACH comment = new_comments.reverse %]
-        <div>
+        <div class="bz_comment_block">
           [% IF comment.count %]
             [% comment_anchor = "#c$comment.count" %]
-            <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>
+            <b class="bz_comment_head">
+              [% 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 %]
           [% 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 %]
         [% END %]
           <br>
           [% 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 %]
           [% END %]
           <tr>
 
       [% PROCESS "email/bugmail-common.txt.tmpl" %]
       [% 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 %]
       [% END %]
       [% IF isnew %]