Show More
@@ -1,112 +1,117 b'' | |||
|
1 | 1 | ## Changesets table ! |
|
2 | 2 | <%namespace name="base" file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | %if c.ancestor: |
|
5 | 5 | <div class="ancestor">${_('Common Ancestor Commit')}: |
|
6 | 6 | <a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=c.ancestor)}"> |
|
7 | 7 | ${h.short_id(c.ancestor)} |
|
8 | 8 | </a>. ${_('Compare was calculated based on this shared commit.')} |
|
9 | 9 | <input id="common_ancestor" type="hidden" name="common_ancestor" value="${c.ancestor}"> |
|
10 | 10 | </div> |
|
11 | 11 | %endif |
|
12 | 12 | |
|
13 | 13 | <div class="container"> |
|
14 | 14 | <input type="hidden" name="__start__" value="revisions:sequence"> |
|
15 | 15 | <table class="rctable compare_view_commits"> |
|
16 | 16 | <tr> |
|
17 | 17 | <th>${_('Time')}</th> |
|
18 | 18 | <th>${_('Author')}</th> |
|
19 | 19 | <th>${_('Commit')}</th> |
|
20 | 20 | <th></th> |
|
21 | 21 | <th>${_('Description')}</th> |
|
22 | 22 | </tr> |
|
23 | ## to speed up lookups cache some functions before the loop | |
|
24 | <% | |
|
25 | active_patterns = h.get_active_pattern_entries(c.repo_name) | |
|
26 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) | |
|
27 | %> | |
|
23 | 28 |
|
|
24 | 29 | <tr id="row-${commit.raw_id}" |
|
25 | 30 | commit_id="${commit.raw_id}" |
|
26 | 31 | class="compare_select" |
|
27 | 32 | style="${'display: none' if c.collapse_all_commits else ''}" |
|
28 | 33 | > |
|
29 | 34 | <td class="td-time"> |
|
30 | 35 | ${h.age_component(commit.date)} |
|
31 | 36 | </td> |
|
32 | 37 | <td class="td-user"> |
|
33 | 38 | ${base.gravatar_with_user(commit.author, 16)} |
|
34 | 39 | </td> |
|
35 | 40 | <td class="td-hash"> |
|
36 | 41 | <code> |
|
37 | 42 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> |
|
38 | 43 | r${commit.revision}:${h.short_id(commit.raw_id)} |
|
39 | 44 | </a> |
|
40 | 45 | ${h.hidden('revisions',commit.raw_id)} |
|
41 | 46 | </code> |
|
42 | 47 | </td> |
|
43 | 48 | <td class="expand_commit" |
|
44 | 49 | data-commit-id="${commit.raw_id}" |
|
45 | 50 | title="${_( 'Expand commit message')}" |
|
46 | 51 | > |
|
47 | 52 | <div class="show_more_col"> |
|
48 | 53 | <i class="show_more"></i> |
|
49 | 54 | </div> |
|
50 | 55 | </td> |
|
51 | 56 | <td class="mid td-description"> |
|
52 | 57 | <div class="log-container truncate-wrap"> |
|
53 | 58 | <div |
|
54 | 59 | id="c-${commit.raw_id}" |
|
55 | 60 | class="message truncate" |
|
56 | 61 | data-message-raw="${commit.message}" |
|
57 | 62 | > |
|
58 |
${ |
|
|
63 | ${urlify_commit_message(commit.message, c.repo_name)} | |
|
59 | 64 | </div> |
|
60 | 65 | </div> |
|
61 | 66 | </td> |
|
62 | 67 | </tr> |
|
63 | 68 | %endfor |
|
64 | 69 | <tr class="compare_select_hidden" style="${'' if c.collapse_all_commits else 'display: none'}"> |
|
65 | 70 | <td colspan="5"> |
|
66 | 71 | ${_ungettext('%s commit hidden','%s commits hidden', len(c.commit_ranges)) % len(c.commit_ranges)}, |
|
67 | 72 | <a href="#" onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false">${_ungettext('show it','show them', len(c.commit_ranges))}</a> |
|
68 | 73 | </td> |
|
69 | 74 | </tr> |
|
70 | 75 | % if not c.commit_ranges: |
|
71 | 76 | <tr class="compare_select"> |
|
72 | 77 | <td colspan="5"> |
|
73 | 78 | ${_('No commits in this compare')} |
|
74 | 79 | </td> |
|
75 | 80 | </tr> |
|
76 | 81 | % endif |
|
77 | 82 | </table> |
|
78 | 83 | <input type="hidden" name="__end__" value="revisions:sequence"> |
|
79 | 84 | |
|
80 | 85 | </div> |
|
81 | 86 | |
|
82 | 87 | <script> |
|
83 | 88 | $('.expand_commit').on('click',function(e){ |
|
84 | 89 | var target_expand = $(this); |
|
85 | 90 | var cid = target_expand.data('commitId'); |
|
86 | 91 | |
|
87 | 92 | // ## TODO: dan: extract styles into css, and just toggleClass('open') here |
|
88 | 93 | if (target_expand.hasClass('open')){ |
|
89 | 94 | $('#c-'+cid).css({ |
|
90 | 95 | 'height': '1.5em', |
|
91 | 96 | 'white-space': 'nowrap', |
|
92 | 97 | 'text-overflow': 'ellipsis', |
|
93 | 98 | 'overflow':'hidden' |
|
94 | 99 | }); |
|
95 | 100 | target_expand.removeClass('open'); |
|
96 | 101 | } |
|
97 | 102 | else { |
|
98 | 103 | $('#c-'+cid).css({ |
|
99 | 104 | 'height': 'auto', |
|
100 | 105 | 'white-space': 'pre-line', |
|
101 | 106 | 'text-overflow': 'initial', |
|
102 | 107 | 'overflow':'visible' |
|
103 | 108 | }); |
|
104 | 109 | target_expand.addClass('open'); |
|
105 | 110 | } |
|
106 | 111 | }); |
|
107 | 112 | |
|
108 | 113 | $('.compare_select').on('click',function(e){ |
|
109 | 114 | var cid = $(this).attr('commit_id'); |
|
110 | 115 | $('#row-'+cid).toggleClass('hl', !$('#row-'+cid).hasClass('hl')); |
|
111 | 116 | }); |
|
112 | 117 | </script> |
@@ -1,136 +1,142 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%namespace name="base" file="/base/base.mako"/> |
|
3 | 3 | %if c.repo_commits: |
|
4 | 4 | <table class="rctable repo_summary table_disp"> |
|
5 | 5 | <tr> |
|
6 | 6 | |
|
7 | 7 | <th class="status" colspan="2"></th> |
|
8 | 8 | <th>${_('Commit')}</th> |
|
9 | 9 | <th>${_('Commit message')}</th> |
|
10 | 10 | <th>${_('Age')}</th> |
|
11 | 11 | <th>${_('Author')}</th> |
|
12 | 12 | <th>${_('Refs')}</th> |
|
13 | 13 | </tr> |
|
14 | ||
|
15 | ## to speed up lookups cache some functions before the loop | |
|
16 | <% | |
|
17 | active_patterns = h.get_active_pattern_entries(c.repo_name) | |
|
18 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) | |
|
19 | %> | |
|
14 | 20 | %for cnt,cs in enumerate(c.repo_commits): |
|
15 | 21 | <tr class="parity${cnt%2}"> |
|
16 | 22 | |
|
17 | 23 | <td class="td-status"> |
|
18 | 24 | %if c.statuses.get(cs.raw_id): |
|
19 | 25 | <div class="changeset-status-ico shortlog"> |
|
20 | 26 | %if c.statuses.get(cs.raw_id)[2]: |
|
21 | 27 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (c.statuses.get(cs.raw_id)[0], c.statuses.get(cs.raw_id)[2])}" href="${h.route_path('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> |
|
22 | 28 | <div class="${'flag_status {}'.format(c.statuses.get(cs.raw_id)[0])}"></div> |
|
23 | 29 | </a> |
|
24 | 30 | %else: |
|
25 | 31 | <a class="tooltip" title="${_('Commit status: {}').format(h.commit_status_lbl(c.statuses.get(cs.raw_id)[0]))}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=cs.raw_id,_anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
26 | 32 | <div class="${'flag_status {}'.format(c.statuses.get(cs.raw_id)[0])}"></div> |
|
27 | 33 | </a> |
|
28 | 34 | %endif |
|
29 | 35 | </div> |
|
30 | 36 | %else: |
|
31 | 37 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> |
|
32 | 38 | %endif |
|
33 | 39 | </td> |
|
34 | 40 | <td class="td-comments"> |
|
35 | 41 | %if c.comments.get(cs.raw_id,[]): |
|
36 | 42 | <a title="${_('Commit has comments')}" href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=cs.raw_id,_anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
37 | 43 | <i class="icon-comment"></i> ${len(c.comments[cs.raw_id])} |
|
38 | 44 | </a> |
|
39 | 45 | %endif |
|
40 | 46 | </td> |
|
41 | 47 | <td class="td-commit"> |
|
42 | 48 | <pre><a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=cs.raw_id)}">${h.show_id(cs)}</a></pre> |
|
43 | 49 | </td> |
|
44 | 50 | |
|
45 | 51 | <td class="td-description mid"> |
|
46 | 52 | <div class="log-container truncate-wrap"> |
|
47 |
<div class="message truncate" id="c-${cs.raw_id}">${ |
|
|
53 | <div class="message truncate" id="c-${cs.raw_id}">${urlify_commit_message(cs.message, c.repo_name)}</div> | |
|
48 | 54 | </div> |
|
49 | 55 | </td> |
|
50 | 56 | |
|
51 | 57 | <td class="td-time"> |
|
52 | 58 | ${h.age_component(cs.date)} |
|
53 | 59 | </td> |
|
54 | 60 | <td class="td-user author"> |
|
55 | 61 | ${base.gravatar_with_user(cs.author)} |
|
56 | 62 | </td> |
|
57 | 63 | |
|
58 | 64 | <td class="td-tags"> |
|
59 | 65 | <div class="autoexpand"> |
|
60 | 66 | %if h.is_hg(c.rhodecode_repo): |
|
61 | 67 | %for book in cs.bookmarks: |
|
62 | 68 | <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}"> |
|
63 | 69 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=cs.raw_id, _query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
64 | 70 | </span> |
|
65 | 71 | %endfor |
|
66 | 72 | %endif |
|
67 | 73 | ## tags |
|
68 | 74 | %for tag in cs.tags: |
|
69 | 75 | <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}"> |
|
70 | 76 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=cs.raw_id, _query=dict(at=tag))}"><i class="icon-tag"></i>${h.shorter(tag)}</a> |
|
71 | 77 | </span> |
|
72 | 78 | %endfor |
|
73 | 79 | |
|
74 | 80 | ## branch |
|
75 | 81 | %if cs.branch: |
|
76 | 82 | <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % cs.branch)}"> |
|
77 | 83 | <a href="${h.route_path('repo_changelog',repo_name=c.repo_name,_query=dict(branch=cs.branch))}"><i class="icon-code-fork"></i>${h.shorter(cs.branch)}</a> |
|
78 | 84 | </span> |
|
79 | 85 | %endif |
|
80 | 86 | </div> |
|
81 | 87 | </td> |
|
82 | 88 | </tr> |
|
83 | 89 | %endfor |
|
84 | 90 | |
|
85 | 91 | </table> |
|
86 | 92 | |
|
87 | 93 | <script type="text/javascript"> |
|
88 | 94 | $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 2000, scrollTo: false, push: false}); |
|
89 | 95 | $(document).on('pjax:success', function(){ timeagoActivate(); }); |
|
90 | 96 | </script> |
|
91 | 97 | |
|
92 | 98 | <div class="pagination-wh pagination-left"> |
|
93 | 99 | ${c.repo_commits.pager('$link_previous ~2~ $link_next')} |
|
94 | 100 | </div> |
|
95 | 101 | %else: |
|
96 | 102 | |
|
97 | 103 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
98 | 104 | <div class="quick_start"> |
|
99 | 105 | <div class="fieldset"> |
|
100 | 106 | <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div> |
|
101 | 107 | <div class="right-content"> |
|
102 | 108 | <div id="add_node_id" class="add_node"> |
|
103 | 109 | <a href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=0, f_path='', _anchor='edit')}" class="btn btn-default">${_('Add New File')}</a> |
|
104 | 110 | </div> |
|
105 | 111 | </div> |
|
106 | 112 | %endif |
|
107 | 113 | </div> |
|
108 | 114 | |
|
109 | 115 | %if not h.is_svn(c.rhodecode_repo): |
|
110 | 116 | <div class="fieldset"> |
|
111 | 117 | <div class="left-label">${_('Push new repo:')}</div> |
|
112 | 118 | <div class="right-content"> |
|
113 | 119 | <pre> |
|
114 | 120 | ${c.rhodecode_repo.alias} clone ${c.clone_repo_url} |
|
115 | 121 | ${c.rhodecode_repo.alias} add README # add first file |
|
116 | 122 | ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message |
|
117 | 123 | ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back |
|
118 | 124 | </pre> |
|
119 | 125 | </div> |
|
120 | 126 | </div> |
|
121 | 127 | <div class="fieldset"> |
|
122 | 128 | <div class="left-label">${_('Existing repository?')}</div> |
|
123 | 129 | <div class="right-content"> |
|
124 | 130 | <pre> |
|
125 | 131 | %if h.is_git(c.rhodecode_repo): |
|
126 | 132 | git remote add origin ${c.clone_repo_url} |
|
127 | 133 | git push -u origin master |
|
128 | 134 | %else: |
|
129 | 135 | hg push ${c.clone_repo_url} |
|
130 | 136 | %endif |
|
131 | 137 | </pre> |
|
132 | 138 | </div> |
|
133 | 139 | </div> |
|
134 | 140 | %endif |
|
135 | 141 | </div> |
|
136 | 142 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now