From ae99ab4e5e079247882d267614cc5bd6c9b64dc3 Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Fri, 3 Dec 2021 15:21:17 +0100 Subject: [PATCH] drafts: show TODO drafts properly. - Fixes #5668 --- rhodecode/templates/base/sidebar.mako | 17 +++++++++++++---- .../templates/ejs_templates/templates.html | 2 +- .../pullrequests/pullrequest_show.mako | 1 - 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/rhodecode/templates/base/sidebar.mako b/rhodecode/templates/base/sidebar.mako index 2efc292e..8545bb53 100644 --- a/rhodecode/templates/base/sidebar.mako +++ b/rhodecode/templates/base/sidebar.mako @@ -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' + %> <%= $.timeago(datetime) %> <% if (is_todo) { %> -
+
Resolve TODO diff --git a/rhodecode/templates/pullrequests/pullrequest_show.mako b/rhodecode/templates/pullrequests/pullrequest_show.mako index 04622ddd..64c81f9f 100644 --- a/rhodecode/templates/pullrequests/pullrequest_show.mako +++ b/rhodecode/templates/pullrequests/pullrequest_show.mako @@ -564,7 +564,6 @@ - ${_('Drafts')} ${_('Submit')}