comments: show links to unresolved todos
- show hidden comments when using navigation for comments - small UI fixes
This commit is contained in:
parent
7b5e288d8c
commit
a044290ee2
4 changed files with 30 additions and 7 deletions
|
|
@ -833,7 +833,7 @@ class PullrequestsController(BaseRepoController):
|
|||
|
||||
_merge_check = MergeCheck.validate(
|
||||
pull_request_latest, user=c.rhodecode_user)
|
||||
c.pr_merge_errors = _merge_check.errors
|
||||
c.pr_merge_errors = _merge_check.error_details
|
||||
c.pr_merge_possible = not _merge_check.failed
|
||||
c.pr_merge_message = _merge_check.merge_msg
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
|
||||
// Comments
|
||||
@comment-outdated-opacity: 0.6;
|
||||
|
||||
.comments {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
@ -91,7 +93,6 @@ tr.inline-comments div {
|
|||
margin: 2px 8px;
|
||||
font-family: @text-italic;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -238,11 +239,16 @@ tr.inline-comments div {
|
|||
.pr-version-num {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@comment-padding: 5px;
|
||||
|
||||
.general-comments {
|
||||
.comment-outdated {
|
||||
opacity: @comment-outdated-opacity;
|
||||
}
|
||||
}
|
||||
|
||||
.inline-comments {
|
||||
border-radius: @border-radius;
|
||||
.comment {
|
||||
|
|
@ -250,7 +256,7 @@ tr.inline-comments div {
|
|||
border-radius: @border-radius;
|
||||
}
|
||||
.comment-outdated {
|
||||
opacity: 0.5;
|
||||
opacity: @comment-outdated-opacity;
|
||||
}
|
||||
|
||||
.comment-inline {
|
||||
|
|
@ -490,6 +496,11 @@ form.comment-form {
|
|||
padding: 8px 12px;
|
||||
border: 1px solid @grey5;
|
||||
.border-radius(@border-radius);
|
||||
|
||||
.resolve-action {
|
||||
padding: 1px 0px 0px 6px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.comment-area-header .nav-links {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ var bindToggleButtons = function() {
|
|||
}, 10);
|
||||
|
||||
var resolvedInfo = (
|
||||
'<li class="">' +
|
||||
'<li class="resolve-action">' +
|
||||
'<input type="hidden" id="resolve_comment_{0}" name="resolve_comment_{0}" value="{0}">' +
|
||||
'<button id="resolve_comment_action_{0}" class="resolve-text btn btn-sm" onclick="return Rhodecode.comments.submitResolution({0})">{1} #{0}</button>' +
|
||||
'</li>'
|
||||
|
|
@ -470,9 +470,15 @@ var CommentsController = function() {
|
|||
node = $('comment-current')
|
||||
}
|
||||
}
|
||||
$wrapper = $(node).closest('div.comment');
|
||||
$comment = $(node).closest(klass);
|
||||
$comments = $(klass);
|
||||
|
||||
// show hidden comment when referenced.
|
||||
if (!$wrapper.is(':visible')){
|
||||
$wrapper.show();
|
||||
}
|
||||
|
||||
$('.comment-selected').removeClass('comment-selected');
|
||||
|
||||
var nextIdx = $(klass).index($comment) + offset;
|
||||
|
|
|
|||
|
|
@ -15,10 +15,16 @@
|
|||
% endif
|
||||
|
||||
<ul>
|
||||
% for pr_check_type, pr_check_msg in c.pr_merge_errors:
|
||||
% for pr_check_key, pr_check_details in c.pr_merge_errors.items():
|
||||
<% pr_check_type = pr_check_details['error_type'] %>
|
||||
<li>
|
||||
<span class="merge-message ${pr_check_type}" data-role="merge-message">
|
||||
- ${pr_check_msg}
|
||||
- ${pr_check_details['message']}
|
||||
% if pr_check_key == 'todo':
|
||||
% for co in pr_check_details['details']:
|
||||
<a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'))"> #${co.comment_id}</a>${'' if loop.last else ','}
|
||||
% endfor
|
||||
% endif
|
||||
</span>
|
||||
</li>
|
||||
% endfor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue