summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/email/bugmail.html.tmpl
blob: 094b0c579522e8f3812911555b5d1e2e5f495cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
[%# 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 %]&nbsp;[% 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 %]
  </div>

[% IF tracking_flags.size %]
  <div id="tracking" style="font-size: 90%; color: #666666">
    <hr style="border: 1px dashed #969696">
    <b>Tracking Flags:</b>
    <ul>
      [% FOREACH flag = tracking_flags %]
        [% NEXT IF bug.${flag.name} == "---" %]
        <li>[% flag.description FILTER html %]:[% bug.${flag.name} FILTER html %]</li>
      [% END %]
    </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 %]&nbsp;[% 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 %]
          &nbsp;
        [% END %]
      </td>
      <td>
        [% IF new_value %]
          [% new_value FILTER html %]
        [% ELSE %]
          &nbsp;
        [% END %]
      </td>
    </tr>
  [% END %]
  [% IF in_table %]
      </table>
    </div>
    <br>
  [% END %]
[% END %]