diff options
Diffstat (limited to 'extensions/BMO/template/en/default/email')
-rw-r--r-- | extensions/BMO/template/en/default/email/bugmail.html.tmpl | 203 | ||||
-rw-r--r-- | extensions/BMO/template/en/default/email/bugmail.txt.tmpl | 90 |
2 files changed, 293 insertions, 0 deletions
diff --git a/extensions/BMO/template/en/default/email/bugmail.html.tmpl b/extensions/BMO/template/en/default/email/bugmail.html.tmpl new file mode 100644 index 000000000..a6d2b340c --- /dev/null +++ b/extensions/BMO/template/en/default/email/bugmail.html.tmpl @@ -0,0 +1,203 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS "global/field-descs.none.tmpl" %] +[% PROCESS "global/reason-descs.none.tmpl" %] + +[% isnew = bug.lastdiffed ? 0 : 1 %] +<html> +<head> + <base href="[% urlbase FILTER html %]"> + <style> + .comment { font-size: 100% !important; } + </style> +</head> +<body style="font-family: sans-serif"> + + [% IF !to_user.in_group('editbugs') %] + <div id="noreply" style="font-size: 90%; color: #666666"> + Do not reply to this email. You can add comments to this [% terms.bug %] at + [%# using the bug_link filter here causes a weird template error %] + <a href="[% urlbase FILTER html %]show_bug.cgi?id=[% bug.id FILTER none %]"> + [% urlbase FILTER html %]show_bug.cgi?id=[% bug.id FILTER none %]</a> + </div> + <br> + [% END %] + + [% IF isnew %] + [% PROCESS generate_new %] + [% ELSE %] + [% PROCESS generate_diffs %] + [% END %] + + [% IF new_comments.size %] + <div id="comments"> + [% FOREACH comment = new_comments.reverse %] + <div> + [% IF comment.count %] + <b> + [% "Comment # ${comment.count}" + FILTER bug_link(bug, { comment_num => comment.count, full_url => 1 }) FILTER none %] + on [% "$terms.Bug $bug.id" FILTER bug_link(bug, { full_url => 1 }) FILTER none %] + from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %] + at [% comment.creation_ts FILTER time(undef, to_user.timezone) %] + </b> + [% END %] + <pre class="comment" style="font-size: 120%">[% comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment) %]</pre> + </div> + [% END %] + </div> + <br> + [% END %] + + [% IF referenced_bugs.size %] + <div id="referenced"> + <hr style="border: 1px dashed #969696"> + <b>Referenced [% terms.Bugs %]:</b> + <ul> + [% FOREACH ref = referenced_bugs %] + <li> + [<a href="[% urlbase FILTER html %]show_bug.cgi?id=[% ref.id FILTER none %]"> + [% terms.Bug %] [% ref.id FILTER none %]</a>] [% ref.short_desc FILTER html %] + </li> + [% END %] + </ul> + </div> + <br> + [% END %] + + <div id="bug_details" style="font-size: 90%; color: #666666"> + <hr style="border: 1px dashed #969696"> + Product/Component: [% bug.product FILTER html %] :: [% bug.component FILTER html %]<br> + [% "You are mentoring this " _ terms.bug IF bug.is_mentor(to_user) %] + </div> + + [% seen_header = 0 %] + [% FOREACH flag = tracking_flags %] + [% NEXT IF bug.${flag.name} == "---" %] + [% IF !seen_header %] + [% seen_header = 1 %] + <div id="tracking" style="font-size: 90%; color: #666666"> + <hr style="border: 1px dashed #969696"> + <b>Tracking Flags:</b> + <ul> + [% END %] + <li>[% flag.description FILTER html %]:[% bug.${flag.name} FILTER html %]</li> + [% END %] + [% IF seen_header %] + </ul> + </div> + [% END %] + + <div id="reason" style="font-size: 90%; color: #666666"> + <hr style="border: 1px dashed #969696"> + <b>You are receiving this mail because:</b> + <ul> + [% FOREACH reason = reasons %] + [% IF reason_descs.$reason %] + <li>[% reason_descs.$reason FILTER html %]</li> + [% END %] + [% END %] + [% FOREACH reason = reasons_watch %] + [% IF watch_reason_descs.$reason %] + <li>[% watch_reason_descs.$reason FILTER html %]</li> + [% END %] + [% END %] + </ul> + </div> + +</body> +</html> + +[% BLOCK generate_new %] + <div class="new"> + <table border="0" cellspacing="0" cellpadding="3"> + [% FOREACH change = diffs %] + [% PROCESS "email/bugmail-common.txt.tmpl" %] + <tr> + <td class="c1" style="border-right: 1px solid #969696" nowrap><b>[% field_label FILTER html %]</b></td> + <td class="c2"> + [% IF change.field_name == "bug_id" %] + [% new_value FILTER bug_link(bug, full_url => 1) FILTER none %] + [% ELSE %] + [% new_value FILTER html %] + [% END %] + </td> + </tr> + [% END %] + </table> + </div> + <br> +[% END %] + +[% BLOCK generate_diffs %] + [% SET in_table = 0 %] + [% last_changer = 0 %] + [% FOREACH change = diffs %] + [% PROCESS "email/bugmail-common.txt.tmpl" %] + [% IF changer.id != last_changer %] + [% last_changer = changer.id %] + [% IF in_table == 1 %] + </table> + </div> + <br> + [% SET in_table = 0 %] + [% END %] + + <b> + [% IF change.blocker %] + [% "${terms.Bug} ${bug.id}" FILTER bug_link(bug, full_url => 1) FILTER none %] + depends on + <a href="[% urlbase FILTER html %]show_bug.cgi?id=[% change.blocker.id FILTER none %]"> + [% terms.Bug %] [% change.blocker.id FILTER none %]</a>, + which changed state.<br> + [% ELSE %] + [% INCLUDE global/user.html.tmpl user = to_user, who = change.who %] changed + [%+ "${terms.Bug} ${bug.id}" FILTER bug_link(bug, full_url => 1) FILTER none %] + at [% change.bug_when FILTER time(undef, to_user.timezone) %]</b>:<br> + [% END %] + </b> + + [% IF in_table == 0 %] + <br> + <div class="diffs"> + <table border="0" cellspacing="0" cellpadding="5"> + [% SET in_table = 1 %] + [% END %] + <tr class="head"> + <td class="c1" style="border-bottom: 1px solid #969696; border-right: 1px solid #969696"><b>What</b></td> + <td class="c2" style="border-bottom: 1px solid #969696; border-right: 1px solid #969696"><b>Removed</b></td> + <td class="c3" style="border-bottom: 1px solid #969696"><b>Added</b></td> + </tr> + [% END %] + + <tr> + <td class="c1" style="border-right: 1px solid #969696" nowrap>[% field_label FILTER html %]</td> + <td class="c2" style="border-right: 1px solid #969696"> + [% IF old_value %] + [% old_value FILTER html %] + [% ELSE %] + + [% END %] + </td> + <td> + [% IF new_value %] + [% new_value FILTER html %] + [% ELSE %] + + [% END %] + </td> + </tr> + [% END %] + [% IF in_table %] + </table> + </div> + <br> + [% END %] +[% END %] + diff --git a/extensions/BMO/template/en/default/email/bugmail.txt.tmpl b/extensions/BMO/template/en/default/email/bugmail.txt.tmpl new file mode 100644 index 000000000..b0e8636a4 --- /dev/null +++ b/extensions/BMO/template/en/default/email/bugmail.txt.tmpl @@ -0,0 +1,90 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[% PROCESS "global/field-descs.none.tmpl" %] +[% PROCESS "global/reason-descs.none.tmpl" %] + +[% isnew = bug.lastdiffed ? 0 : 1 %] + +[% IF !to_user.in_group('editbugs') %] +Do not reply to this email. You can add comments to this [% terms.bug %] at +[% END %] +[%+ PROCESS generate_diffs -%] + +[% FOREACH comment = new_comments %] + +[%- IF comment.count %] +--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.creation_ts FILTER time(undef, to_user.timezone) %] --- +[% END %] +[%+ comment.body_full({ is_bugmail => 1, wrap => 1 }) %] +[% END %] +[% IF referenced_bugs.size %] + +Referenced [% terms.Bugs %]: + +[% FOREACH ref = referenced_bugs %] +[%+ urlbase %]show_bug.cgi?id=[% ref.id %] +[%+ "[" _ terms.Bug _ " " _ ref.id _ "] " _ ref.short_desc FILTER wrap_comment(76) %] +[% END %] +[% END %] + +-- [%# Protect the trailing space of the signature marker %] +Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email + +------------------------------- +Product/Component: [%+ bug.product +%] :: [%+ bug.component %] +[%+ "You are mentoring this " _ terms.bug IF bug.is_mentor(to_user) %] + +[% seen_header = 0 %] +[% FOREACH flag = tracking_flags %] + [% NEXT IF bug.${flag.name} == "---" %] + [% IF !seen_header %] + [% seen_header = 1 %] +------- Tracking Flags: ------- + [% END %] +[%+ flag.description %]:[% bug.${flag.name} %] +[% END %] + +------- You are receiving this mail because: ------- +[% SET reason_lines = [] %] +[% FOREACH reason = reasons %] + [% reason_lines.push(reason_descs.$reason) IF reason_descs.$reason %] +[% END %] +[% FOREACH reason = reasons_watch %] + [% reason_lines.push(watch_reason_descs.$reason) + IF watch_reason_descs.$reason %] +[% END %] +[%+ reason_lines.join("\n") %] + +[% BLOCK generate_diffs %] + [% urlbase %]show_bug.cgi?id=[% bug.id %] + +[%+ last_changer = 0 %] + [% FOREACH change = diffs %] + [% IF !isnew && changer.id != last_changer %] + [% last_changer = changer.id %] + [% IF change.blocker %] + [% terms.Bug %] [%+ bug.id %] depends on [% terms.bug %] [%+ change.blocker.id %], which changed state. + +[%+ terms.Bug %] [%+ change.blocker.id %] Summary: [% change.blocker.short_desc %] +[%+ urlbase %]show_bug.cgi?id=[% change.blocker.id %] + [% ELSE %] + [%~ changer.identity %] changed: + [% END %] + + What |Removed |Added +---------------------------------------------------------------------------- +[%+ END %][%# End of IF. This indentation is intentional! ~%] + [% PROCESS "email/bugmail-common.txt.tmpl"%] + [%~ IF isnew %] + [% format_columns(2, field_label _ ":", new_value) -%] + [% ELSE %] + [% format_columns(3, field_label, old_value, new_value) -%] + [% END %] + [% END -%] +[% END %] |