##// END OF EJS Templates
emails: use more consistent output between commits email and pull request email.
marcink -
r535:477f97a4 default
parent child Browse files
Show More
@@ -6,10 +6,11 b''
6 6 <%
7 7 data = {
8 8 'user': h.person(user),
9 'repo_name': repo_name,
10 'commit_id': h.show_id(commit),
11 'status': status_change,
9 12 'comment_file': comment_file,
10 13 'comment_line': comment_line,
11 'repo_name': repo_name,
12 'commit_id': h.show_id(commit),
13 14 }
14 15 %>
15 16 ${_('[mention]') if mention else ''} \
@@ -17,12 +18,26 b' data = {'
17 18 % if comment_file:
18 19 ${_('%(user)s commented on commit `%(commit_id)s` (file: `%(comment_file)s`)') % data} ${_('in the %(repo_name)s repository') % data}
19 20 % else:
21 % if status_change:
22 ${_('%(user)s commented on commit `%(commit_id)s` (status: %(status)s)') % data |n} ${_('in the %(repo_name)s repository') % data}
23 % else:
20 24 ${_('%(user)s commented on commit `%(commit_id)s`') % data |n} ${_('in the %(repo_name)s repository') % data}
25 % endif
21 26 % endif
22 27
23 28 </%def>
24 29
25 30 <%def name="body_plaintext()" filter="n,trim">
31 <%
32 data = {
33 'user': h.person(user),
34 'repo_name': repo_name,
35 'commit_id': h.show_id(commit),
36 'status': status_change,
37 'comment_file': comment_file,
38 'comment_line': comment_line,
39 }
40 %>
26 41 ${self.subject()}
27 42
28 43 * ${_('Comment link')}: ${commit_comment_url}
@@ -35,13 +50,12 b' data = {'
35 50
36 51 ---
37 52
38 ${comment_body|n}
39
40
41 53 %if status_change:
42 54 ${_('Commit status was changed to')}: *${status_change}*
43 55 %endif
44 56
57 ${comment_body|n}
58
45 59 ${self.plaintext_footer()}
46 60 </%def>
47 61
@@ -58,11 +72,11 b' data = {'
58 72 %>
59 73 <table style="text-align:left;vertical-align:middle;">
60 74 <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;">
61 % if comment_file:
62 <h4><a href="${commit_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('%(user)s commented on commit `%(commit_id)s` (file:`%(comment_file)s`)') % data}</a> ${_('in the %(repo)s repository') % data |n}</h4>
63 % else:
64 <h4><a href="${commit_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('%(user)s commented on commit `%(commit_id)s`') % data |n}</a> ${_('in the %(repo)s repository') % data |n}</h4>
65 % endif
75 % if comment_file:
76 <h4><a href="${commit_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('%(user)s commented on commit `%(commit_id)s` (file:`%(comment_file)s`)') % data}</a> ${_('in the %(repo)s repository') % data |n}</h4>
77 % else:
78 <h4><a href="${commit_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${_('%(user)s commented on commit `%(commit_id)s`') % data |n}</a> ${_('in the %(repo)s repository') % data |n}</h4>
79 % endif
66 80 </td></tr>
67 81 <tr><td style="padding-right:20px;padding-top:15px;">${_('Commit')}</td><td style="padding-top:15px;"><a href="${commit_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer">${h.show_id(commit)}</a></td></tr>
68 82 <tr><td style="padding-right:20px;">${_('Description')}</td><td>${h.urlify_commit_message(commit.message, repo_name)}</td></tr>
@@ -17,14 +17,13 b' data = {'
17 17 ${_('[mention]') if mention else ''} \
18 18
19 19 % if comment_file:
20 ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (file: `%(comment_file)s`)') % data |n}
20 ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (file: `%(comment_file)s`)') % data}
21 21 % else:
22 22 % if status_change:
23 ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (status: %(status)s)') % data |n}
23 ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (status: %(status)s)') % data}
24 24 % else:
25 ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s"') % data |n}
25 ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s"') % data}
26 26 % endif
27
28 27 % endif
29 28 </%def>
30 29
@@ -59,7 +58,6 b' data = {'
59 58
60 59 ${comment_body|n}
61 60
62
63 61 ${self.plaintext_footer()}
64 62 </%def>
65 63
General Comments 0
You need to be logged in to leave comments. Login now