Show More
@@ -1,74 +1,88 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base.mako"/> |
|
2 | <%inherit file="base.mako"/> | |
3 |
|
3 | |||
4 |
|
4 | |||
5 | <%def name="subject()" filter="n,trim"> |
|
5 | <%def name="subject()" filter="n,trim"> | |
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 ''} \ | |
16 |
|
17 | |||
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} | |
21 | % endif |
|
25 | % 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} | |
29 |
|
44 | |||
30 | * ${_('Commit')}: ${h.show_id(commit)} |
|
45 | * ${_('Commit')}: ${h.show_id(commit)} | |
31 |
|
46 | |||
32 | %if comment_file: |
|
47 | %if comment_file: | |
33 | * ${_('File: %(comment_file)s on line %(comment_line)s') % {'comment_file': comment_file, 'comment_line': comment_line}} |
|
48 | * ${_('File: %(comment_file)s on line %(comment_line)s') % {'comment_file': comment_file, 'comment_line': comment_line}} | |
34 | %endif |
|
49 | %endif | |
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 | |||
48 |
|
62 | |||
49 | <% |
|
63 | <% | |
50 | data = { |
|
64 | data = { | |
51 | 'user': h.person(user), |
|
65 | 'user': h.person(user), | |
52 | 'comment_file': comment_file, |
|
66 | 'comment_file': comment_file, | |
53 | 'comment_line': comment_line, |
|
67 | 'comment_line': comment_line, | |
54 | 'repo': commit_target_repo, |
|
68 | 'repo': commit_target_repo, | |
55 | 'repo_name': repo_name, |
|
69 | 'repo_name': repo_name, | |
56 | 'commit_id': h.show_id(commit), |
|
70 | 'commit_id': h.show_id(commit), | |
57 | } |
|
71 | } | |
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> | |
69 |
|
83 | |||
70 | % if status_change: |
|
84 | % if status_change: | |
71 | <tr><td style="padding-right:20px;">${_('Status')}</td><td>${_('The commit status was changed to')}: ${status_change}.</td></tr> |
|
85 | <tr><td style="padding-right:20px;">${_('Status')}</td><td>${_('The commit status was changed to')}: ${status_change}.</td></tr> | |
72 | % endif |
|
86 | % endif | |
73 | <tr><td style="padding-right:20px;">${(_('Comment on line: %(comment_line)s') if comment_file else _('Comment')) % data}</td><td style="line-height:1.2em;">${h.render(comment_body, renderer=renderer_type, mentions=True)}</td></tr> |
|
87 | <tr><td style="padding-right:20px;">${(_('Comment on line: %(comment_line)s') if comment_file else _('Comment')) % data}</td><td style="line-height:1.2em;">${h.render(comment_body, renderer=renderer_type, mentions=True)}</td></tr> | |
74 | </table> |
|
88 | </table> |
@@ -1,96 +1,94 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%inherit file="base.mako"/> |
|
2 | <%inherit file="base.mako"/> | |
3 |
|
3 | |||
4 |
|
4 | |||
5 | <%def name="subject()" filter="n,trim"> |
|
5 | <%def name="subject()" filter="n,trim"> | |
6 | <% |
|
6 | <% | |
7 | data = { |
|
7 | data = { | |
8 | 'user': h.person(user), |
|
8 | 'user': h.person(user), | |
9 | 'pr_title': pull_request.title, |
|
9 | 'pr_title': pull_request.title, | |
10 | 'pr_id': pull_request.pull_request_id, |
|
10 | 'pr_id': pull_request.pull_request_id, | |
11 | 'status': status_change, |
|
11 | 'status': status_change, | |
12 | 'comment_file': comment_file, |
|
12 | 'comment_file': comment_file, | |
13 | 'comment_line': comment_line, |
|
13 | 'comment_line': comment_line, | |
14 | } |
|
14 | } | |
15 | %> |
|
15 | %> | |
16 |
|
16 | |||
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 |
|
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 |
|
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 |
|
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 | |||
31 | <%def name="body_plaintext()" filter="n,trim"> |
|
30 | <%def name="body_plaintext()" filter="n,trim"> | |
32 | <% |
|
31 | <% | |
33 | data = { |
|
32 | data = { | |
34 | 'user': h.person(user), |
|
33 | 'user': h.person(user), | |
35 | 'pr_title': pull_request.title, |
|
34 | 'pr_title': pull_request.title, | |
36 | 'pr_id': pull_request.pull_request_id, |
|
35 | 'pr_id': pull_request.pull_request_id, | |
37 | 'status': status_change, |
|
36 | 'status': status_change, | |
38 | 'comment_file': comment_file, |
|
37 | 'comment_file': comment_file, | |
39 | 'comment_line': comment_line, |
|
38 | 'comment_line': comment_line, | |
40 | } |
|
39 | } | |
41 | %> |
|
40 | %> | |
42 | ${self.subject()} |
|
41 | ${self.subject()} | |
43 |
|
42 | |||
44 | * ${_('Comment link')}: ${pr_comment_url} |
|
43 | * ${_('Comment link')}: ${pr_comment_url} | |
45 |
|
44 | |||
46 | * ${_('Source repository')}: ${pr_source_repo_url} |
|
45 | * ${_('Source repository')}: ${pr_source_repo_url} | |
47 |
|
46 | |||
48 | %if comment_file: |
|
47 | %if comment_file: | |
49 | * ${_('File: %(comment_file)s on line %(comment_line)s') % {'comment_file': comment_file, 'comment_line': comment_line}} |
|
48 | * ${_('File: %(comment_file)s on line %(comment_line)s') % {'comment_file': comment_file, 'comment_line': comment_line}} | |
50 | %endif |
|
49 | %endif | |
51 |
|
50 | |||
52 | --- |
|
51 | --- | |
53 |
|
52 | |||
54 | %if status_change and not closing_pr: |
|
53 | %if status_change and not closing_pr: | |
55 | ${_('%(user)s submitted pull request #%(pr_id)s status: *%(status)s*') % data} |
|
54 | ${_('%(user)s submitted pull request #%(pr_id)s status: *%(status)s*') % data} | |
56 | %elif status_change and closing_pr: |
|
55 | %elif status_change and closing_pr: | |
57 | ${_('%(user)s submitted pull request #%(pr_id)s status: *%(status)s and closed*') % data} |
|
56 | ${_('%(user)s submitted pull request #%(pr_id)s status: *%(status)s and closed*') % data} | |
58 | %endif |
|
57 | %endif | |
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 | |||
66 |
|
64 | |||
67 | <% |
|
65 | <% | |
68 | data = { |
|
66 | data = { | |
69 | 'user': h.person(user), |
|
67 | 'user': h.person(user), | |
70 | 'pr_title': pull_request.title, |
|
68 | 'pr_title': pull_request.title, | |
71 | 'pr_id': pull_request.pull_request_id, |
|
69 | 'pr_id': pull_request.pull_request_id, | |
72 | 'status': status_change, |
|
70 | 'status': status_change, | |
73 | 'comment_file': comment_file, |
|
71 | 'comment_file': comment_file, | |
74 | 'comment_line': comment_line, |
|
72 | 'comment_line': comment_line, | |
75 | } |
|
73 | } | |
76 | %> |
|
74 | %> | |
77 | <table style="text-align:left;vertical-align:middle;"> |
|
75 | <table style="text-align:left;vertical-align:middle;"> | |
78 | <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;"> |
|
76 | <tr><td colspan="2" style="width:100%;padding-bottom:15px;border-bottom:1px solid #dbd9da;"> | |
79 | <h4><a href="${pr_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer"> |
|
77 | <h4><a href="${pr_comment_url}" style="color:#427cc9;text-decoration:none;cursor:pointer"> | |
80 |
|
78 | |||
81 | % if comment_file: |
|
79 | % if comment_file: | |
82 | ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (file:`%(comment_file)s`)') % data |n} |
|
80 | ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s" (file:`%(comment_file)s`)') % data |n} | |
83 | % else: |
|
81 | % else: | |
84 | ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s"') % data |n} |
|
82 | ${_('%(user)s commented on pull request #%(pr_id)s "%(pr_title)s"') % data |n} | |
85 | % endif |
|
83 | % endif | |
86 | </a> |
|
84 | </a> | |
87 | %if status_change and not closing_pr: |
|
85 | %if status_change and not closing_pr: | |
88 | , ${_('submitted pull request status: %(status)s') % data} |
|
86 | , ${_('submitted pull request status: %(status)s') % data} | |
89 | %elif status_change and closing_pr: |
|
87 | %elif status_change and closing_pr: | |
90 | , ${_('submitted pull request status: %(status)s and closed') % data} |
|
88 | , ${_('submitted pull request status: %(status)s and closed') % data} | |
91 | %endif |
|
89 | %endif | |
92 | </h4> |
|
90 | </h4> | |
93 | </td></tr> |
|
91 | </td></tr> | |
94 | <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> |
|
92 | <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> | |
95 | <tr><td style="padding-right:20px;">${(_('Comment on line: %(comment_line)s') if comment_file else _('Comment')) % data}</td><td style="line-height:1.2em;">${h.render(comment_body, renderer=renderer_type, mentions=True)}</td></tr> |
|
93 | <tr><td style="padding-right:20px;">${(_('Comment on line: %(comment_line)s') if comment_file else _('Comment')) % data}</td><td style="line-height:1.2em;">${h.render(comment_body, renderer=renderer_type, mentions=True)}</td></tr> | |
96 | </table> |
|
94 | </table> |
General Comments 0
You need to be logged in to leave comments.
Login now