##// 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 data = {
7 data = {
8 'user': h.person(user),
8 'user': h.person(user),
9 'repo_name': repo_name,
10 'commit_id': h.show_id(commit),
11 'status': status_change,
9 'comment_file': comment_file,
12 'comment_file': comment_file,
10 'comment_line': comment_line,
13 'comment_line': comment_line,
11 'repo_name': repo_name,
12 'commit_id': h.show_id(commit),
13 }
14 }
14 %>
15 %>
15 ${_('[mention]') if mention else ''} \
16 ${_('[mention]') if mention else ''} \
@@ -17,12 +18,26 b' data = {'
17 % if comment_file:
18 % if comment_file:
18 ${_('%(user)s commented on commit `%(commit_id)s` (file: `%(comment_file)s`)') % data} ${_('in the %(repo_name)s repository') % data}
19 ${_('%(user)s commented on commit `%(commit_id)s` (file: `%(comment_file)s`)') % data} ${_('in the %(repo_name)s repository') % data}
19 % else:
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 ${_('%(user)s commented on commit `%(commit_id)s`') % data |n} ${_('in the %(repo_name)s repository') % data}
24 ${_('%(user)s commented on commit `%(commit_id)s`') % data |n} ${_('in the %(repo_name)s repository') % data}
25 % endif
21 % endif
26 % endif
22
27
23 </%def>
28 </%def>
24
29
25 <%def name="body_plaintext()" filter="n,trim">
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 ${self.subject()}
41 ${self.subject()}
27
42
28 * ${_('Comment link')}: ${commit_comment_url}
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 %if status_change:
53 %if status_change:
42 ${_('Commit status was changed to')}: *${status_change}*
54 ${_('Commit status was changed to')}: *${status_change}*
43 %endif
55 %endif
44
56
57 ${comment_body|n}
58
45 ${self.plaintext_footer()}
59 ${self.plaintext_footer()}
46 </%def>
60 </%def>
47
61
@@ -58,11 +72,11 b' data = {'
58 %>
72 %>
59 <table style="text-align:left;vertical-align:middle;">
73 <table style="text-align:left;vertical-align:middle;">
60 <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;">
74 <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;">
61 % if comment_file:
75 % 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>
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>
63 % else:
77 % 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>
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>
65 % endif
79 % endif
66 </td></tr>
80 </td></tr>
67 <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>
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 <tr><td style="padding-right:20px;">${_('Description')}</td><td>${h.urlify_commit_message(commit.message, repo_name)}</td></tr>
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 ${_('[mention]') if mention else ''} \
17 ${_('[mention]') if mention else ''} \
18
18
19 % if comment_file:
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 % else:
21 % else:
22 % if status_change:
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 % else:
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 % endif
26 % endif
27
28 % endif
27 % endif
29 </%def>
28 </%def>
30
29
@@ -59,7 +58,6 b' data = {'
59
58
60 ${comment_body|n}
59 ${comment_body|n}
61
60
62
63 ${self.plaintext_footer()}
61 ${self.plaintext_footer()}
64 </%def>
62 </%def>
65
63
General Comments 0
You need to be logged in to leave comments. Login now