##// END OF EJS Templates
install: fixed setup.py for new version
install: fixed setup.py for new version

File last commit:

r4448:824dc51f default
r4907:6f3e1915 default
Show More
commit_comment.mako
176 lines | 5.2 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"/>
emails: optimize some labels, and made few i18n fixes....
r532
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 = {
dan
emails: updated emails design and data structure they provide....
r4038 'user': '@'+h.person(user),
emails: use more consistent output between commits email and pull request email.
r535 'repo_name': repo_name,
'status': status_change,
emails: optimize some labels, and made few i18n fixes....
r532 'comment_file': comment_file,
'comment_line': comment_line,
emails: added note types into emails. Fixes #5221
r1453 'comment_type': comment_type,
dan
emails: added reply link to comment type emails...
r4050 'comment_id': comment_id,
dan
emails: updated emails design and data structure they provide....
r4038
'commit_id': h.show_id(commit),
emails: set References header for threading in mail user agents even with different subjects...
r4447 'mention_prefix': '[mention] ' if mention else '',
emails: optimize some labels, and made few i18n fixes....
r532 }
emails: added logic to allow overwriting the default email titles via rcextensions.
r4448
if comment_file:
subject_template = email_comment_file_subject_template or \
_('{mention_prefix}{user} left a {comment_type} on file `{comment_file}` in commit `{commit_id}` in the `{repo_name}` repository').format(**data)
else:
if status_change:
subject_template = email_comment_status_change_subject_template or \
_('{mention_prefix}[status: {status}] {user} left a {comment_type} on commit `{commit_id}` in the `{repo_name}` repository').format(**data)
else:
subject_template = email_comment_subject_template or \
_('{mention_prefix}{user} left a {comment_type} on commit `{commit_id}` in the `{repo_name}` repository').format(**data)
emails: optimize some labels, and made few i18n fixes....
r532 %>
dan
emails: updated emails design and data structure they provide....
r4038
emails: optimize some labels, and made few i18n fixes....
r532
emails: added logic to allow overwriting the default email titles via rcextensions.
r4448 ${subject_template.format(**data) |n}
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: use more consistent output between commits email and pull request email.
r535 <%
data = {
'user': h.person(user),
'repo_name': repo_name,
'status': status_change,
'comment_file': comment_file,
'comment_line': comment_line,
emails: added note types into emails. Fixes #5221
r1453 'comment_type': comment_type,
dan
emails: added reply link to comment type emails...
r4050 'comment_id': comment_id,
dan
emails: updated emails design and data structure they provide....
r4038
'commit_id': h.show_id(commit),
emails: use more consistent output between commits email and pull request email.
r535 }
%>
project: added all source files and assets
r1
dan
notifications/emails: improve notification display and rendered emails structure
r4060 * ${_('Comment link')}: ${commit_comment_url}
project: added all source files and assets
r1
dan
emails: updated emails design and data structure they provide....
r4038 %if status_change:
* ${_('Commit status')}: ${_('Status was changed to')}: *${status_change}*
%endif
project: added all source files and assets
r1 * ${_('Commit')}: ${h.show_id(commit)}
dan
emails: updated emails design and data structure they provide....
r4038 * ${_('Commit message')}: ${commit.message}
project: added all source files and assets
r1 %if comment_file:
comments: update comments email templates....
r3120 * ${_('File: {comment_file} on line {comment_line}').format(**data)}
dan
emails: updated emails design and data structure they provide....
r4038
project: added all source files and assets
r1 %endif
dan
emails: updated emails design and data structure they provide....
r4038 % if comment_type == 'todo':
dan
notifications/emails: improve notification display and rendered emails structure
r4060 ${('Inline' if comment_file else 'General')} ${_('`TODO` number')} ${comment_id}:
dan
emails: updated emails design and data structure they provide....
r4038 % else:
dan
notifications/emails: improve notification display and rendered emails structure
r4060 ${('Inline' if comment_file else 'General')} ${_('`Note` number')} ${comment_id}:
dan
emails: updated emails design and data structure they provide....
r4038 % endif
${comment_body |n, trim}
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),
emails: added note types into emails. Fixes #5221
r1453 'comment_file': comment_file,
'comment_line': comment_line,
'comment_type': comment_type,
dan
emails: added reply link to comment type emails...
r4050 'comment_id': comment_id,
dan
emails: updated emails design and data structure they provide....
r4038 'renderer_type': renderer_type or 'plain',
'repo': commit_target_repo_url,
'repo_name': repo_name,
'commit_id': h.show_id(commit),
emails: optimize some labels, and made few i18n fixes....
r532 }
%>
dan
emails: updated emails design and data structure they provide....
r4038
emails: improved styling, and fixed problems with some email clients...
r4377 ## header
dan
emails: updated emails design and data structure they provide....
r4038 <table style="text-align:left;vertical-align:middle;width: 100%">
<tr>
<td style="width:100%;border-bottom:1px solid #dbd9da;">
emails: added note types into emails. Fixes #5221
r1453
emails: improved styling, and fixed problems with some email clients...
r4377 <div style="margin: 0; font-weight: bold">
<div class="clear-both" style="margin-bottom: 4px">
emails: updated comment template header to be exactly like other email templates.
r4121 <span style="color:#7E7F7F">@${h.person(user.username)}</span>
${_('left a')}
<a href="${commit_comment_url}" style="${base.link_css()}">
% if comment_file:
${_('{comment_type} on file `{comment_file}` in commit.').format(**data)}
% else:
${_('{comment_type} on commit.').format(**data) |n}
% endif
</a>
dan
emails: updated emails design and data structure they provide....
r4038 </div>
<div style="margin-top: 10px"></div>
${_('Commit')} <code>${data['commit_id']}</code> ${_('of repository')}: ${data['repo_name']}
emails: improved styling, and fixed problems with some email clients...
r4377 </div>
emails: added note types into emails. Fixes #5221
r1453
dan
emails: updated emails design and data structure they provide....
r4038 </td>
</tr>
</table>
emails: improved styling, and fixed problems with some email clients...
r4377 <div class="clear-both"></div>
## main body
dan
emails: updated emails design and data structure they provide....
r4038 <table style="text-align:left;vertical-align:middle;width: 100%">
## spacing def
<tr>
<td style="width: 130px"></td>
<td></td>
</tr>
emails: optimize some labels, and made few i18n fixes....
r532
% if status_change:
comments: update comments email templates....
r3120 <tr>
dan
emails: updated emails design and data structure they provide....
r4038 <td style="padding-right:20px;">${_('Commit Status')}:</td>
comments: update comments email templates....
r3120 <td>
dan
emails: updated emails design and data structure they provide....
r4038 ${_('Status was changed to')}: ${base.status_text(status_change, tag_type=status_change_type)}
comments: update comments email templates....
r3120 </td>
emails: added note types into emails. Fixes #5221
r1453 </tr>
emails: optimize some labels, and made few i18n fixes....
r532 % endif
dan
emails: updated emails design and data structure they provide....
r4038
emails: added note types into emails. Fixes #5221
r1453 <tr>
dan
emails: updated emails design and data structure they provide....
r4038 <td style="padding-right:20px;">${_('Commit')}:</td>
<td>
<a href="${commit_comment_url}" style="${base.link_css()}">${h.show_id(commit)}</a>
</td>
</tr>
<tr>
<td style="padding-right:20px;">${_('Commit message')}:</td>
<td style="white-space:pre-wrap">${h.urlify_commit_message(commit.message, repo_name)}</td>
</tr>
% if comment_file:
<tr>
<td style="padding-right:20px;">${_('File')}:</td>
<td><a href="${commit_comment_url}" style="${base.link_css()}">${_('`{comment_file}` on line {comment_line}').format(**data)}</a></td>
</tr>
% endif
dan
emails: added reply link to comment type emails...
r4050 <tr style="border-bottom:1px solid #dbd9da;">
dan
emails: updated emails design and data structure they provide....
r4038 <td colspan="2" style="padding-right:20px;">
emails: added note types into emails. Fixes #5221
r1453 % if comment_type == 'todo':
dan
emails: expose inline/general next to comment type.
r4052 ${('Inline' if comment_file else 'General')} ${_('`TODO` number')} ${comment_id}:
emails: added note types into emails. Fixes #5221
r1453 % else:
dan
emails: expose inline/general next to comment type.
r4052 ${('Inline' if comment_file else 'General')} ${_('`Note` number')} ${comment_id}:
emails: added note types into emails. Fixes #5221
r1453 % endif
</td>
dan
emails: updated emails design and data structure they provide....
r4038 </tr>
dan
emails: added reply link to comment type emails...
r4050 <tr>
<td colspan="2" style="background: #F7F7F7">${h.render(comment_body, renderer=data['renderer_type'], mentions=True)}</td>
</tr>
<tr>
<td><a href="${commit_comment_reply_url}">${_('Reply')}</a></td>
<td></td>
dan
emails: updated emails design and data structure they provide....
r4038 </tr>
emails: optimize some labels, and made few i18n fixes....
r532 </table>