Edgewall Software

Changes between Version 106 and Version 107 of TracNotification


Ignore:
Timestamp:
Apr 21, 2020, 9:22:47 PM (4 years ago)
Author:
Ryan J Ollos
Comment:

Use Jinja2 template from trac/ticket/templates/ticket_notify_email.txt.

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v106 v107  
    119119The notification email content is generated based on `ticket_notify_email.txt` in `trac/ticket/templates`. You can add your own version of this template by adding a `ticket_notify_email.txt` to the templates directory of your environment. The default is:
    120120
    121 {{{#!genshi
    122 $ticket_body_hdr
    123 $ticket_props
    124 {% choose ticket.new %}\
    125 {%   when True %}\
    126 $ticket.description
    127 {%   end %}\
    128 {%   otherwise %}\
    129 {%     if changes_body %}\
     121{{{#!jinja
     122${ticket_body_hdr}
     123${ticket_props}
     124# if ticket.new:
     125${ticket.description}
     126# else:
     127#   if changes_body:
    130128${_('Changes (by %(author)s):', author=change.author)}
    131129
    132 $changes_body
    133 {%     end %}\
    134 {%     if changes_descr %}\
    135 {%       if not changes_body and not change.comment and change.author %}\
     130${changes_body}
     131#   endif
     132#   if changes_descr:
     133#     if not changes_body and not change.comment and change.author:
    136134${_('Description changed by %(author)s:', author=change.author)}
    137 {%       end %}\
    138 $changes_descr
     135#     endif
     136${changes_descr}
    139137--
    140 {%     end %}\
    141 {%     if change.comment %}\
    142 
    143 ${_('Comment:') if changes_body else _('Comment (by %(author)s):', author=change.author)}
    144 
    145 $change.comment
    146 {%     end %}\
    147 {%   end %}\
    148 {% end %}\
    149 
     138#   endif
     139#   if change.comment:
     140
     141${_('Comment:') if changes_body else
     142  _('Comment (by %(author)s):', author=change.author)}
     143
     144${change.comment}
     145#   endif
     146# endif
    150147${'-- '}
    151148${_('Ticket URL: <%(link)s>', link=ticket.link)}
    152 $project.name <${project.url or abs_href()}>
    153 $project.descr
     149${project.name} <${project.url or abs_href()}>
     150${project.descr}
    154151}}}
    155152