Show More
@@ -1,145 +1,150 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 | 14 | |
|
15 | 15 | ## to speed up lookups cache some functions before the loop |
|
16 | 16 | <% |
|
17 | 17 | active_patterns = h.get_active_pattern_entries(c.repo_name) |
|
18 | 18 | urlify_commit_message = h.partial(h.urlify_commit_message, active_pattern_entries=active_patterns) |
|
19 | 19 | %> |
|
20 | 20 | %for cnt,cs in enumerate(c.repo_commits): |
|
21 | 21 | <tr class="parity${cnt%2}"> |
|
22 | 22 | |
|
23 | 23 | <td class="td-status"> |
|
24 | 24 | %if c.statuses.get(cs.raw_id): |
|
25 | 25 | <div class="changeset-status-ico shortlog"> |
|
26 | 26 | %if c.statuses.get(cs.raw_id)[2]: |
|
27 | 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])}"> |
|
28 | 28 | <div class="${'flag_status {}'.format(c.statuses.get(cs.raw_id)[0])}"></div> |
|
29 | 29 | </a> |
|
30 | 30 | %else: |
|
31 | 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)}"> |
|
32 | 32 | <div class="${'flag_status {}'.format(c.statuses.get(cs.raw_id)[0])}"></div> |
|
33 | 33 | </a> |
|
34 | 34 | %endif |
|
35 | 35 | </div> |
|
36 | 36 | %else: |
|
37 | 37 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> |
|
38 | 38 | %endif |
|
39 | 39 | </td> |
|
40 | 40 | <td class="td-comments"> |
|
41 | 41 | %if c.comments.get(cs.raw_id,[]): |
|
42 | 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)}"> |
|
43 | 43 | <i class="icon-comment"></i> ${len(c.comments[cs.raw_id])} |
|
44 | 44 | </a> |
|
45 | 45 | %endif |
|
46 | 46 | </td> |
|
47 | 47 | <td class="td-commit"> |
|
48 | 48 | <code> |
|
49 | 49 | <a href="${h.route_path('repo_commit', repo_name=c.repo_name, commit_id=cs.raw_id)}">${h.show_id(cs)}</a> |
|
50 | 50 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${cs.raw_id}" title="${_('Copy the full commit id')}"></i> |
|
51 | 51 | </code> |
|
52 | 52 | </td> |
|
53 | 53 | |
|
54 | 54 | <td class="td-description mid"> |
|
55 | 55 | <div class="log-container truncate-wrap"> |
|
56 | 56 | <div class="message truncate" id="c-${cs.raw_id}">${urlify_commit_message(cs.message, c.repo_name)}</div> |
|
57 | 57 | </div> |
|
58 | 58 | </td> |
|
59 | 59 | |
|
60 | 60 | <td class="td-time"> |
|
61 | 61 | ${h.age_component(cs.date)} |
|
62 | 62 | </td> |
|
63 | 63 | <td class="td-user author"> |
|
64 | 64 | ${base.gravatar_with_user(cs.author)} |
|
65 | 65 | </td> |
|
66 | 66 | |
|
67 | 67 | <td class="td-tags"> |
|
68 | 68 | <div class="autoexpand"> |
|
69 | 69 | %if h.is_hg(c.rhodecode_repo): |
|
70 | 70 | %for book in cs.bookmarks: |
|
71 | 71 | <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}"> |
|
72 | 72 | <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> |
|
73 | 73 | </span> |
|
74 | 74 | %endfor |
|
75 | 75 | %endif |
|
76 | 76 | ## tags |
|
77 | 77 | %for tag in cs.tags: |
|
78 | 78 | <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}"> |
|
79 | 79 | <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> |
|
80 | 80 | </span> |
|
81 | 81 | %endfor |
|
82 | 82 | |
|
83 | 83 | ## branch |
|
84 | 84 | %if cs.branch: |
|
85 | 85 | <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % cs.branch)}"> |
|
86 | 86 | <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> |
|
87 | 87 | </span> |
|
88 | 88 | %endif |
|
89 | 89 | </div> |
|
90 | 90 | </td> |
|
91 | 91 | </tr> |
|
92 | 92 | %endfor |
|
93 | 93 | |
|
94 | 94 | </table> |
|
95 | 95 | |
|
96 | 96 | <script type="text/javascript"> |
|
97 |
$(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: |
|
|
97 | $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 5000, scrollTo: false, push: false}); | |
|
98 | 98 | $(document).on('pjax:success', function(){ timeagoActivate(); }); |
|
99 | $(document).on('pjax:timeout', function(event) { | |
|
100 | // Prevent default timeout redirection behavior | |
|
101 | event.preventDefault() | |
|
102 | }) | |
|
103 | ||
|
99 | 104 | </script> |
|
100 | 105 | |
|
101 | 106 | <div class="pagination-wh pagination-left"> |
|
102 | 107 | ${c.repo_commits.pager('$link_previous ~2~ $link_next')} |
|
103 | 108 | </div> |
|
104 | 109 | %else: |
|
105 | 110 | |
|
106 | 111 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
107 | 112 | <div class="quick_start"> |
|
108 | 113 | <div class="fieldset"> |
|
109 | 114 | <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div> |
|
110 | 115 | <div class="right-content"> |
|
111 | 116 | <div id="add_node_id" class="add_node"> |
|
112 | 117 | <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> |
|
113 | 118 | </div> |
|
114 | 119 | </div> |
|
115 | 120 | %endif |
|
116 | 121 | </div> |
|
117 | 122 | |
|
118 | 123 | %if not h.is_svn(c.rhodecode_repo): |
|
119 | 124 | <div class="fieldset"> |
|
120 | 125 | <div class="left-label">${_('Push new repo:')}</div> |
|
121 | 126 | <div class="right-content"> |
|
122 | 127 | <pre> |
|
123 | 128 | ${c.rhodecode_repo.alias} clone ${c.clone_repo_url} |
|
124 | 129 | ${c.rhodecode_repo.alias} add README # add first file |
|
125 | 130 | ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message |
|
126 | 131 | ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back |
|
127 | 132 | </pre> |
|
128 | 133 | </div> |
|
129 | 134 | </div> |
|
130 | 135 | <div class="fieldset"> |
|
131 | 136 | <div class="left-label">${_('Existing repository?')}</div> |
|
132 | 137 | <div class="right-content"> |
|
133 | 138 | <pre> |
|
134 | 139 | %if h.is_git(c.rhodecode_repo): |
|
135 | 140 | git remote add origin ${c.clone_repo_url} |
|
136 | 141 | git push -u origin master |
|
137 | 142 | %else: |
|
138 | 143 | hg push ${c.clone_repo_url} |
|
139 | 144 | %endif |
|
140 | 145 | </pre> |
|
141 | 146 | </div> |
|
142 | 147 | </div> |
|
143 | 148 | %endif |
|
144 | 149 | </div> |
|
145 | 150 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now