format_comment.txt.tmpl 1.68 KB
Newer Older
1 2 3
[%# 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/.
4
  #
5 6
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
7 8
  #%]

9 10 11 12 13
[%# NOTE: Everywhere you use this template, you must call 
  # "FILTER remove('^X')" on the result. This is unfortunately the only way
  # to preserve leading whitespace in comments.
  #%]

14
[%# INTERFACE:
15 16 17
  #   comment: A Bugzilla::Comment object.
  #   is_bugmail: boolean; True if this comment is going into a plain-text
  #               bugmail.
18 19
  #%]

20 21 22
[%# Please don't use field-descs here. It can slow down Bugzilla. %]

[% SET comment_body = comment.body %]
23

24
[% IF comment.type == constants.CMT_DUPE_OF %]
25
X[% comment_body %]
26 27 28 29

*** This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [%+ comment.extra_data %] ***
[% ELSIF comment.type == constants.CMT_HAS_DUPE %]
*** [% terms.Bug %] [%+ comment.extra_data %] has been marked as a duplicate of this [% terms.bug %]. ***
30 31 32
[% ELSIF comment.type == constants.CMT_ATTACHMENT_CREATED %]
Created attachment [% comment.extra_data %]
[% IF is_bugmail %]
33
  --> [% urlbase _ "attachment.cgi?id=" _ comment.extra_data _ "&action=edit" %]
34 35 36
[% END %]
[%+ comment.attachment.description %]

37 38 39 40 41 42 43 44
[%+ comment.body %]
[% ELSIF comment.type == constants.CMT_ATTACHMENT_UPDATED %]
Comment on attachment [% comment.extra_data %]
[% IF is_bugmail %]
  --> [% urlbase _ "attachment.cgi?id=" _ comment.extra_data %]
[% END %]
[%+ comment.attachment.description %]

45
[%+ comment.body %]
46
[% ELSE %]
47
X[% Hook.process('type') %]
48
[% END %]