##// END OF EJS Templates
release: Start preparation for 4.15.1
release: Start preparation for 4.15.1

File last commit:

r3120:646ada6a default
r3348:90f09c02 stable
Show More
pull_request_comment.mako
114 lines | 3.9 KiB | application/x-mako | MakoHtmlLexer
project: added all source files and assets
r1 ## -*- coding: utf-8 -*-
<%inherit file="base.mako"/>
emails: added new tags to status sent...
r548 <%namespace name="base" file="base.mako"/>
project: added all source files and assets
r1
emails: added note types into emails. Fixes #5221
r1453 ## EMAIL SUBJECT
emails: fixed newlines in email templates that can break email sending code.
r1728 <%def name="subject()" filter="n,trim,whitespace_filter">
emails: optimize some labels, and made few i18n fixes....
r532 <%
data = {
'user': h.person(user),
'pr_title': pull_request.title,
'pr_id': pull_request.pull_request_id,
'status': status_change,
'comment_file': comment_file,
'comment_line': comment_line,
emails: added note types into emails. Fixes #5221
r1453 'comment_type': comment_type,
emails: optimize some labels, and made few i18n fixes....
r532 }
%>
comments: update comments email templates....
r3120 ${(_('[mention]') if mention else '')} \
emails: optimize some labels, and made few i18n fixes....
r532
% if comment_file:
comments: update comments email templates....
r3120 ${_('{user} left a {comment_type} on file `{comment_file}` in pull request #{pr_id} "{pr_title}"').format(**data) |n}
emails: optimize some labels, and made few i18n fixes....
r532 % else:
% if status_change:
comments: update comments email templates....
r3120 ${_('[status: {status}] {user} left a {comment_type} on pull request #{pr_id} "{pr_title}"').format(**data) |n}
emails: optimize some labels, and made few i18n fixes....
r532 % else:
comments: update comments email templates....
r3120 ${_('{user} left a {comment_type} on pull request #{pr_id} "{pr_title}"').format(**data) |n}
emails: optimize some labels, and made few i18n fixes....
r532 % endif
% endif
project: added all source files and assets
r1 </%def>
emails: added note types into emails. Fixes #5221
r1453 ## PLAINTEXT VERSION OF BODY
project: added all source files and assets
r1 <%def name="body_plaintext()" filter="n,trim">
emails: optimize some labels, and made few i18n fixes....
r532 <%
data = {
'user': h.person(user),
'pr_title': pull_request.title,
'pr_id': pull_request.pull_request_id,
'status': status_change,
'comment_file': comment_file,
'comment_line': comment_line,
emails: added note types into emails. Fixes #5221
r1453 'comment_type': comment_type,
emails: optimize some labels, and made few i18n fixes....
r532 }
%>
project: added all source files and assets
r1 ${self.subject()}
* ${_('Comment link')}: ${pr_comment_url}
* ${_('Source repository')}: ${pr_source_repo_url}
%if comment_file:
comments: update comments email templates....
r3120 * ${_('File: {comment_file} on line {comment_line}').format(comment_file=comment_file, comment_line=comment_line)}
project: added all source files and assets
r1 %endif
---
emails: optimize some labels, and made few i18n fixes....
r532 %if status_change and not closing_pr:
comments: update comments email templates....
r3120 ${_('{user} submitted pull request #{pr_id} status: *{status}*').format(**data)}
emails: optimize some labels, and made few i18n fixes....
r532 %elif status_change and closing_pr:
comments: update comments email templates....
r3120 ${_('{user} submitted pull request #{pr_id} status: *{status} and closed*').format(**data)}
emails: optimize some labels, and made few i18n fixes....
r532 %endif
comments: update comments email templates....
r3120 ${comment_body |n}
project: added all source files and assets
r1
notifications: restyling email templates #4087
r508 ${self.plaintext_footer()}
project: added all source files and assets
r1 </%def>
emails: optimize some labels, and made few i18n fixes....
r532
<%
data = {
'user': h.person(user),
'pr_title': pull_request.title,
'pr_id': pull_request.pull_request_id,
'status': status_change,
'comment_file': comment_file,
'comment_line': comment_line,
emails: added note types into emails. Fixes #5221
r1453 'comment_type': comment_type,
emails: optimize some labels, and made few i18n fixes....
r532 }
%>
notifications: restyling email templates #4087
r508 <table style="text-align:left;vertical-align:middle;">
emails: optimize some labels, and made few i18n fixes....
r532 <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;">
% if comment_file:
comments: update comments email templates....
r3120 <h4><a href="${pr_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('{user} left a {comment_type} on file `{comment_file}` in pull request #{pr_id} "{pr_title}"').format(**data) |n}</a></h4>
emails: optimize some labels, and made few i18n fixes....
r532 % else:
comments: update comments email templates....
r3120 <h4><a href="${pr_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('{user} left a {comment_type} on pull request #{pr_id} "{pr_title}"').format(**data) |n}</a></h4>
emails: optimize some labels, and made few i18n fixes....
r532 % endif
emails: added note types into emails. Fixes #5221
r1453
emails: optimize some labels, and made few i18n fixes....
r532 </td></tr>
notifications: restyling email templates #4087
r508 <tr><td style="padding-right:20px;padding-top:15px;">${_('Source')}</td><td style="padding-top:15px;"><a style="color:#427cc9;text-decoration:none;cursor:pointer" href="${pr_source_repo_url}">${pr_source_repo.repo_name}</a></td></tr>
emails: added note types into emails. Fixes #5221
r1453
emails: added new tags to status sent...
r548 % if status_change:
emails: added note types into emails. Fixes #5221
r1453 <tr>
<td style="padding-right:20px;">${_('Status')}</td>
<td>
% if closing_pr:
${_('Closed pull request with status')}: ${base.status_text(status_change, tag_type=status_change_type)}
% else:
${_('Submitted review status')}: ${base.status_text(status_change, tag_type=status_change_type)}
% endif
</td>
</tr>
emails: added new tags to status sent...
r548 % endif
emails: added note types into emails. Fixes #5221
r1453 <tr>
<td style="padding-right:20px;">
% if comment_type == 'todo':
comments: update comments email templates....
r3120 ${(_('TODO comment on line: {comment_line}') if comment_file else _('TODO comment')).format(**data)}
emails: added note types into emails. Fixes #5221
r1453 % else:
comments: update comments email templates....
r3120 ${(_('Note comment on line: {comment_line}') if comment_file else _('Note comment')).format(**data)}
emails: added note types into emails. Fixes #5221
r1453 % endif
</td>
<td style="line-height:1.2em;white-space:pre-wrap">${h.render(comment_body, renderer=renderer_type, mentions=True)}</td>
</tr>
notifications: restyling email templates #4087
r508 </table>