Show More
@@ -1,414 +1,418 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 | <%inherit file="/base/base.html"/> |
|
3 | <%inherit file="/base/base.html"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('%s Changelog') % c.repo_name} |
|
6 | ${_('%s Changelog') % c.repo_name} | |
7 | %if c.changelog_for_path: |
|
7 | %if c.changelog_for_path: | |
8 | /${c.changelog_for_path} |
|
8 | /${c.changelog_for_path} | |
9 | %endif |
|
9 | %endif | |
10 | %if c.rhodecode_name: |
|
10 | %if c.rhodecode_name: | |
11 | · ${h.branding(c.rhodecode_name)} |
|
11 | · ${h.branding(c.rhodecode_name)} | |
12 | %endif |
|
12 | %endif | |
13 | </%def> |
|
13 | </%def> | |
14 |
|
14 | |||
15 | <%def name="breadcrumbs_links()"> |
|
15 | <%def name="breadcrumbs_links()"> | |
16 | %if c.changelog_for_path: |
|
16 | %if c.changelog_for_path: | |
17 | /${c.changelog_for_path} |
|
17 | /${c.changelog_for_path} | |
18 | %endif |
|
18 | %endif | |
19 | ${ungettext('showing %d out of %d commit', 'showing %d out of %d commits', c.showing_commits) % (c.showing_commits, c.total_cs)} |
|
19 | ${ungettext('showing %d out of %d commit', 'showing %d out of %d commits', c.showing_commits) % (c.showing_commits, c.total_cs)} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 | <%def name="menu_bar_nav()"> |
|
22 | <%def name="menu_bar_nav()"> | |
23 | ${self.menu_items(active='repositories')} |
|
23 | ${self.menu_items(active='repositories')} | |
24 | </%def> |
|
24 | </%def> | |
25 |
|
25 | |||
26 | <%def name="menu_bar_subnav()"> |
|
26 | <%def name="menu_bar_subnav()"> | |
27 | ${self.repo_menu(active='changelog')} |
|
27 | ${self.repo_menu(active='changelog')} | |
28 | </%def> |
|
28 | </%def> | |
29 |
|
29 | |||
30 | <%def name="main()"> |
|
30 | <%def name="main()"> | |
31 |
|
31 | |||
32 | <div class="box"> |
|
32 | <div class="box"> | |
33 | <div class="title"> |
|
33 | <div class="title"> | |
34 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
34 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
35 | <ul class="links"> |
|
35 | <ul class="links"> | |
36 | <li> |
|
36 | <li> | |
37 | <a href="#" class="btn btn-small" id="rev_range_container" style="display:none;"></a> |
|
37 | <a href="#" class="btn btn-small" id="rev_range_container" style="display:none;"></a> | |
38 | %if c.rhodecode_db_repo.fork: |
|
38 | %if c.rhodecode_db_repo.fork: | |
39 | <span> |
|
39 | <span> | |
40 | <a id="compare_fork_button" |
|
40 | <a id="compare_fork_button" | |
41 | title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" |
|
41 | title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" | |
42 | class="btn btn-small" |
|
42 | class="btn btn-small" | |
43 | href="${h.url('compare_url', |
|
43 | href="${h.url('compare_url', | |
44 | repo_name=c.rhodecode_db_repo.fork.repo_name, |
|
44 | repo_name=c.rhodecode_db_repo.fork.repo_name, | |
45 | source_ref_type=c.rhodecode_db_repo.landing_rev[0], |
|
45 | source_ref_type=c.rhodecode_db_repo.landing_rev[0], | |
46 | source_ref=c.rhodecode_db_repo.landing_rev[1], |
|
46 | source_ref=c.rhodecode_db_repo.landing_rev[1], | |
47 | target_repo=c.repo_name, |
|
47 | target_repo=c.repo_name, | |
48 | target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0], |
|
48 | target_ref_type='branch' if request.GET.get('branch') else c.rhodecode_db_repo.landing_rev[0], | |
49 | target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], |
|
49 | target_ref=request.GET.get('branch') or c.rhodecode_db_repo.landing_rev[1], | |
50 | merge=1) |
|
50 | merge=1) | |
51 | }"> |
|
51 | }"> | |
52 | <i class="icon-loop"></i> |
|
52 | <i class="icon-loop"></i> | |
53 | ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)} |
|
53 | ${_('Compare fork with Parent (%s)' % c.rhodecode_db_repo.fork.repo_name)} | |
54 | </a> |
|
54 | </a> | |
55 | </span> |
|
55 | </span> | |
56 | %endif |
|
56 | %endif | |
57 |
|
57 | |||
58 | ## pr open link |
|
58 | ## pr open link | |
59 | %if h.is_hg(c.rhodecode_repo) or h.is_git(c.rhodecode_repo): |
|
59 | %if h.is_hg(c.rhodecode_repo) or h.is_git(c.rhodecode_repo): | |
60 | <span> |
|
60 | <span> | |
61 | <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"> |
|
61 | <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"> | |
62 | ${_('Open new pull request')} |
|
62 | ${_('Open new pull request')} | |
63 | </a> |
|
63 | </a> | |
64 | </span> |
|
64 | </span> | |
65 | %endif |
|
65 | %endif | |
66 |
|
66 | |||
67 | ## clear selection |
|
67 | ## clear selection | |
68 | <div title="${_('Clear selection')}" class="btn" id="rev_range_clear" style="display:none"> |
|
68 | <div title="${_('Clear selection')}" class="btn" id="rev_range_clear" style="display:none"> | |
69 | ${_('Clear selection')} |
|
69 | ${_('Clear selection')} | |
70 | </div> |
|
70 | </div> | |
71 |
|
71 | |||
72 | </li> |
|
72 | </li> | |
73 | </ul> |
|
73 | </ul> | |
74 | </div> |
|
74 | </div> | |
75 |
|
75 | |||
76 | % if c.pagination: |
|
76 | % if c.pagination: | |
77 |
|
77 | |||
78 | <div class="graph-header"> |
|
78 | <div class="graph-header"> | |
79 | <div id="filter_changelog"> |
|
79 | <div id="filter_changelog"> | |
80 | ${h.hidden('branch_filter')} |
|
80 | ${h.hidden('branch_filter')} | |
81 | %if c.selected_name: |
|
81 | %if c.selected_name: | |
82 | <div class="btn btn-default" id="clear_filter" > |
|
82 | <div class="btn btn-default" id="clear_filter" > | |
83 | ${_('Clear filter')} |
|
83 | ${_('Clear filter')} | |
84 | </div> |
|
84 | </div> | |
85 | %endif |
|
85 | %endif | |
86 | </div> |
|
86 | </div> | |
87 | ${self.breadcrumbs('breadcrumbs_light')} |
|
87 | ${self.breadcrumbs('breadcrumbs_light')} | |
88 | </div> |
|
88 | </div> | |
89 |
|
89 | |||
90 | <div id="graph"> |
|
90 | <div id="graph"> | |
91 | <div class="graph-col-wrapper"> |
|
91 | <div class="graph-col-wrapper"> | |
92 | <div id="graph_nodes"> |
|
92 | <div id="graph_nodes"> | |
93 | <div id="graph_canvas" data-graph='${c.jsdata|n}'></div> |
|
93 | <div id="graph_canvas" data-graph='${c.jsdata|n}'></div> | |
94 | </div> |
|
94 | </div> | |
95 | <div id="graph_content" class="main-content graph_full_width"> |
|
95 | <div id="graph_content" class="main-content graph_full_width"> | |
96 |
|
96 | |||
97 | <div class="table"> |
|
97 | <div class="table"> | |
98 | <table id="changesets" class="rctable"> |
|
98 | <table id="changesets" class="rctable"> | |
99 | <tr> |
|
99 | <tr> | |
100 |
|
|
100 | ## checkbox | |
101 | <th></th> |
|
101 | <th></th> | |
102 |
<th> |
|
102 | <th colspan="2"></th> | |
103 | <th>${_('Age')}</th> |
|
103 | ||
|
104 | <th>${_('Commit')}</th> | |||
|
105 | ## commit message expand arrow | |||
104 | <th></th> |
|
106 | <th></th> | |
105 | <th>${_('Commit Message')}</th> |
|
107 | <th>${_('Commit Message')}</th> | |
106 | <th>${_('Commit')}</th> |
|
108 | ||
107 | <th></th> |
|
109 | <th>${_('Age')}</th> | |
|
110 | <th>${_('Author')}</th> | |||
|
111 | ||||
108 | <th>${_('Refs')}</th> |
|
112 | <th>${_('Refs')}</th> | |
109 | </tr> |
|
113 | </tr> | |
110 | <tbody> |
|
114 | <tbody> | |
111 | %for cnt,commit in enumerate(c.pagination): |
|
115 | %for cnt,commit in enumerate(c.pagination): | |
112 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
116 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> | |
113 |
|
117 | |||
114 | <td class="td-checkbox"> |
|
118 | <td class="td-checkbox"> | |
115 | ${h.checkbox(commit.raw_id,class_="commit-range")} |
|
119 | ${h.checkbox(commit.raw_id,class_="commit-range")} | |
116 | </td> |
|
120 | </td> | |
117 | <td class="td-status"> |
|
121 | <td class="td-status"> | |
118 |
|
122 | |||
119 | %if c.statuses.get(commit.raw_id): |
|
123 | %if c.statuses.get(commit.raw_id): | |
120 | <div class="changeset-status-ico"> |
|
124 | <div class="changeset-status-ico"> | |
121 | %if c.statuses.get(commit.raw_id)[2]: |
|
125 | %if c.statuses.get(commit.raw_id)[2]: | |
122 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]), c.statuses.get(commit.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> |
|
126 | <a class="tooltip" title="${_('Commit status: %s\nClick to open associated pull request #%s') % (h.commit_status_lbl(c.statuses.get(commit.raw_id)[0]), c.statuses.get(commit.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> | |
123 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> |
|
127 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> | |
124 | </a> |
|
128 | </a> | |
125 | %else: |
|
129 | %else: | |
126 | <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(commit.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> |
|
130 | <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(commit.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> | |
127 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> |
|
131 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> | |
128 | </a> |
|
132 | </a> | |
129 | %endif |
|
133 | %endif | |
130 | </div> |
|
134 | </div> | |
|
135 | %else: | |||
|
136 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> | |||
131 | %endif |
|
137 | %endif | |
132 | </td> |
|
138 | </td> | |
133 |
<td class="td- |
|
139 | <td class="td-comments comments-col"> | |
134 | ${self.gravatar_with_user(commit.author)} |
|
140 | %if c.comments.get(commit.raw_id): | |
135 | </td> |
|
141 | <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> | |
136 | <td class="td-time"> |
|
142 | <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[commit.raw_id])} | |
137 | ${h.age_component(commit.date)} |
|
143 | </a> | |
|
144 | %endif | |||
138 | </td> |
|
145 | </td> | |
139 |
|
||||
140 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}"> |
|
|||
141 | <div class="show_more_col"> |
|
|||
142 | <i class="show_more"></i> |
|
|||
143 | </div> |
|
|||
144 | </td> |
|
|||
145 | <td class="mid td-description"> |
|
|||
146 | <div class="log-container truncate-wrap"> |
|
|||
147 | <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> |
|
|||
148 | </div> |
|
|||
149 | </td> |
|
|||
150 |
|
||||
151 | <td class="td-hash"> |
|
146 | <td class="td-hash"> | |
152 | <code> |
|
147 | <code> | |
153 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}"> |
|
148 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}"> | |
154 | <span class="commit_hash">${h.show_id(commit)}</span> |
|
149 | <span class="commit_hash">${h.show_id(commit)}</span> | |
155 | </a> |
|
150 | </a> | |
156 | </code> |
|
151 | </code> | |
157 | </td> |
|
152 | </td> | |
|
153 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}"> | |||
|
154 | <div class="show_more_col"> | |||
|
155 | <i class="show_more"></i> | |||
|
156 | </div> | |||
|
157 | </td> | |||
|
158 | <td class="td-description mid"> | |||
|
159 | <div class="log-container truncate-wrap"> | |||
|
160 | <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> | |||
|
161 | </div> | |||
|
162 | </td> | |||
158 |
|
163 | |||
159 |
<td class="td- |
|
164 | <td class="td-time"> | |
160 |
|
|
165 | ${h.age_component(commit.date)} | |
161 | <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id,anchor='comment-%s' % c.comments[commit.raw_id][0].comment_id)}"> |
|
166 | </td> | |
162 | ${len(c.comments[commit.raw_id])} <i class="icon-comment icon-comment-colored"></i> |
|
167 | <td class="td-user"> | |
163 | </a> |
|
168 | ${self.gravatar_with_user(commit.author)} | |
164 | %endif |
|
|||
165 | </td> |
|
169 | </td> | |
166 |
|
170 | |||
167 | <td class="td-tags tags-col truncate-wrap"> |
|
171 | <td class="td-tags tags-col truncate-wrap"> | |
168 | <div class="truncate tags-truncate" id="t-${commit.raw_id}"> |
|
172 | <div class="truncate tags-truncate" id="t-${commit.raw_id}"> | |
169 | ## branch |
|
173 | ## branch | |
170 | %if commit.branch: |
|
174 | %if commit.branch: | |
171 | <span class="branchtag tag" title="${_('Branch %s') % commit.branch}"> |
|
175 | <span class="branchtag tag" title="${_('Branch %s') % commit.branch}"> | |
172 | <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=commit.branch)}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> |
|
176 | <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=commit.branch)}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> | |
173 | </span> |
|
177 | </span> | |
174 | %endif |
|
178 | %endif | |
175 |
|
179 | |||
176 | ## bookmarks |
|
180 | ## bookmarks | |
177 | %if h.is_hg(c.rhodecode_repo): |
|
181 | %if h.is_hg(c.rhodecode_repo): | |
178 | %for book in commit.bookmarks: |
|
182 | %for book in commit.bookmarks: | |
179 | <span class="tag booktag" title="${_('Bookmark %s') % book}"> |
|
183 | <span class="tag booktag" title="${_('Bookmark %s') % book}"> | |
180 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
184 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> | |
181 | </span> |
|
185 | </span> | |
182 | %endfor |
|
186 | %endfor | |
183 | %endif |
|
187 | %endif | |
184 |
|
188 | |||
185 | ## tags |
|
189 | ## tags | |
186 | %for tag in commit.tags: |
|
190 | %for tag in commit.tags: | |
187 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> |
|
191 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> | |
188 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a> |
|
192 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=commit.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a> | |
189 | </span> |
|
193 | </span> | |
190 | %endfor |
|
194 | %endfor | |
191 |
|
195 | |||
192 | </div> |
|
196 | </div> | |
193 | </td> |
|
197 | </td> | |
194 | </tr> |
|
198 | </tr> | |
195 | %endfor |
|
199 | %endfor | |
196 | </tbody> |
|
200 | </tbody> | |
197 | </table> |
|
201 | </table> | |
198 | </div> |
|
202 | </div> | |
199 | </div> |
|
203 | </div> | |
200 | </div> |
|
204 | </div> | |
201 | <div class="pagination-wh pagination-left"> |
|
205 | <div class="pagination-wh pagination-left"> | |
202 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
206 | ${c.pagination.pager('$link_previous ~2~ $link_next')} | |
203 | </div> |
|
207 | </div> | |
204 |
|
208 | |||
205 | <script type="text/javascript" src="${h.asset('js/jquery.commits-graph.js')}"></script> |
|
209 | <script type="text/javascript" src="${h.asset('js/jquery.commits-graph.js')}"></script> | |
206 | <script type="text/javascript"> |
|
210 | <script type="text/javascript"> | |
207 | var cache = {}; |
|
211 | var cache = {}; | |
208 | $(function(){ |
|
212 | $(function(){ | |
209 |
|
213 | |||
210 | // Create links to commit ranges when range checkboxes are selected |
|
214 | // Create links to commit ranges when range checkboxes are selected | |
211 | var $commitCheckboxes = $('.commit-range'); |
|
215 | var $commitCheckboxes = $('.commit-range'); | |
212 | // cache elements |
|
216 | // cache elements | |
213 | var $commitRangeContainer = $('#rev_range_container'); |
|
217 | var $commitRangeContainer = $('#rev_range_container'); | |
214 | var $commitRangeClear = $('#rev_range_clear'); |
|
218 | var $commitRangeClear = $('#rev_range_clear'); | |
215 |
|
219 | |||
216 | var checkboxRangeSelector = function(e){ |
|
220 | var checkboxRangeSelector = function(e){ | |
217 | var selectedCheckboxes = []; |
|
221 | var selectedCheckboxes = []; | |
218 | for (pos in $commitCheckboxes){ |
|
222 | for (pos in $commitCheckboxes){ | |
219 | if($commitCheckboxes[pos].checked){ |
|
223 | if($commitCheckboxes[pos].checked){ | |
220 | selectedCheckboxes.push($commitCheckboxes[pos]); |
|
224 | selectedCheckboxes.push($commitCheckboxes[pos]); | |
221 | } |
|
225 | } | |
222 | } |
|
226 | } | |
223 | var open_new_pull_request = $('#open_new_pull_request'); |
|
227 | var open_new_pull_request = $('#open_new_pull_request'); | |
224 | if(open_new_pull_request){ |
|
228 | if(open_new_pull_request){ | |
225 | var selected_changes = selectedCheckboxes.length; |
|
229 | var selected_changes = selectedCheckboxes.length; | |
226 | if (selected_changes > 1 || selected_changes == 1 && templateContext.repo_type != 'hg') { |
|
230 | if (selected_changes > 1 || selected_changes == 1 && templateContext.repo_type != 'hg') { | |
227 | open_new_pull_request.hide(); |
|
231 | open_new_pull_request.hide(); | |
228 | } else { |
|
232 | } else { | |
229 | if (selected_changes == 1) { |
|
233 | if (selected_changes == 1) { | |
230 | open_new_pull_request.html(_gettext('Open new pull request for selected commit')); |
|
234 | open_new_pull_request.html(_gettext('Open new pull request for selected commit')); | |
231 | } else if (selected_changes == 0) { |
|
235 | } else if (selected_changes == 0) { | |
232 | open_new_pull_request.html(_gettext('Open new pull request')); |
|
236 | open_new_pull_request.html(_gettext('Open new pull request')); | |
233 | } |
|
237 | } | |
234 | open_new_pull_request.show(); |
|
238 | open_new_pull_request.show(); | |
235 | } |
|
239 | } | |
236 | } |
|
240 | } | |
237 |
|
241 | |||
238 | if (selectedCheckboxes.length>0){ |
|
242 | if (selectedCheckboxes.length>0){ | |
239 | var revEnd = selectedCheckboxes[0].name; |
|
243 | var revEnd = selectedCheckboxes[0].name; | |
240 | var revStart = selectedCheckboxes[selectedCheckboxes.length-1].name; |
|
244 | var revStart = selectedCheckboxes[selectedCheckboxes.length-1].name; | |
241 | var url = pyroutes.url('changeset_home', |
|
245 | var url = pyroutes.url('changeset_home', | |
242 | {'repo_name': '${c.repo_name}', |
|
246 | {'repo_name': '${c.repo_name}', | |
243 | 'revision': revStart+'...'+revEnd}); |
|
247 | 'revision': revStart+'...'+revEnd}); | |
244 |
|
248 | |||
245 | var link = (revStart == revEnd) |
|
249 | var link = (revStart == revEnd) | |
246 | ? _gettext('Show selected commit __S') |
|
250 | ? _gettext('Show selected commit __S') | |
247 | : _gettext('Show selected commits __S ... __E'); |
|
251 | : _gettext('Show selected commits __S ... __E'); | |
248 |
|
252 | |||
249 | link = link.replace('__S', revStart.substr(0,6)); |
|
253 | link = link.replace('__S', revStart.substr(0,6)); | |
250 | link = link.replace('__E', revEnd.substr(0,6)); |
|
254 | link = link.replace('__E', revEnd.substr(0,6)); | |
251 |
|
255 | |||
252 | $commitRangeContainer |
|
256 | $commitRangeContainer | |
253 | .attr('href',url) |
|
257 | .attr('href',url) | |
254 | .html(link) |
|
258 | .html(link) | |
255 | .show(); |
|
259 | .show(); | |
256 |
|
260 | |||
257 | $commitRangeClear.show(); |
|
261 | $commitRangeClear.show(); | |
258 | var _url = pyroutes.url('pullrequest_home', |
|
262 | var _url = pyroutes.url('pullrequest_home', | |
259 | {'repo_name': '${c.repo_name}', |
|
263 | {'repo_name': '${c.repo_name}', | |
260 | 'commit': revEnd}); |
|
264 | 'commit': revEnd}); | |
261 | open_new_pull_request.attr('href', _url); |
|
265 | open_new_pull_request.attr('href', _url); | |
262 | $('#compare_fork_button').hide(); |
|
266 | $('#compare_fork_button').hide(); | |
263 | } else { |
|
267 | } else { | |
264 | $commitRangeContainer.hide(); |
|
268 | $commitRangeContainer.hide(); | |
265 | $commitRangeClear.hide(); |
|
269 | $commitRangeClear.hide(); | |
266 |
|
270 | |||
267 | %if c.branch_name: |
|
271 | %if c.branch_name: | |
268 | var _url = pyroutes.url('pullrequest_home', |
|
272 | var _url = pyroutes.url('pullrequest_home', | |
269 | {'repo_name': '${c.repo_name}', |
|
273 | {'repo_name': '${c.repo_name}', | |
270 | 'branch':'${c.branch_name}'}); |
|
274 | 'branch':'${c.branch_name}'}); | |
271 | open_new_pull_request.attr('href', _url); |
|
275 | open_new_pull_request.attr('href', _url); | |
272 | %else: |
|
276 | %else: | |
273 | var _url = pyroutes.url('pullrequest_home', |
|
277 | var _url = pyroutes.url('pullrequest_home', | |
274 | {'repo_name': '${c.repo_name}'}); |
|
278 | {'repo_name': '${c.repo_name}'}); | |
275 | open_new_pull_request.attr('href', _url); |
|
279 | open_new_pull_request.attr('href', _url); | |
276 | %endif |
|
280 | %endif | |
277 | $('#compare_fork_button').show(); |
|
281 | $('#compare_fork_button').show(); | |
278 | } |
|
282 | } | |
279 | }; |
|
283 | }; | |
280 |
|
284 | |||
281 | $commitCheckboxes.on('click', checkboxRangeSelector); |
|
285 | $commitCheckboxes.on('click', checkboxRangeSelector); | |
282 |
|
286 | |||
283 | $commitRangeClear.on('click',function(e) { |
|
287 | $commitRangeClear.on('click',function(e) { | |
284 | $commitCheckboxes.attr('checked', false) |
|
288 | $commitCheckboxes.attr('checked', false) | |
285 | checkboxRangeSelector(); |
|
289 | checkboxRangeSelector(); | |
286 | e.preventDefault(); |
|
290 | e.preventDefault(); | |
287 | }); |
|
291 | }); | |
288 |
|
292 | |||
289 | // make sure the buttons are consistent when navigate back and forth |
|
293 | // make sure the buttons are consistent when navigate back and forth | |
290 | checkboxRangeSelector(); |
|
294 | checkboxRangeSelector(); | |
291 |
|
295 | |||
292 |
|
296 | |||
293 | var msgs = $('.message'); |
|
297 | var msgs = $('.message'); | |
294 | // get first element height |
|
298 | // get first element height | |
295 | var el = $('#graph_content .container')[0]; |
|
299 | var el = $('#graph_content .container')[0]; | |
296 | var row_h = el.clientHeight; |
|
300 | var row_h = el.clientHeight; | |
297 | for (var i=0; i < msgs.length; i++) { |
|
301 | for (var i=0; i < msgs.length; i++) { | |
298 | var m = msgs[i]; |
|
302 | var m = msgs[i]; | |
299 |
|
303 | |||
300 | var h = m.clientHeight; |
|
304 | var h = m.clientHeight; | |
301 | var pad = $(m).css('padding'); |
|
305 | var pad = $(m).css('padding'); | |
302 | if (h > row_h) { |
|
306 | if (h > row_h) { | |
303 | var offset = row_h - (h+12); |
|
307 | var offset = row_h - (h+12); | |
304 | $(m.nextElementSibling).css('display','block'); |
|
308 | $(m.nextElementSibling).css('display','block'); | |
305 | $(m.nextElementSibling).css('margin-top',offset+'px'); |
|
309 | $(m.nextElementSibling).css('margin-top',offset+'px'); | |
306 | } |
|
310 | } | |
307 | } |
|
311 | } | |
308 |
|
312 | |||
309 | $('.expand_commit').on('click',function(e){ |
|
313 | $('.expand_commit').on('click',function(e){ | |
310 | var target_expand = $(this); |
|
314 | var target_expand = $(this); | |
311 | var cid = target_expand.data('commitId'); |
|
315 | var cid = target_expand.data('commitId'); | |
312 |
|
316 | |||
313 | if (target_expand.hasClass('open')){ |
|
317 | if (target_expand.hasClass('open')){ | |
314 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); |
|
318 | $('#c-'+cid).css({'height': '1.5em', 'white-space': 'nowrap', 'text-overflow': 'ellipsis', 'overflow':'hidden'}); | |
315 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); |
|
319 | $('#t-'+cid).css({'height': 'auto', 'line-height': '.9em', 'text-overflow': 'ellipsis', 'overflow':'hidden', 'white-space':'nowrap'}); | |
316 | target_expand.removeClass('open'); |
|
320 | target_expand.removeClass('open'); | |
317 | } |
|
321 | } | |
318 | else { |
|
322 | else { | |
319 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); |
|
323 | $('#c-'+cid).css({'height': 'auto', 'white-space': 'pre-line', 'text-overflow': 'initial', 'overflow':'visible'}); | |
320 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); |
|
324 | $('#t-'+cid).css({'height': 'auto', 'max-height': 'none', 'text-overflow': 'initial', 'overflow':'visible', 'white-space':'normal'}); | |
321 | target_expand.addClass('open'); |
|
325 | target_expand.addClass('open'); | |
322 | } |
|
326 | } | |
323 | // redraw the graph |
|
327 | // redraw the graph | |
324 | graph_options.height = $("#changesets").height(); |
|
328 | graph_options.height = $("#changesets").height(); | |
325 | $("canvas").remove(); |
|
329 | $("canvas").remove(); | |
326 | $("[data-graph]").commits(graph_options); |
|
330 | $("[data-graph]").commits(graph_options); | |
327 | }); |
|
331 | }); | |
328 |
|
332 | |||
329 | $("#clear_filter").on("click", function() { |
|
333 | $("#clear_filter").on("click", function() { | |
330 | var filter = {'repo_name': '${c.repo_name}'}; |
|
334 | var filter = {'repo_name': '${c.repo_name}'}; | |
331 | window.location = pyroutes.url('changelog_home', filter); |
|
335 | window.location = pyroutes.url('changelog_home', filter); | |
332 | }); |
|
336 | }); | |
333 |
|
337 | |||
334 | $("#branch_filter").select2({ |
|
338 | $("#branch_filter").select2({ | |
335 | 'dropdownAutoWidth': true, |
|
339 | 'dropdownAutoWidth': true, | |
336 | 'width': 'resolve', |
|
340 | 'width': 'resolve', | |
337 | 'placeholder': "${c.selected_name or _('Filter changelog')}", |
|
341 | 'placeholder': "${c.selected_name or _('Filter changelog')}", | |
338 | containerCssClass: "drop-menu", |
|
342 | containerCssClass: "drop-menu", | |
339 | dropdownCssClass: "drop-menu-dropdown", |
|
343 | dropdownCssClass: "drop-menu-dropdown", | |
340 | query: function(query){ |
|
344 | query: function(query){ | |
341 | var key = 'cache'; |
|
345 | var key = 'cache'; | |
342 | var cached = cache[key] ; |
|
346 | var cached = cache[key] ; | |
343 | if(cached) { |
|
347 | if(cached) { | |
344 | var data = {results: []}; |
|
348 | var data = {results: []}; | |
345 | //filter results |
|
349 | //filter results | |
346 | $.each(cached.results, function(){ |
|
350 | $.each(cached.results, function(){ | |
347 | var section = this.text; |
|
351 | var section = this.text; | |
348 | var children = []; |
|
352 | var children = []; | |
349 | $.each(this.children, function(){ |
|
353 | $.each(this.children, function(){ | |
350 | if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){ |
|
354 | if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){ | |
351 | children.push({'id': this.id, 'text': this.text, 'type': this.type}) |
|
355 | children.push({'id': this.id, 'text': this.text, 'type': this.type}) | |
352 | } |
|
356 | } | |
353 | }); |
|
357 | }); | |
354 | data.results.push({'text': section, 'children': children}); |
|
358 | data.results.push({'text': section, 'children': children}); | |
355 | query.callback({results: data.results}); |
|
359 | query.callback({results: data.results}); | |
356 | }); |
|
360 | }); | |
357 | }else{ |
|
361 | }else{ | |
358 | $.ajax({ |
|
362 | $.ajax({ | |
359 | url: pyroutes.url('repo_refs_changelog_data', {'repo_name': '${c.repo_name}'}), |
|
363 | url: pyroutes.url('repo_refs_changelog_data', {'repo_name': '${c.repo_name}'}), | |
360 | data: {}, |
|
364 | data: {}, | |
361 | dataType: 'json', |
|
365 | dataType: 'json', | |
362 | type: 'GET', |
|
366 | type: 'GET', | |
363 | success: function(data) { |
|
367 | success: function(data) { | |
364 | cache[key] = data; |
|
368 | cache[key] = data; | |
365 | query.callback({results: data.results}); |
|
369 | query.callback({results: data.results}); | |
366 | } |
|
370 | } | |
367 | }) |
|
371 | }) | |
368 | } |
|
372 | } | |
369 | } |
|
373 | } | |
370 | }); |
|
374 | }); | |
371 |
|
375 | |||
372 | $('#branch_filter').on('change', function(e){ |
|
376 | $('#branch_filter').on('change', function(e){ | |
373 | var data = $('#branch_filter').select2('data'); |
|
377 | var data = $('#branch_filter').select2('data'); | |
374 | var selected = data.text; |
|
378 | var selected = data.text; | |
375 | var filter = {'repo_name': '${c.repo_name}'}; |
|
379 | var filter = {'repo_name': '${c.repo_name}'}; | |
376 | if(data.type == 'branch' || data.type == 'branch_closed'){ |
|
380 | if(data.type == 'branch' || data.type == 'branch_closed'){ | |
377 | filter["branch"] = selected; |
|
381 | filter["branch"] = selected; | |
378 | } |
|
382 | } | |
379 | else if (data.type == 'book'){ |
|
383 | else if (data.type == 'book'){ | |
380 | filter["bookmark"] = selected; |
|
384 | filter["bookmark"] = selected; | |
381 | } |
|
385 | } | |
382 | window.location = pyroutes.url('changelog_home', filter); |
|
386 | window.location = pyroutes.url('changelog_home', filter); | |
383 | }); |
|
387 | }); | |
384 |
|
388 | |||
385 | // Determine max number of edges per row in graph |
|
389 | // Determine max number of edges per row in graph | |
386 | var jsdata = $.parseJSON($("[data-graph]").attr('data-graph')); |
|
390 | var jsdata = $.parseJSON($("[data-graph]").attr('data-graph')); | |
387 | var edgeCount = 1; |
|
391 | var edgeCount = 1; | |
388 | $.each(jsdata, function(i, item){ |
|
392 | $.each(jsdata, function(i, item){ | |
389 | $.each(item[2], function(key, value) { |
|
393 | $.each(item[2], function(key, value) { | |
390 | if (value[1] > edgeCount){ |
|
394 | if (value[1] > edgeCount){ | |
391 | edgeCount = value[1]; |
|
395 | edgeCount = value[1]; | |
392 | } |
|
396 | } | |
393 | }); |
|
397 | }); | |
394 | }); |
|
398 | }); | |
395 | var x_step = Math.min(18, Math.floor(86 / edgeCount)); |
|
399 | var x_step = Math.min(18, Math.floor(86 / edgeCount)); | |
396 | var graph_options = { |
|
400 | var graph_options = { | |
397 | width: 100, |
|
401 | width: 100, | |
398 | height: $("#changesets").height(), |
|
402 | height: $("#changesets").height(), | |
399 | x_step: x_step, |
|
403 | x_step: x_step, | |
400 | y_step: 42, |
|
404 | y_step: 42, | |
401 | dotRadius: 3.5, |
|
405 | dotRadius: 3.5, | |
402 | lineWidth: 2.5 |
|
406 | lineWidth: 2.5 | |
403 | }; |
|
407 | }; | |
404 | $("[data-graph]").commits(graph_options); |
|
408 | $("[data-graph]").commits(graph_options); | |
405 |
|
409 | |||
406 | }); |
|
410 | }); | |
407 |
|
411 | |||
408 | </script> |
|
412 | </script> | |
409 | %else: |
|
413 | %else: | |
410 | ${_('There are no changes yet')} |
|
414 | ${_('There are no changes yet')} | |
411 | %endif |
|
415 | %endif | |
412 | </div> |
|
416 | </div> | |
413 | </div> |
|
417 | </div> | |
414 | </%def> |
|
418 | </%def> |
@@ -1,126 +1,133 b'' | |||||
1 | ## -*- coding: utf-8 -*- |
|
1 | ## -*- coding: utf-8 -*- | |
2 | <%namespace name="base" file="/base/base.html"/> |
|
2 | <%namespace name="base" file="/base/base.html"/> | |
3 | %if c.repo_commits: |
|
3 | %if c.repo_commits: | |
4 | <table class="rctable repo_summary table_disp"> |
|
4 | <table class="rctable repo_summary table_disp"> | |
5 | <tr> |
|
5 | <tr> | |
|
6 | ||||
|
7 | <th class="status" colspan="2"></th> | |||
6 | <th>${_('Commit')}</th> |
|
8 | <th>${_('Commit')}</th> | |
7 | <th class="status" colspan="2"></th> |
|
|||
8 | <th>${_('Commit message')}</th> |
|
9 | <th>${_('Commit message')}</th> | |
9 | <th>${_('Age')}</th> |
|
10 | <th>${_('Age')}</th> | |
10 | <th>${_('Author')}</th> |
|
11 | <th>${_('Author')}</th> | |
11 | <th>${_('Refs')}</th> |
|
12 | <th>${_('Refs')}</th> | |
12 | </tr> |
|
13 | </tr> | |
13 | %for cnt,cs in enumerate(c.repo_commits): |
|
14 | %for cnt,cs in enumerate(c.repo_commits): | |
14 | <tr class="parity${cnt%2}"> |
|
15 | <tr class="parity${cnt%2}"> | |
|
16 | ||||
|
17 | <td class="td-status"> | |||
|
18 | %if c.statuses.get(cs.raw_id): | |||
|
19 | <div class="changeset-status-ico shortlog"> | |||
|
20 | %if c.statuses.get(cs.raw_id)[2]: | |||
|
21 | <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.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> | |||
|
22 | <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div> | |||
|
23 | </a> | |||
|
24 | %else: | |||
|
25 | <a class="tooltip" title="${_('Commit status: %s') % h.commit_status_lbl(c.statuses.get(cs.raw_id)[0])}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |||
|
26 | <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div> | |||
|
27 | </a> | |||
|
28 | %endif | |||
|
29 | </div> | |||
|
30 | %else: | |||
|
31 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> | |||
|
32 | %endif | |||
|
33 | </td> | |||
|
34 | <td class="td-comments"> | |||
|
35 | %if c.comments.get(cs.raw_id,[]): | |||
|
36 | <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> | |||
|
37 | <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[cs.raw_id])} | |||
|
38 | </a> | |||
|
39 | %endif | |||
|
40 | </td> | |||
15 | <td class="td-commit"> |
|
41 | <td class="td-commit"> | |
16 | <pre><a href="${h.url('changeset_home', repo_name=c.repo_name, revision=cs.raw_id)}">${h.show_id(cs)}</a></pre> |
|
42 | <pre><a href="${h.url('changeset_home', repo_name=c.repo_name, revision=cs.raw_id)}">${h.show_id(cs)}</a></pre> | |
17 | </td> |
|
43 | </td> | |
18 | <td class="td-status"> |
|
|||
19 | %if c.statuses.get(cs.raw_id): |
|
|||
20 | <div class="changeset-status-ico shortlog"> |
|
|||
21 | %if c.statuses.get(cs.raw_id)[2]: |
|
|||
22 | <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.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> |
|
|||
23 | <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div> |
|
|||
24 | </a> |
|
|||
25 | %else: |
|
|||
26 | <div class="${'flag_status %s' % c.statuses.get(cs.raw_id)[0]}"></div> |
|
|||
27 | %endif |
|
|||
28 | </div> |
|
|||
29 | %endif |
|
|||
30 | </td> |
|
|||
31 | <td class="td-comments"> |
|
|||
32 | %if c.comments.get(cs.raw_id,[]): |
|
|||
33 | <a title="${_('Commit has comments')}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
|||
34 | <i class="icon-comment icon-comment-colored"></i> ${len(c.comments[cs.raw_id])} |
|
|||
35 | </a> |
|
|||
36 | %endif |
|
|||
37 | </td> |
|
|||
38 | <td class="td-message"> |
|
44 | <td class="td-message"> | |
39 | ${h.urlify_commit_message(h.truncate(cs.message, 50), c.repo_name)} |
|
45 | ${h.urlify_commit_message(h.truncate(cs.message, 50), c.repo_name)} | |
40 | </td> |
|
46 | </td> | |
|
47 | ||||
41 | <td class="td-time"> |
|
48 | <td class="td-time"> | |
42 | ${h.age_component(cs.date)} |
|
49 | ${h.age_component(cs.date)} | |
43 | </td> |
|
50 | </td> | |
44 |
|
||||
45 | <td class="td-user author"> |
|
51 | <td class="td-user author"> | |
46 | ${base.gravatar_with_user(cs.author)} |
|
52 | ${base.gravatar_with_user(cs.author)} | |
47 | </td> |
|
53 | </td> | |
|
54 | ||||
48 | <td class="td-tags truncate-wrap"> |
|
55 | <td class="td-tags truncate-wrap"> | |
49 | <div class="truncate tags-truncate"><div class="autoexpand"> |
|
56 | <div class="truncate tags-truncate"><div class="autoexpand"> | |
50 | %if h.is_hg(c.rhodecode_repo): |
|
57 | %if h.is_hg(c.rhodecode_repo): | |
51 | %for book in cs.bookmarks: |
|
58 | %for book in cs.bookmarks: | |
52 | <span class="booktag tag" title="${_('Bookmark %s') % book}"> |
|
59 | <span class="booktag tag" title="${_('Bookmark %s') % book}"> | |
53 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
60 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> | |
54 | </span> |
|
61 | </span> | |
55 | %endfor |
|
62 | %endfor | |
56 | %endif |
|
63 | %endif | |
57 | ## tags |
|
64 | ## tags | |
58 | %for tag in cs.tags: |
|
65 | %for tag in cs.tags: | |
59 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> |
|
66 | <span class="tagtag tag" title="${_('Tag %s') % tag}"> | |
60 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a> |
|
67 | <a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}"><i class="icon-tag"></i>${h.shorter(tag)}</a> | |
61 | </span> |
|
68 | </span> | |
62 | %endfor |
|
69 | %endfor | |
63 |
|
70 | |||
64 | ## branch |
|
71 | ## branch | |
65 | %if cs.branch: |
|
72 | %if cs.branch: | |
66 | <span class="branchtag tag" title="${_('Branch %s') % cs.branch}"> |
|
73 | <span class="branchtag tag" title="${_('Branch %s') % cs.branch}"> | |
67 | <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch)}"><i class="icon-code-fork"></i>${h.shorter(cs.branch)}</a> |
|
74 | <a href="${h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch)}"><i class="icon-code-fork"></i>${h.shorter(cs.branch)}</a> | |
68 | </span> |
|
75 | </span> | |
69 | %endif |
|
76 | %endif | |
70 | </div> |
|
77 | </div> | |
71 | </td> |
|
78 | </td> | |
72 | </tr> |
|
79 | </tr> | |
73 | %endfor |
|
80 | %endfor | |
74 |
|
81 | |||
75 | </table> |
|
82 | </table> | |
76 |
|
83 | |||
77 | <script type="text/javascript"> |
|
84 | <script type="text/javascript"> | |
78 | $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 2000, scrollTo: false }); |
|
85 | $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 2000, scrollTo: false }); | |
79 | $(document).on('pjax:success', function(){ timeagoActivate(); }); |
|
86 | $(document).on('pjax:success', function(){ timeagoActivate(); }); | |
80 | </script> |
|
87 | </script> | |
81 |
|
88 | |||
82 | <div class="pagination-wh pagination-left"> |
|
89 | <div class="pagination-wh pagination-left"> | |
83 | ${c.repo_commits.pager('$link_previous ~2~ $link_next')} |
|
90 | ${c.repo_commits.pager('$link_previous ~2~ $link_next')} | |
84 | </div> |
|
91 | </div> | |
85 | %else: |
|
92 | %else: | |
86 |
|
93 | |||
87 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
94 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
88 | <div class="quick_start"> |
|
95 | <div class="quick_start"> | |
89 | <div class="fieldset"> |
|
96 | <div class="fieldset"> | |
90 | <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div> |
|
97 | <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div> | |
91 | <div class="right-content"> |
|
98 | <div class="right-content"> | |
92 | <div id="add_node_id" class="add_node"> |
|
99 | <div id="add_node_id" class="add_node"> | |
93 | <a href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='', anchor='edit')}" class="btn btn-default">${_('Add New File')}</a> |
|
100 | <a href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='', anchor='edit')}" class="btn btn-default">${_('Add New File')}</a> | |
94 | </div> |
|
101 | </div> | |
95 | </div> |
|
102 | </div> | |
96 | %endif |
|
103 | %endif | |
97 | </div> |
|
104 | </div> | |
98 |
|
105 | |||
99 | %if not h.is_svn(c.rhodecode_repo): |
|
106 | %if not h.is_svn(c.rhodecode_repo): | |
100 | <div class="fieldset"> |
|
107 | <div class="fieldset"> | |
101 | <div class="left-label">${_('Push new repo:')}</div> |
|
108 | <div class="left-label">${_('Push new repo:')}</div> | |
102 | <div class="right-content"> |
|
109 | <div class="right-content"> | |
103 | <pre> |
|
110 | <pre> | |
104 | ${c.rhodecode_repo.alias} clone ${c.clone_repo_url} |
|
111 | ${c.rhodecode_repo.alias} clone ${c.clone_repo_url} | |
105 | ${c.rhodecode_repo.alias} add README # add first file |
|
112 | ${c.rhodecode_repo.alias} add README # add first file | |
106 | ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message |
|
113 | ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message | |
107 | ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back |
|
114 | ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back | |
108 | </pre> |
|
115 | </pre> | |
109 | </div> |
|
116 | </div> | |
110 | </div> |
|
117 | </div> | |
111 | <div class="fieldset"> |
|
118 | <div class="fieldset"> | |
112 | <div class="left-label">${_('Existing repository?')}</div> |
|
119 | <div class="left-label">${_('Existing repository?')}</div> | |
113 | <div class="right-content"> |
|
120 | <div class="right-content"> | |
114 | <pre> |
|
121 | <pre> | |
115 | %if h.is_git(c.rhodecode_repo): |
|
122 | %if h.is_git(c.rhodecode_repo): | |
116 | git remote add origin ${c.clone_repo_url} |
|
123 | git remote add origin ${c.clone_repo_url} | |
117 | git push -u origin master |
|
124 | git push -u origin master | |
118 | %else: |
|
125 | %else: | |
119 | hg push ${c.clone_repo_url} |
|
126 | hg push ${c.clone_repo_url} | |
120 | %endif |
|
127 | %endif | |
121 | </pre> |
|
128 | </pre> | |
122 | </div> |
|
129 | </div> | |
123 | </div> |
|
130 | </div> | |
124 | %endif |
|
131 | %endif | |
125 | </div> |
|
132 | </div> | |
126 | %endif |
|
133 | %endif |
General Comments 0
You need to be logged in to leave comments.
Login now