Show More
@@ -1,144 +1,144 b'' | |||
|
1 | 1 | ## small box that displays changed/added/removed details fetched by AJAX |
|
2 | 2 | <%namespace name="base" file="/base/base.mako"/> |
|
3 | 3 | |
|
4 | 4 | |
|
5 | 5 | % if c.prev_page: |
|
6 | 6 | <tr> |
|
7 | 7 | <td colspan="9" class="load-more-commits"> |
|
8 | 8 | <a class="prev-commits" href="#loadPrevCommits" onclick="commitsController.loadPrev(this, ${c.prev_page}, '${c.branch_name}');return false"> |
|
9 | 9 | ${_('load previous')} |
|
10 | 10 | </a> |
|
11 | 11 | </td> |
|
12 | 12 | </tr> |
|
13 | 13 | % endif |
|
14 | 14 | |
|
15 | 15 | % for cnt,commit in enumerate(c.pagination): |
|
16 | 16 | <tr id="sha_${commit.raw_id}" class="changelogRow container ${'tablerow%s' % (cnt%2)}"> |
|
17 | 17 | |
|
18 | 18 | <td class="td-checkbox"> |
|
19 | 19 | ${h.checkbox(commit.raw_id,class_="commit-range")} |
|
20 | 20 | </td> |
|
21 | 21 | <td class="td-status"> |
|
22 | 22 | |
|
23 | 23 | %if c.statuses.get(commit.raw_id): |
|
24 | 24 | <div class="changeset-status-ico"> |
|
25 | 25 | %if c.statuses.get(commit.raw_id)[2]: |
|
26 | 26 | <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.route_path('pullrequest_show',repo_name=c.statuses.get(commit.raw_id)[3],pull_request_id=c.statuses.get(commit.raw_id)[2])}"> |
|
27 | 27 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> |
|
28 | 28 | </a> |
|
29 | 29 | %else: |
|
30 | 30 | <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)}"> |
|
31 | 31 | <div class="${'flag_status %s' % c.statuses.get(commit.raw_id)[0]}"></div> |
|
32 | 32 | </a> |
|
33 | 33 | %endif |
|
34 | 34 | </div> |
|
35 | 35 | %else: |
|
36 | 36 | <div class="tooltip flag_status not_reviewed" title="${_('Commit status: Not Reviewed')}"></div> |
|
37 | 37 | %endif |
|
38 | 38 | </td> |
|
39 | 39 | <td class="td-comments comments-col"> |
|
40 | 40 | %if c.comments.get(commit.raw_id): |
|
41 | 41 | <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)}"> |
|
42 | 42 | <i class="icon-comment"></i> ${len(c.comments[commit.raw_id])} |
|
43 | 43 | </a> |
|
44 | 44 | %endif |
|
45 | 45 | </td> |
|
46 | 46 | <td class="td-hash"> |
|
47 | 47 | <code> |
|
48 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i> | |
|
49 | 48 | |
|
50 | 49 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=commit.raw_id)}"> |
|
51 | 50 | <span class="${'commit_hash obsolete' if getattr(commit, 'obsolete', None) else 'commit_hash'}">${h.show_id(commit)}</span> |
|
52 | 51 | </a> |
|
52 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${commit.raw_id}" title="${_('Copy the full commit id')}"></i> | |
|
53 | 53 | % if hasattr(commit, 'phase'): |
|
54 | 54 | % if commit.phase != 'public': |
|
55 | 55 | <span class="tag phase-${commit.phase} tooltip" title="${_('Commit phase')}">${commit.phase}</span> |
|
56 | 56 | % endif |
|
57 | 57 | % endif |
|
58 | 58 | |
|
59 | 59 | ## obsolete commits |
|
60 | 60 | % if hasattr(commit, 'obsolete'): |
|
61 | 61 | % if commit.obsolete: |
|
62 | 62 | <span class="tag obsolete-${commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span> |
|
63 | 63 | % endif |
|
64 | 64 | % endif |
|
65 | 65 | |
|
66 | 66 | ## hidden commits |
|
67 | 67 | % if hasattr(commit, 'hidden'): |
|
68 | 68 | % if commit.hidden: |
|
69 | 69 | <span class="tag obsolete-${commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span> |
|
70 | 70 | % endif |
|
71 | 71 | % endif |
|
72 | 72 | |
|
73 | 73 | </code> |
|
74 | 74 | </td> |
|
75 | 75 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_('Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> |
|
76 | 76 | <div class="show_more_col"> |
|
77 | 77 | <i class="show_more"></i> |
|
78 | 78 | </div> |
|
79 | 79 | </td> |
|
80 | 80 | <td class="td-description mid"> |
|
81 | 81 | <div class="log-container truncate-wrap"> |
|
82 | 82 | <div class="message truncate" id="c-${commit.raw_id}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> |
|
83 | 83 | </div> |
|
84 | 84 | </td> |
|
85 | 85 | |
|
86 | 86 | <td class="td-time"> |
|
87 | 87 | ${h.age_component(commit.date)} |
|
88 | 88 | </td> |
|
89 | 89 | <td class="td-user"> |
|
90 | 90 | ${base.gravatar_with_user(commit.author)} |
|
91 | 91 | </td> |
|
92 | 92 | |
|
93 | 93 | <td class="td-tags tags-col"> |
|
94 | 94 | <div id="t-${commit.raw_id}"> |
|
95 | 95 | |
|
96 | 96 | ## merge |
|
97 | 97 | %if commit.merge: |
|
98 | 98 | <span class="tag mergetag"> |
|
99 | 99 | <i class="icon-merge"></i>${_('merge')} |
|
100 | 100 | </span> |
|
101 | 101 | %endif |
|
102 | 102 | |
|
103 | 103 | ## branch |
|
104 | 104 | %if commit.branch: |
|
105 | 105 | <span class="tag branchtag" title="${h.tooltip(_('Branch %s') % commit.branch)}"> |
|
106 | 106 | <a href="${h.route_path('repo_changelog',repo_name=c.repo_name,_query=dict(branch=commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(commit.branch)}</a> |
|
107 | 107 | </span> |
|
108 | 108 | %endif |
|
109 | 109 | |
|
110 | 110 | ## bookmarks |
|
111 | 111 | %if h.is_hg(c.rhodecode_repo): |
|
112 | 112 | %for book in commit.bookmarks: |
|
113 | 113 | <span class="tag booktag" title="${h.tooltip(_('Bookmark %s') % book)}"> |
|
114 | 114 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id, _query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
115 | 115 | </span> |
|
116 | 116 | %endfor |
|
117 | 117 | %endif |
|
118 | 118 | |
|
119 | 119 | ## tags |
|
120 | 120 | %for tag in commit.tags: |
|
121 | 121 | <span class="tag tagtag" title="${h.tooltip(_('Tag %s') % tag)}"> |
|
122 | 122 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=commit.raw_id, _query=dict(at=tag))}"><i class="icon-tag"></i>${h.shorter(tag)}</a> |
|
123 | 123 | </span> |
|
124 | 124 | %endfor |
|
125 | 125 | |
|
126 | 126 | </div> |
|
127 | 127 | </td> |
|
128 | 128 | </tr> |
|
129 | 129 | % endfor |
|
130 | 130 | |
|
131 | 131 | % if c.next_page: |
|
132 | 132 | <tr> |
|
133 | 133 | <td colspan="9" class="load-more-commits"> |
|
134 | 134 | <a class="next-commits" href="#loadNextCommits" onclick="commitsController.loadNext(this, ${c.next_page}, '${c.branch_name}');return false"> |
|
135 | 135 | ${_('load next')} |
|
136 | 136 | </a> |
|
137 | 137 | </td> |
|
138 | 138 | </tr> |
|
139 | 139 | % endif |
|
140 | 140 | <tr class="chunk-graph-data" style="display:none" |
|
141 | 141 | data-graph='${c.graph_data|n}' |
|
142 | 142 | data-node='${c.prev_page}:${c.next_page}' |
|
143 | 143 | data-commits='${c.graph_commits|n}'> |
|
144 | 144 | </tr> No newline at end of file |
@@ -1,352 +1,352 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.mako"/> |
|
4 | 4 | <%namespace name="diff_block" file="/changeset/diff_block.mako"/> |
|
5 | 5 | |
|
6 | 6 | <%def name="title()"> |
|
7 | 7 | ${_('%s Commit') % c.repo_name} - ${h.show_id(c.commit)} |
|
8 | 8 | %if c.rhodecode_name: |
|
9 | 9 | · ${h.branding(c.rhodecode_name)} |
|
10 | 10 | %endif |
|
11 | 11 | </%def> |
|
12 | 12 | |
|
13 | 13 | <%def name="menu_bar_nav()"> |
|
14 | 14 | ${self.menu_items(active='repositories')} |
|
15 | 15 | </%def> |
|
16 | 16 | |
|
17 | 17 | <%def name="menu_bar_subnav()"> |
|
18 | 18 | ${self.repo_menu(active='changelog')} |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | <%def name="main()"> |
|
22 | 22 | <script> |
|
23 | 23 | // TODO: marcink switch this to pyroutes |
|
24 | 24 | AJAX_COMMENT_DELETE_URL = "${h.url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
25 | 25 | templateContext.commit_data.commit_id = "${c.commit.raw_id}"; |
|
26 | 26 | </script> |
|
27 | 27 | <div class="box"> |
|
28 | 28 | <div class="title"> |
|
29 | 29 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
30 | 30 | </div> |
|
31 | 31 | |
|
32 | 32 | <div id="changeset_compare_view_content" class="summary changeset"> |
|
33 | 33 | <div class="summary-detail"> |
|
34 | 34 | <div class="summary-detail-header"> |
|
35 | 35 | <span class="breadcrumbs files_location"> |
|
36 | 36 | <h4>${_('Commit')} |
|
37 | 37 | <code> |
|
38 | ${h.show_id(c.commit)} | |
|
38 | 39 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.commit.raw_id}" title="${_('Copy the full commit id')}"></i> |
|
39 | ${h.show_id(c.commit)} | |
|
40 | 40 | % if hasattr(c.commit, 'phase'): |
|
41 | 41 | <span class="tag phase-${c.commit.phase} tooltip" title="${_('Commit phase')}">${c.commit.phase}</span> |
|
42 | 42 | % endif |
|
43 | 43 | |
|
44 | 44 | ## obsolete commits |
|
45 | 45 | % if hasattr(c.commit, 'obsolete'): |
|
46 | 46 | % if c.commit.obsolete: |
|
47 | 47 | <span class="tag obsolete-${c.commit.obsolete} tooltip" title="${_('Evolve State')}">${_('obsolete')}</span> |
|
48 | 48 | % endif |
|
49 | 49 | % endif |
|
50 | 50 | |
|
51 | 51 | ## hidden commits |
|
52 | 52 | % if hasattr(c.commit, 'hidden'): |
|
53 | 53 | % if c.commit.hidden: |
|
54 | 54 | <span class="tag hidden-${c.commit.hidden} tooltip" title="${_('Evolve State')}">${_('hidden')}</span> |
|
55 | 55 | % endif |
|
56 | 56 | % endif |
|
57 | 57 | |
|
58 | 58 | </code> |
|
59 | 59 | </h4> |
|
60 | 60 | </span> |
|
61 | 61 | <div class="pull-right"> |
|
62 | 62 | <span id="parent_link"> |
|
63 | 63 | <a href="#" title="${_('Parent Commit')}">${_('Parent')}</a> |
|
64 | 64 | </span> |
|
65 | 65 | | |
|
66 | 66 | <span id="child_link"> |
|
67 | 67 | <a href="#" title="${_('Child Commit')}">${_('Child')}</a> |
|
68 | 68 | </span> |
|
69 | 69 | </div> |
|
70 | 70 | </div> |
|
71 | 71 | |
|
72 | 72 | <div class="fieldset"> |
|
73 | 73 | <div class="left-label"> |
|
74 | 74 | ${_('Description')}: |
|
75 | 75 | </div> |
|
76 | 76 | <div class="right-content"> |
|
77 | 77 | <div id="trimmed_message_box" class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> |
|
78 | 78 | <div id="message_expand" style="display:none;"> |
|
79 | 79 | ${_('Expand')} |
|
80 | 80 | </div> |
|
81 | 81 | </div> |
|
82 | 82 | </div> |
|
83 | 83 | |
|
84 | 84 | %if c.statuses: |
|
85 | 85 | <div class="fieldset"> |
|
86 | 86 | <div class="left-label"> |
|
87 | 87 | ${_('Commit status')}: |
|
88 | 88 | </div> |
|
89 | 89 | <div class="right-content"> |
|
90 | 90 | <div class="changeset-status-ico"> |
|
91 | 91 | <div class="${'flag_status %s' % c.statuses[0]} pull-left"></div> |
|
92 | 92 | </div> |
|
93 | 93 | <div title="${_('Commit status')}" class="changeset-status-lbl">[${h.commit_status_lbl(c.statuses[0])}]</div> |
|
94 | 94 | </div> |
|
95 | 95 | </div> |
|
96 | 96 | %endif |
|
97 | 97 | |
|
98 | 98 | <div class="fieldset"> |
|
99 | 99 | <div class="left-label"> |
|
100 | 100 | ${_('References')}: |
|
101 | 101 | </div> |
|
102 | 102 | <div class="right-content"> |
|
103 | 103 | <div class="tags"> |
|
104 | 104 | |
|
105 | 105 | %if c.commit.merge: |
|
106 | 106 | <span class="mergetag tag"> |
|
107 | 107 | <i class="icon-merge"></i>${_('merge')} |
|
108 | 108 | </span> |
|
109 | 109 | %endif |
|
110 | 110 | |
|
111 | 111 | %if h.is_hg(c.rhodecode_repo): |
|
112 | 112 | %for book in c.commit.bookmarks: |
|
113 | 113 | <span class="booktag tag" title="${h.tooltip(_('Bookmark %s') % book)}"> |
|
114 | 114 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=book))}"><i class="icon-bookmark"></i>${h.shorter(book)}</a> |
|
115 | 115 | </span> |
|
116 | 116 | %endfor |
|
117 | 117 | %endif |
|
118 | 118 | |
|
119 | 119 | %for tag in c.commit.tags: |
|
120 | 120 | <span class="tagtag tag" title="${h.tooltip(_('Tag %s') % tag)}"> |
|
121 | 121 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=tag))}"><i class="icon-tag"></i>${tag}</a> |
|
122 | 122 | </span> |
|
123 | 123 | %endfor |
|
124 | 124 | |
|
125 | 125 | %if c.commit.branch: |
|
126 | 126 | <span class="branchtag tag" title="${h.tooltip(_('Branch %s') % c.commit.branch)}"> |
|
127 | 127 | <a href="${h.route_path('repo_files:default_path',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(at=c.commit.branch))}"><i class="icon-code-fork"></i>${h.shorter(c.commit.branch)}</a> |
|
128 | 128 | </span> |
|
129 | 129 | %endif |
|
130 | 130 | </div> |
|
131 | 131 | </div> |
|
132 | 132 | </div> |
|
133 | 133 | |
|
134 | 134 | <div class="fieldset"> |
|
135 | 135 | <div class="left-label"> |
|
136 | 136 | ${_('Diff options')}: |
|
137 | 137 | </div> |
|
138 | 138 | <div class="right-content"> |
|
139 | 139 | <div class="diff-actions"> |
|
140 | 140 | <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Raw diff'))}"> |
|
141 | 141 | ${_('Raw Diff')} |
|
142 | 142 | </a> |
|
143 | 143 | | |
|
144 | 144 | <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.commit.raw_id)}" class="tooltip" title="${h.tooltip(_('Patch diff'))}"> |
|
145 | 145 | ${_('Patch Diff')} |
|
146 | 146 | </a> |
|
147 | 147 | | |
|
148 | 148 | <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.commit.raw_id,diff='download')}" class="tooltip" title="${h.tooltip(_('Download diff'))}"> |
|
149 | 149 | ${_('Download Diff')} |
|
150 | 150 | </a> |
|
151 | 151 | | |
|
152 | 152 | ${c.ignorews_url(request.GET)} |
|
153 | 153 | | |
|
154 | 154 | ${c.context_url(request.GET)} |
|
155 | 155 | </div> |
|
156 | 156 | </div> |
|
157 | 157 | </div> |
|
158 | 158 | |
|
159 | 159 | <div class="fieldset"> |
|
160 | 160 | <div class="left-label"> |
|
161 | 161 | ${_('Comments')}: |
|
162 | 162 | </div> |
|
163 | 163 | <div class="right-content"> |
|
164 | 164 | <div class="comments-number"> |
|
165 | 165 | %if c.comments: |
|
166 | 166 | <a href="#comments">${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)}</a>, |
|
167 | 167 | %else: |
|
168 | 168 | ${ungettext("%d Commit comment", "%d Commit comments", len(c.comments)) % len(c.comments)} |
|
169 | 169 | %endif |
|
170 | 170 | %if c.inline_cnt: |
|
171 | 171 | <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt}</a> |
|
172 | 172 | %else: |
|
173 | 173 | ${ungettext("%d Inline Comment", "%d Inline Comments", c.inline_cnt) % c.inline_cnt} |
|
174 | 174 | %endif |
|
175 | 175 | </div> |
|
176 | 176 | </div> |
|
177 | 177 | </div> |
|
178 | 178 | |
|
179 | 179 | <div class="fieldset"> |
|
180 | 180 | <div class="left-label"> |
|
181 | 181 | ${_('Unresolved TODOs')}: |
|
182 | 182 | </div> |
|
183 | 183 | <div class="right-content"> |
|
184 | 184 | <div class="comments-number"> |
|
185 | 185 | % if c.unresolved_comments: |
|
186 | 186 | % for co in c.unresolved_comments: |
|
187 | 187 | <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))"> #${co.comment_id}</a>${'' if loop.last else ','} |
|
188 | 188 | % endfor |
|
189 | 189 | % else: |
|
190 | 190 | ${_('There are no unresolved TODOs')} |
|
191 | 191 | % endif |
|
192 | 192 | </div> |
|
193 | 193 | </div> |
|
194 | 194 | </div> |
|
195 | 195 | |
|
196 | 196 | </div> <!-- end summary-detail --> |
|
197 | 197 | |
|
198 | 198 | <div id="commit-stats" class="sidebar-right"> |
|
199 | 199 | <div class="summary-detail-header"> |
|
200 | 200 | <h4 class="item"> |
|
201 | 201 | ${_('Author')} |
|
202 | 202 | </h4> |
|
203 | 203 | </div> |
|
204 | 204 | <div class="sidebar-right-content"> |
|
205 | 205 | ${self.gravatar_with_user(c.commit.author)} |
|
206 | 206 | <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div> |
|
207 | 207 | </div> |
|
208 | 208 | </div><!-- end sidebar --> |
|
209 | 209 | </div> <!-- end summary --> |
|
210 | 210 | <div class="cs_files"> |
|
211 | 211 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
212 | 212 | ${cbdiffs.render_diffset_menu()} |
|
213 | 213 | ${cbdiffs.render_diffset( |
|
214 | 214 | c.changes[c.commit.raw_id], commit=c.commit, use_comments=True)} |
|
215 | 215 | </div> |
|
216 | 216 | |
|
217 | 217 | ## template for inline comment form |
|
218 | 218 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
219 | 219 | |
|
220 | 220 | ## render comments |
|
221 | 221 | ${comment.generate_comments(c.comments)} |
|
222 | 222 | |
|
223 | 223 | ## main comment form and it status |
|
224 | 224 | ${comment.comments(h.url('changeset_comment', repo_name=c.repo_name, revision=c.commit.raw_id), |
|
225 | 225 | h.commit_status(c.rhodecode_db_repo, c.commit.raw_id))} |
|
226 | 226 | </div> |
|
227 | 227 | |
|
228 | 228 | ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS |
|
229 | 229 | <script type="text/javascript"> |
|
230 | 230 | |
|
231 | 231 | $(document).ready(function() { |
|
232 | 232 | |
|
233 | 233 | var boxmax = parseInt($('#trimmed_message_box').css('max-height'), 10); |
|
234 | 234 | if($('#trimmed_message_box').height() === boxmax){ |
|
235 | 235 | $('#message_expand').show(); |
|
236 | 236 | } |
|
237 | 237 | |
|
238 | 238 | $('#message_expand').on('click', function(e){ |
|
239 | 239 | $('#trimmed_message_box').css('max-height', 'none'); |
|
240 | 240 | $(this).hide(); |
|
241 | 241 | }); |
|
242 | 242 | |
|
243 | 243 | $('.show-inline-comments').on('click', function(e){ |
|
244 | 244 | var boxid = $(this).attr('data-comment-id'); |
|
245 | 245 | var button = $(this); |
|
246 | 246 | |
|
247 | 247 | if(button.hasClass("comments-visible")) { |
|
248 | 248 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
249 | 249 | $(this).hide(); |
|
250 | 250 | }); |
|
251 | 251 | button.removeClass("comments-visible"); |
|
252 | 252 | } else { |
|
253 | 253 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
254 | 254 | $(this).show(); |
|
255 | 255 | }); |
|
256 | 256 | button.addClass("comments-visible"); |
|
257 | 257 | } |
|
258 | 258 | }); |
|
259 | 259 | |
|
260 | 260 | |
|
261 | 261 | // next links |
|
262 | 262 | $('#child_link').on('click', function(e){ |
|
263 | 263 | // fetch via ajax what is going to be the next link, if we have |
|
264 | 264 | // >1 links show them to user to choose |
|
265 | 265 | if(!$('#child_link').hasClass('disabled')){ |
|
266 | 266 | $.ajax({ |
|
267 | 267 | url: '${h.url('changeset_children',repo_name=c.repo_name, revision=c.commit.raw_id)}', |
|
268 | 268 | success: function(data) { |
|
269 | 269 | if(data.results.length === 0){ |
|
270 | 270 | $('#child_link').html("${_('No Child Commits')}").addClass('disabled'); |
|
271 | 271 | } |
|
272 | 272 | if(data.results.length === 1){ |
|
273 | 273 | var commit = data.results[0]; |
|
274 | 274 | window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); |
|
275 | 275 | } |
|
276 | 276 | else if(data.results.length === 2){ |
|
277 | 277 | $('#child_link').addClass('disabled'); |
|
278 | 278 | $('#child_link').addClass('double'); |
|
279 | 279 | var _html = ''; |
|
280 | 280 | _html +='<a title="__title__" href="__url__">__rev__</a> ' |
|
281 | 281 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
|
282 | 282 | .replace('__title__', data.results[0].message) |
|
283 | 283 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); |
|
284 | 284 | _html +=' | '; |
|
285 | 285 | _html +='<a title="__title__" href="__url__">__rev__</a> ' |
|
286 | 286 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
|
287 | 287 | .replace('__title__', data.results[1].message) |
|
288 | 288 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); |
|
289 | 289 | $('#child_link').html(_html); |
|
290 | 290 | } |
|
291 | 291 | } |
|
292 | 292 | }); |
|
293 | 293 | e.preventDefault(); |
|
294 | 294 | } |
|
295 | 295 | }); |
|
296 | 296 | |
|
297 | 297 | // prev links |
|
298 | 298 | $('#parent_link').on('click', function(e){ |
|
299 | 299 | // fetch via ajax what is going to be the next link, if we have |
|
300 | 300 | // >1 links show them to user to choose |
|
301 | 301 | if(!$('#parent_link').hasClass('disabled')){ |
|
302 | 302 | $.ajax({ |
|
303 | 303 | url: '${h.url("changeset_parents",repo_name=c.repo_name, revision=c.commit.raw_id)}', |
|
304 | 304 | success: function(data) { |
|
305 | 305 | if(data.results.length === 0){ |
|
306 | 306 | $('#parent_link').html('${_('No Parent Commits')}').addClass('disabled'); |
|
307 | 307 | } |
|
308 | 308 | if(data.results.length === 1){ |
|
309 | 309 | var commit = data.results[0]; |
|
310 | 310 | window.location = pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': commit.raw_id}); |
|
311 | 311 | } |
|
312 | 312 | else if(data.results.length === 2){ |
|
313 | 313 | $('#parent_link').addClass('disabled'); |
|
314 | 314 | $('#parent_link').addClass('double'); |
|
315 | 315 | var _html = ''; |
|
316 | 316 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' |
|
317 | 317 | .replace('__rev__','r{0}:{1}'.format(data.results[0].revision, data.results[0].raw_id.substr(0,6))) |
|
318 | 318 | .replace('__title__', data.results[0].message) |
|
319 | 319 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[0].raw_id})); |
|
320 | 320 | _html +=' | '; |
|
321 | 321 | _html +='<a title="__title__" href="__url__">Parent __rev__</a>' |
|
322 | 322 | .replace('__rev__','r{0}:{1}'.format(data.results[1].revision, data.results[1].raw_id.substr(0,6))) |
|
323 | 323 | .replace('__title__', data.results[1].message) |
|
324 | 324 | .replace('__url__', pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}','revision': data.results[1].raw_id})); |
|
325 | 325 | $('#parent_link').html(_html); |
|
326 | 326 | } |
|
327 | 327 | } |
|
328 | 328 | }); |
|
329 | 329 | e.preventDefault(); |
|
330 | 330 | } |
|
331 | 331 | }); |
|
332 | 332 | |
|
333 | 333 | if (location.hash) { |
|
334 | 334 | var result = splitDelimitedHash(location.hash); |
|
335 | 335 | var line = $('html').find(result.loc); |
|
336 | 336 | if (line.length > 0){ |
|
337 | 337 | offsetScroll(line, 70); |
|
338 | 338 | } |
|
339 | 339 | } |
|
340 | 340 | |
|
341 | 341 | // browse tree @ revision |
|
342 | 342 | $('#files_link').on('click', function(e){ |
|
343 | 343 | window.location = '${h.route_path('repo_files:default_path',repo_name=c.repo_name, commit_id=c.commit.raw_id)}'; |
|
344 | 344 | e.preventDefault(); |
|
345 | 345 | }); |
|
346 | 346 | |
|
347 | 347 | // inject comments into their proper positions |
|
348 | 348 | var file_comments = $('.inline-comment-placeholder'); |
|
349 | 349 | }) |
|
350 | 350 | </script> |
|
351 | 351 | |
|
352 | 352 | </%def> |
@@ -1,49 +1,49 b'' | |||
|
1 | 1 | |
|
2 | 2 | <div id="codeblock" class="browserblock"> |
|
3 | 3 | <div class="browser-header"> |
|
4 | 4 | <div class="browser-nav"> |
|
5 | 5 | ${h.form(h.url.current(), method='GET', id='at_rev_form')} |
|
6 | 6 | <div class="info_box"> |
|
7 | 7 | ${h.hidden('refs_filter')} |
|
8 | 8 | <div class="info_box_elem previous"> |
|
9 |
<a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class="pjax-link ${'disabled' if c.url_prev == '#' else ''}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon- |
|
|
9 | <a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class="pjax-link ${'disabled' if c.url_prev == '#' else ''}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon-left"></i></a> | |
|
10 | 10 | </div> |
|
11 | 11 | <div class="info_box_elem">${h.text('at_rev',value=c.commit.revision)}</div> |
|
12 | 12 | <div class="info_box_elem next"> |
|
13 |
<a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class="pjax-link ${'disabled' if c.url_next == '#' else ''}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon- |
|
|
13 | <a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class="pjax-link ${'disabled' if c.url_next == '#' else ''}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon-right"></i></a> | |
|
14 | 14 | </div> |
|
15 | 15 | </div> |
|
16 | 16 | ${h.end_form()} |
|
17 | 17 | |
|
18 | 18 | <div id="search_activate_id" class="search_activate"> |
|
19 | 19 | <a class="btn btn-default" id="filter_activate" href="javascript:void(0)">${_('Search File List')}</a> |
|
20 | 20 | </div> |
|
21 | 21 | <div id="search_deactivate_id" class="search_activate hidden"> |
|
22 | 22 | <a class="btn btn-default" id="filter_deactivate" href="javascript:void(0)">${_('Close File List')}</a> |
|
23 | 23 | </div> |
|
24 | 24 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
25 | 25 | <div title="${_('Add New File')}" class="btn btn-primary new-file"> |
|
26 | 26 | <a href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _anchor='edit')}"> |
|
27 | 27 | ${_('Add File')}</a> |
|
28 | 28 | </div> |
|
29 | 29 | % endif |
|
30 | 30 | </div> |
|
31 | 31 | |
|
32 | 32 | <div class="browser-search"> |
|
33 | 33 | <div class="node-filter"> |
|
34 | 34 | <div class="node_filter_box hidden" id="node_filter_box_loading" >${_('Loading file list...')}</div> |
|
35 | 35 | <div class="node_filter_box hidden" id="node_filter_box" > |
|
36 | 36 | <div class="node-filter-path">${h.get_last_path_part(c.file)}/</div> |
|
37 | 37 | <div class="node-filter-input"> |
|
38 | 38 | <input class="init" type="text" name="filter" size="25" id="node_filter" autocomplete="off"> |
|
39 | 39 | </div> |
|
40 | 40 | </div> |
|
41 | 41 | </div> |
|
42 | 42 | </div> |
|
43 | 43 | </div> |
|
44 | 44 | ## file tree is computed from caches, and filled in |
|
45 | 45 | <div id="file-tree"> |
|
46 | 46 | ${c.file_tree |n} |
|
47 | 47 | </div> |
|
48 | 48 | |
|
49 | 49 | </div> |
@@ -1,82 +1,82 b'' | |||
|
1 | 1 | <div id="file-tree-wrapper" class="browser-body ${'full-load' if c.full_load else ''}"> |
|
2 | 2 | <table class="code-browser rctable"> |
|
3 | 3 | <thead> |
|
4 | 4 | <tr> |
|
5 | 5 | <th>${_('Name')}</th> |
|
6 | 6 | <th>${_('Size')}</th> |
|
7 | 7 | <th>${_('Modified')}</th> |
|
8 | 8 | <th>${_('Last Commit')}</th> |
|
9 | 9 | <th>${_('Author')}</th> |
|
10 | 10 | </tr> |
|
11 | 11 | </thead> |
|
12 | 12 | |
|
13 | 13 | <tbody id="tbody"> |
|
14 | 14 | %if c.file.parent: |
|
15 | 15 | <tr class="parity0"> |
|
16 | 16 | <td class="td-componentname"> |
|
17 | 17 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.file.parent.path)}" class="pjax-link"> |
|
18 |
<i class="icon- |
|
|
18 | <i class="icon-directory"></i>.. | |
|
19 | 19 | </a> |
|
20 | 20 | </td> |
|
21 | 21 | <td></td> |
|
22 | 22 | <td></td> |
|
23 | 23 | <td></td> |
|
24 | 24 | <td></td> |
|
25 | 25 | </tr> |
|
26 | 26 | %endif |
|
27 | 27 | %for cnt,node in enumerate(c.file): |
|
28 | 28 | <tr class="parity${cnt%2}"> |
|
29 | 29 | <td class="td-componentname"> |
|
30 | 30 | % if node.is_submodule(): |
|
31 | 31 | <span class="submodule-dir"> |
|
32 | 32 | % if node.url.startswith('http://') or node.url.startswith('https://'): |
|
33 | 33 | <a href="${node.url}"> |
|
34 |
<i class="icon- |
|
|
34 | <i class="icon-directory browser-dir"></i>${node.name} | |
|
35 | 35 | </a> |
|
36 | 36 | % else: |
|
37 |
<i class="icon- |
|
|
37 | <i class="icon-directory browser-dir"></i>${node.name} | |
|
38 | 38 | % endif |
|
39 | 39 | </span> |
|
40 | 40 | % else: |
|
41 | 41 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=h.safe_unicode(node.path))}" class="pjax-link"> |
|
42 |
<i class="${'icon-file browser-file' if node.is_file() else 'icon- |
|
|
42 | <i class="${'icon-file-text browser-file' if node.is_file() else 'icon-directory browser-dir'}"></i>${node.name} | |
|
43 | 43 | </a> |
|
44 | 44 | % endif |
|
45 | 45 | </td> |
|
46 | 46 | %if node.is_file(): |
|
47 | 47 | <td class="td-size" data-attr-name="size"> |
|
48 | 48 | % if c.full_load: |
|
49 | 49 | <span data-size="${node.size}">${h.format_byte_size_binary(node.size)}</span> |
|
50 | 50 | % else: |
|
51 | 51 | ${_('Loading ...')} |
|
52 | 52 | % endif |
|
53 | 53 | </td> |
|
54 | 54 | <td class="td-time" data-attr-name="modified_at"> |
|
55 | 55 | % if c.full_load: |
|
56 | 56 | <span data-date="${node.last_commit.date}">${h.age_component(node.last_commit.date)}</span> |
|
57 | 57 | % endif |
|
58 | 58 | </td> |
|
59 | 59 | <td class="td-hash" data-attr-name="commit_id"> |
|
60 | 60 | % if c.full_load: |
|
61 | 61 | <div class="tooltip" title="${h.tooltip(node.last_commit.message)}"> |
|
62 | 62 | <pre data-commit-id="${node.last_commit.raw_id}">r${node.last_commit.revision}:${node.last_commit.short_id}</pre> |
|
63 | 63 | </div> |
|
64 | 64 | % endif |
|
65 | 65 | </td> |
|
66 | 66 | <td class="td-user" data-attr-name="author"> |
|
67 | 67 | % if c.full_load: |
|
68 | 68 | <span data-author="${node.last_commit.author}" title="${h.tooltip(node.last_commit.author)}">${h.gravatar_with_user(node.last_commit.author)|n}</span> |
|
69 | 69 | % endif |
|
70 | 70 | </td> |
|
71 | 71 | %else: |
|
72 | 72 | <td></td> |
|
73 | 73 | <td></td> |
|
74 | 74 | <td></td> |
|
75 | 75 | <td></td> |
|
76 | 76 | %endif |
|
77 | 77 | </tr> |
|
78 | 78 | %endfor |
|
79 | 79 | </tbody> |
|
80 | 80 | <tbody id="tbody_filtered"></tbody> |
|
81 | 81 | </table> |
|
82 | 82 | </div> |
@@ -1,93 +1,98 b'' | |||
|
1 | 1 | <%namespace name="sourceblock" file="/codeblocks/source.mako"/> |
|
2 | 2 | |
|
3 | 3 | <div id="codeblock" class="codeblock"> |
|
4 | 4 | <div class="codeblock-header"> |
|
5 | 5 | <div class="stats"> |
|
6 | <span> <strong>${c.file}</strong></span> | |
|
6 | <span> | |
|
7 | <strong> | |
|
8 | <i class="icon-file-text"></i> | |
|
9 | ${c.file} | |
|
10 | </strong> | |
|
11 | </span> | |
|
7 | 12 | % if c.lf_node: |
|
8 | 13 | <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span> |
|
9 | 14 | % endif |
|
10 | 15 | <span> | ${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span> |
|
11 | 16 | <span> | ${h.format_byte_size_binary(c.file.size)}</span> |
|
12 | 17 | <span> | ${c.file.mimetype} </span> |
|
13 | 18 | <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span> |
|
14 | 19 | <span class="item last"> | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.file.path}" title="${_('Copy the full path')}"></i></span> |
|
15 | 20 | </div> |
|
16 | 21 | <div class="buttons"> |
|
17 | 22 | <a id="file_history_overview" href="#"> |
|
18 | 23 | ${_('History')} |
|
19 | 24 | </a> |
|
20 | 25 | <a id="file_history_overview_full" style="display: none" href="${h.route_path('repo_changelog_file',repo_name=c.repo_name, commit_id=c.commit.raw_id, f_path=c.f_path)}"> |
|
21 | 26 | ${_('Show Full History')} |
|
22 | 27 | </a> | |
|
23 | 28 | %if c.annotate: |
|
24 | 29 | ${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
25 | 30 | %else: |
|
26 | 31 | ${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
27 | 32 | %endif |
|
28 | 33 | | ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
29 | 34 | | |
|
30 | 35 | % if c.lf_node: |
|
31 | 36 | <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _query=dict(lf=1))}"> |
|
32 | 37 | ${_('Download largefile')} |
|
33 | 38 | </a> |
|
34 | 39 | % else: |
|
35 | 40 | <a href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
36 | 41 | ${_('Download')} |
|
37 | 42 | </a> |
|
38 | 43 | % endif |
|
39 | 44 | |
|
40 | 45 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
41 | 46 | | |
|
42 | 47 | %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary: |
|
43 | 48 | <a href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}"> |
|
44 | 49 | ${_('Edit on Branch:{}').format(c.branch_name)} |
|
45 | 50 | </a> |
|
46 | 51 | | <a class="btn-danger btn-link" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">${_('Delete')} |
|
47 | 52 | </a> |
|
48 | 53 | %elif c.on_branch_head and c.branch_or_raw_id and c.file.is_binary: |
|
49 | 54 | ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing binary files not allowed'))} |
|
50 | 55 | | ${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit'),class_="btn-danger btn-link")} |
|
51 | 56 | %else: |
|
52 | 57 | ${h.link_to(_('Edit'), '#', class_="btn btn-link disabled tooltip", title=_('Editing files allowed only when on branch head commit'))} |
|
53 | 58 | | ${h.link_to(_('Delete'), '#', class_="btn btn-danger btn-link disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))} |
|
54 | 59 | %endif |
|
55 | 60 | %endif |
|
56 | 61 | </div> |
|
57 | 62 | </div> |
|
58 | 63 | <div id="file_history_container"></div> |
|
59 | 64 | <div class="code-body"> |
|
60 | 65 | %if c.file.is_binary: |
|
61 | 66 | <% rendered_binary = h.render_binary(c.repo_name, c.file)%> |
|
62 | 67 | % if rendered_binary: |
|
63 | 68 | ${rendered_binary} |
|
64 | 69 | % else: |
|
65 | 70 | <div> |
|
66 | 71 | ${_('Binary file (%s)') % c.file.mimetype} |
|
67 | 72 | </div> |
|
68 | 73 | % endif |
|
69 | 74 | %else: |
|
70 | 75 | % if c.file.size < c.visual.cut_off_limit_file: |
|
71 | 76 | %if c.renderer and not c.annotate: |
|
72 | 77 | ${h.render(c.file.content, renderer=c.renderer, relative_url=h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
73 | 78 | %else: |
|
74 | 79 | <table class="cb codehilite"> |
|
75 | 80 | %if c.annotate: |
|
76 | 81 | <% color_hasher = h.color_hasher() %> |
|
77 | 82 | %for annotation, lines in c.annotated_lines: |
|
78 | 83 | ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)} |
|
79 | 84 | %endfor |
|
80 | 85 | %else: |
|
81 | 86 | %for line_num, tokens in enumerate(c.lines, 1): |
|
82 | 87 | ${sourceblock.render_line(line_num, tokens)} |
|
83 | 88 | %endfor |
|
84 | 89 | %endif |
|
85 | 90 | </table> |
|
86 | 91 | %endif |
|
87 | 92 | %else: |
|
88 | 93 | ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'), |
|
89 | 94 | h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))} |
|
90 | 95 | %endif |
|
91 | 96 | %endif |
|
92 | 97 | </div> |
|
93 | 98 | </div> No newline at end of file |
@@ -1,63 +1,63 b'' | |||
|
1 | 1 | |
|
2 | 2 | <div class="pull-request-wrap"> |
|
3 | 3 | |
|
4 | 4 | % if c.pr_merge_possible: |
|
5 | 5 | <h2 class="merge-status"> |
|
6 |
<span class="merge-icon success"><i class="icon- |
|
|
6 | <span class="merge-icon success"><i class="icon-ok"></i></span> | |
|
7 | 7 | ${_('This pull request can be merged automatically.')} |
|
8 | 8 | </h2> |
|
9 | 9 | % else: |
|
10 | 10 | <h2 class="merge-status"> |
|
11 | 11 | <span class="merge-icon warning"><i class="icon-false"></i></span> |
|
12 | 12 | ${_('Merge is not currently possible because of below failed checks.')} |
|
13 | 13 | </h2> |
|
14 | 14 | % endif |
|
15 | 15 | |
|
16 | 16 | <ul> |
|
17 | 17 | % for pr_check_key, pr_check_details in c.pr_merge_errors.items(): |
|
18 | 18 | <% pr_check_type = pr_check_details['error_type'] %> |
|
19 | 19 | <li> |
|
20 | 20 | <span class="merge-message ${pr_check_type}" data-role="merge-message"> |
|
21 | 21 | - ${pr_check_details['message']} |
|
22 | 22 | % if pr_check_key == 'todo': |
|
23 | 23 | % for co in pr_check_details['details']: |
|
24 | 24 | <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'), 0, ${h.json.dumps(co.outdated)})"> #${co.comment_id}</a>${'' if loop.last else ','} |
|
25 | 25 | % endfor |
|
26 | 26 | % endif |
|
27 | 27 | </span> |
|
28 | 28 | </li> |
|
29 | 29 | % endfor |
|
30 | 30 | </ul> |
|
31 | 31 | |
|
32 | 32 | <div class="pull-request-merge-actions"> |
|
33 | 33 | % if c.allowed_to_merge: |
|
34 | 34 | <div class="pull-right"> |
|
35 | 35 | ${h.secure_form(h.url('pullrequest_merge', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), id='merge_pull_request_form')} |
|
36 | 36 | <% merge_disabled = ' disabled' if c.pr_merge_possible is False else '' %> |
|
37 | 37 | <a class="btn" href="#" onclick="refreshMergeChecks(); return false;">${_('refresh checks')}</a> |
|
38 | 38 | <input type="submit" id="merge_pull_request" value="${_('Merge Pull Request')}" class="btn${merge_disabled}"${merge_disabled}> |
|
39 | 39 | ${h.end_form()} |
|
40 | 40 | </div> |
|
41 | 41 | % elif c.rhodecode_user.username != h.DEFAULT_USER: |
|
42 | 42 | <a class="btn" href="#" onclick="refreshMergeChecks(); return false;">${_('refresh checks')}</a> |
|
43 | 43 | <input type="submit" value="${_('Merge Pull Request')}" class="btn disabled" disabled="disabled" title="${_('You are not allowed to merge this pull request.')}"> |
|
44 | 44 | % else: |
|
45 | 45 | <input type="submit" value="${_('Login to Merge this Pull Request')}" class="btn disabled" disabled="disabled"> |
|
46 | 46 | % endif |
|
47 | 47 | </div> |
|
48 | 48 | |
|
49 | 49 | % if c.allowed_to_close: |
|
50 | 50 | ## close PR action, injected later next to COMMENT button |
|
51 | 51 | <div id="close-pull-request-action" style="display: none"> |
|
52 | 52 | % if c.pull_request_review_status == c.REVIEW_STATUS_APPROVED: |
|
53 | 53 | <a class="btn btn-approved-status" href="#close-as-approved" onclick="closePullRequest('${c.REVIEW_STATUS_APPROVED}'); return false;"> |
|
54 | 54 | ${_('Close with status {}').format(h.commit_status_lbl(c.REVIEW_STATUS_APPROVED))} |
|
55 | 55 | </a> |
|
56 | 56 | % else: |
|
57 | 57 | <a class="btn btn-rejected-status" href="#close-as-rejected" onclick="closePullRequest('${c.REVIEW_STATUS_REJECTED}'); return false;"> |
|
58 | 58 | ${_('Close with status {}').format(h.commit_status_lbl(c.REVIEW_STATUS_REJECTED))} |
|
59 | 59 | </a> |
|
60 | 60 | % endif |
|
61 | 61 | </div> |
|
62 | 62 | % endif |
|
63 | 63 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now