##// END OF EJS Templates
comments: show links to unresolved todos...
marcink -
r1344:639b2044 default
parent child Browse files
Show More
@@ -833,7 +833,7 b' class PullrequestsController(BaseRepoCon'
833
833
834 _merge_check = MergeCheck.validate(
834 _merge_check = MergeCheck.validate(
835 pull_request_latest, user=c.rhodecode_user)
835 pull_request_latest, user=c.rhodecode_user)
836 c.pr_merge_errors = _merge_check.errors
836 c.pr_merge_errors = _merge_check.error_details
837 c.pr_merge_possible = not _merge_check.failed
837 c.pr_merge_possible = not _merge_check.failed
838 c.pr_merge_message = _merge_check.merge_msg
838 c.pr_merge_message = _merge_check.merge_msg
839
839
@@ -4,6 +4,8 b''
4
4
5
5
6 // Comments
6 // Comments
7 @comment-outdated-opacity: 0.6;
8
7 .comments {
9 .comments {
8 width: 100%;
10 width: 100%;
9 }
11 }
@@ -91,7 +93,6 b' tr.inline-comments div {'
91 margin: 2px 8px;
93 margin: 2px 8px;
92 font-family: @text-italic;
94 font-family: @text-italic;
93 }
95 }
94
95 }
96 }
96
97
97
98
@@ -238,11 +239,16 b' tr.inline-comments div {'
238 .pr-version-num {
239 .pr-version-num {
239 font-size: 10px;
240 font-size: 10px;
240 }
241 }
241
242 }
242 }
243
243
244 @comment-padding: 5px;
244 @comment-padding: 5px;
245
245
246 .general-comments {
247 .comment-outdated {
248 opacity: @comment-outdated-opacity;
249 }
250 }
251
246 .inline-comments {
252 .inline-comments {
247 border-radius: @border-radius;
253 border-radius: @border-radius;
248 .comment {
254 .comment {
@@ -250,7 +256,7 b' tr.inline-comments div {'
250 border-radius: @border-radius;
256 border-radius: @border-radius;
251 }
257 }
252 .comment-outdated {
258 .comment-outdated {
253 opacity: 0.5;
259 opacity: @comment-outdated-opacity;
254 }
260 }
255
261
256 .comment-inline {
262 .comment-inline {
@@ -490,6 +496,11 b' form.comment-form {'
490 padding: 8px 12px;
496 padding: 8px 12px;
491 border: 1px solid @grey5;
497 border: 1px solid @grey5;
492 .border-radius(@border-radius);
498 .border-radius(@border-radius);
499
500 .resolve-action {
501 padding: 1px 0px 0px 6px;
502 }
503
493 }
504 }
494
505
495 .comment-area-header .nav-links {
506 .comment-area-header .nav-links {
@@ -116,7 +116,7 b' var bindToggleButtons = function() {'
116 }, 10);
116 }, 10);
117
117
118 var resolvedInfo = (
118 var resolvedInfo = (
119 '<li class="">' +
119 '<li class="resolve-action">' +
120 '<input type="hidden" id="resolve_comment_{0}" name="resolve_comment_{0}" value="{0}">' +
120 '<input type="hidden" id="resolve_comment_{0}" name="resolve_comment_{0}" value="{0}">' +
121 '<button id="resolve_comment_action_{0}" class="resolve-text btn btn-sm" onclick="return Rhodecode.comments.submitResolution({0})">{1} #{0}</button>' +
121 '<button id="resolve_comment_action_{0}" class="resolve-text btn btn-sm" onclick="return Rhodecode.comments.submitResolution({0})">{1} #{0}</button>' +
122 '</li>'
122 '</li>'
@@ -470,9 +470,15 b' var CommentsController = function() {'
470 node = $('comment-current')
470 node = $('comment-current')
471 }
471 }
472 }
472 }
473 $wrapper = $(node).closest('div.comment');
473 $comment = $(node).closest(klass);
474 $comment = $(node).closest(klass);
474 $comments = $(klass);
475 $comments = $(klass);
475
476
477 // show hidden comment when referenced.
478 if (!$wrapper.is(':visible')){
479 $wrapper.show();
480 }
481
476 $('.comment-selected').removeClass('comment-selected');
482 $('.comment-selected').removeClass('comment-selected');
477
483
478 var nextIdx = $(klass).index($comment) + offset;
484 var nextIdx = $(klass).index($comment) + offset;
@@ -15,10 +15,16 b''
15 % endif
15 % endif
16
16
17 <ul>
17 <ul>
18 % for pr_check_type, pr_check_msg in c.pr_merge_errors:
18 % for pr_check_key, pr_check_details in c.pr_merge_errors.items():
19 <% pr_check_type = pr_check_details['error_type'] %>
19 <li>
20 <li>
20 <span class="merge-message ${pr_check_type}" data-role="merge-message">
21 <span class="merge-message ${pr_check_type}" data-role="merge-message">
21 - ${pr_check_msg}
22 - ${pr_check_details['message']}
23 % if pr_check_key == 'todo':
24 % for co in pr_check_details['details']:
25 <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))"> #${co.comment_id}</a>${'' if loop.last else ','}
26 % endfor
27 % endif
22 </span>
28 </span>
23 </li>
29 </li>
24 % endfor
30 % endfor
General Comments 0
You need to be logged in to leave comments. Login now