Show More
@@ -1,88 +1,88 b'' | |||||
1 | ## Changesets table ! |
|
1 | ## Changesets table ! | |
2 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | <%namespace name="base" file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | %if c.ancestor: |
|
4 | %if c.ancestor: | |
5 | <div class="ancestor">${_('Compare was calculated based on this common ancestor commit')}: |
|
5 | <div class="ancestor">${_('Compare was calculated based on this common ancestor commit')}: | |
6 | <a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=c.ancestor)}">${h.short_id(c.ancestor)}</a> |
|
6 | <a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=c.ancestor)}">${h.short_id(c.ancestor)}</a> | |
7 | <input id="common_ancestor" type="hidden" name="common_ancestor" value="${c.ancestor}"> |
|
7 | <input id="common_ancestor" type="hidden" name="common_ancestor" value="${c.ancestor}"> | |
8 | </div> |
|
8 | </div> | |
9 | %endif |
|
9 | %endif | |
10 |
|
10 | |||
11 | <div class="container"> |
|
11 | <div class="container"> | |
12 | <input type="hidden" name="__start__" value="revisions:sequence"> |
|
12 | <input type="hidden" name="__start__" value="revisions:sequence"> | |
13 | <table class="rctable compare_view_commits"> |
|
13 | <table class="rctable compare_view_commits"> | |
14 | <tr> |
|
14 | <tr> | |
15 | % if hasattr(c, 'commit_versions'): |
|
15 | % if hasattr(c, 'commit_versions'): | |
16 | <th>ver</th> |
|
16 | <th>ver</th> | |
17 | % endif |
|
17 | % endif | |
18 | <th>${_('Time')}</th> |
|
18 | <th>${_('Time')}</th> | |
19 | <th>${_('Author')}</th> |
|
19 | <th>${_('Author')}</th> | |
20 | <th>${_('Commit')}</th> |
|
20 | <th>${_('Commit')}</th> | |
21 | <th></th> |
|
21 | <th></th> | |
22 | <th>${_('Description')}</th> |
|
22 | <th>${_('Description')}</th> | |
23 | </tr> |
|
23 | </tr> | |
24 | ## to speed up lookups cache some functions before the loop |
|
24 | ## to speed up lookups cache some functions before the loop | |
25 | <% |
|
25 | <% | |
26 | active_patterns = h.get_active_pattern_entries(c.repo_name) |
|
26 | active_patterns = h.get_active_pattern_entries(c.repo_name) | |
27 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) |
|
27 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) | |
28 | %> |
|
28 | %> | |
29 |
|
29 | |||
30 | %for commit in c.commit_ranges: |
|
30 | %for commit in c.commit_ranges: | |
31 | <tr id="row-${commit.raw_id}" |
|
31 | <tr id="row-${commit.raw_id}" | |
32 | commit_id="${commit.raw_id}" |
|
32 | commit_id="${commit.raw_id}" | |
33 | class="compare_select" |
|
33 | class="compare_select" | |
34 | style="${'display: none' if c.collapse_all_commits else ''}" |
|
34 | style="${'display: none' if c.collapse_all_commits else ''}" | |
35 | > |
|
35 | > | |
36 | % if hasattr(c, 'commit_versions'): |
|
36 | % if hasattr(c, 'commit_versions'): | |
37 | <td class="tooltip" title="${_('Pull request version this commit was introduced')}"> |
|
37 | <td class="tooltip" title="${_('Pull request version this commit was introduced')}"> | |
38 | <code>${('v{}'.format(c.commit_versions[commit.raw_id][0]) if c.commit_versions[commit.raw_id] else 'latest')}</code> |
|
38 | <code>${('v{}'.format(c.commit_versions[commit.raw_id][0]) if c.commit_versions[commit.raw_id] else 'latest')}</code> | |
39 | </td> |
|
39 | </td> | |
40 | % endif |
|
40 | % endif | |
41 | <td class="td-time"> |
|
41 | <td class="td-time"> | |
42 | ${h.age_component(commit.date)} |
|
42 | ${h.age_component(commit.date)} | |
43 | </td> |
|
43 | </td> | |
44 | <td class="td-user"> |
|
44 | <td class="td-user"> | |
45 | ${base.gravatar_with_user(commit.author, 16, tooltip=True)} |
|
45 | ${base.gravatar_with_user(commit.author, 16, tooltip=True)} | |
46 | </td> |
|
46 | </td> | |
47 | <td class="td-hash"> |
|
47 | <td class="td-hash"> | |
48 | <code> |
|
48 | <code> | |
49 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> |
|
49 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> | |
50 | r${commit.idx}:${h.short_id(commit.raw_id)} |
|
50 | r${commit.idx}:${h.short_id(commit.raw_id)} | |
51 | </a> |
|
51 | </a> | |
52 | ${h.hidden('revisions',commit.raw_id)} |
|
52 | ${h.hidden('revisions',commit.raw_id)} | |
53 | </code> |
|
53 | </code> | |
54 | </td> |
|
54 | </td> | |
55 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> |
|
55 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> | |
56 | <i class="icon-expand-linked"></i> |
|
56 | <i class="icon-expand-linked"></i> | |
57 | </td> |
|
57 | </td> | |
58 | <td class="mid td-description"> |
|
58 | <td class="mid td-description"> | |
59 | <div class="log-container truncate-wrap"> |
|
59 | <div class="log-container truncate-wrap"> | |
60 |
<div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}">${urlify_commit_message(commit.message, c.repo_name, issues_container_callback=getattr(c, 'referenced_commit_issues', |
|
60 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}">${urlify_commit_message(commit.message, c.repo_name, issues_container_callback=getattr(c, 'referenced_commit_issues', h.IssuesRegistry())(commit.serialize()))}</div> | |
61 | </div> |
|
61 | </div> | |
62 | </td> |
|
62 | </td> | |
63 | </tr> |
|
63 | </tr> | |
64 | %endfor |
|
64 | %endfor | |
65 | <tr class="compare_select_hidden" style="${('' if c.collapse_all_commits else 'display: none')}"> |
|
65 | <tr class="compare_select_hidden" style="${('' if c.collapse_all_commits else 'display: none')}"> | |
66 | <td colspan="5"> |
|
66 | <td colspan="5"> | |
67 | ${_ungettext('{} commit hidden, click expand to show them.', '{} commits hidden, click expand to show them.', len(c.commit_ranges)).format(len(c.commit_ranges))} |
|
67 | ${_ungettext('{} commit hidden, click expand to show them.', '{} commits hidden, click expand to show them.', len(c.commit_ranges)).format(len(c.commit_ranges))} | |
68 | </td> |
|
68 | </td> | |
69 | </tr> |
|
69 | </tr> | |
70 | % if not c.commit_ranges: |
|
70 | % if not c.commit_ranges: | |
71 | <tr class="compare_select"> |
|
71 | <tr class="compare_select"> | |
72 | <td colspan="5"> |
|
72 | <td colspan="5"> | |
73 | ${_('No commits in this compare')} |
|
73 | ${_('No commits in this compare')} | |
74 | </td> |
|
74 | </td> | |
75 | </tr> |
|
75 | </tr> | |
76 | % endif |
|
76 | % endif | |
77 | </table> |
|
77 | </table> | |
78 | <input type="hidden" name="__end__" value="revisions:sequence"> |
|
78 | <input type="hidden" name="__end__" value="revisions:sequence"> | |
79 |
|
79 | |||
80 | </div> |
|
80 | </div> | |
81 |
|
81 | |||
82 | <script> |
|
82 | <script> | |
83 | commitsController = new CommitsController(); |
|
83 | commitsController = new CommitsController(); | |
84 | $('.compare_select').on('click',function(e){ |
|
84 | $('.compare_select').on('click',function(e){ | |
85 | var cid = $(this).attr('commit_id'); |
|
85 | var cid = $(this).attr('commit_id'); | |
86 | $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); |
|
86 | $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); | |
87 | }); |
|
87 | }); | |
88 | </script> |
|
88 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now