drafts: show TODO drafts properly.

- Fixes #5668
This commit is contained in:
RhodeCode Admin 2021-12-03 15:21:17 +01:00
parent 2b35e8af0d
commit ae99ab4e5e
3 changed files with 14 additions and 6 deletions

View file

@ -66,7 +66,7 @@
% endif
% else:
## SKIP TODOs we display them in other area
% if comment_obj.is_todo:
% if comment_obj.is_todo and not comment_obj.draft:
<% display = 'none' %>
% endif
## Skip outdated comments
@ -122,12 +122,21 @@
'review_status': (comment_obj.review_status or '')
})
icon = ''
if comment_obj.outdated:
icon = 'icon-comment-toggle'
icon += ' icon-comment-toggle'
elif comment_obj.is_inline:
icon = 'icon-code'
icon += ' icon-code'
else:
icon = 'icon-comment'
icon += ' icon-comment'
if comment_obj.draft:
if comment_obj.is_todo:
icon = 'icon-flag-filled icon-draft'
else:
icon = 'icon-comment icon-draft'
%>
<i id="commentHovercard${comment_obj.comment_id}"

View file

@ -237,7 +237,7 @@ if (show_disabled) {
<time class="timeago" title="<%= created_on %>" datetime="<%= datetime %>"><%= $.timeago(datetime) %></time>
<% if (is_todo) { %>
<div style="text-align: center; padding-top: 5px">
<div style="text-align: left; padding-top: 5px">
<a class="btn btn-sm" href="#resolveTodo<%- comment_id -%>" onclick="Rhodecode.comments.resolveTodo(this, '<%- comment_id -%>'); return false">
<strong>Resolve TODO</strong>
</a>

View file

@ -564,7 +564,6 @@
<input name="select_all_drafts" type="checkbox" onclick="selectDraftComments(event)">
</span>
<span class="sidebar-heading noselect" onclick="refreshDraftComments(); return false">
<i class="icon-comment icon-draft"></i>
${_('Drafts')}
</span>
<span class="block-right action_button last-item" onclick="submitDrafts(event)">${_('Submit')}</span>