From 2ec50b9514f33ee64ec40de1e63008b3ab68c56b Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 16 Oct 2020 03:46:56 +0200 Subject: [PATCH] Show outdated comments in pull request (#13148) (#13162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: zeripath Co-authored-by: Iván Valdés Co-authored-by: zeripath --- options/locale/locale_en-US.ini | 1 + .../repo/issue/view_content/comments.tmpl | 27 +++++++++++-------- web_src/less/_repository.less | 10 +++++++ 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 95ffa0b0e..16d3874e1 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1190,6 +1190,7 @@ issues.review.remove_review_request_self = "refused to review %s" issues.review.pending = Pending issues.review.review = Review issues.review.reviewers = Reviewers +issues.review.outdated = Outdated issues.review.show_outdated = Show outdated issues.review.hide_outdated = Hide outdated issues.review.show_resolved = Show resolved diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index f9ae9ba07..86ce6148c 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -441,29 +441,34 @@ {{$resolveDoer := (index $comms 0).ResolveDoer}} {{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}} {{if or $invalid $resolved}} - - {{end}} - {{$filename}} + {{$filename}} + {{if and $invalid (not $resolved)}} + + {{$.i18n.Tr "repo.issues.review.outdated"}} + + {{end}} {{$diff := (CommentMustAsDiff (index $comms 0))}} {{if $diff}} {{$file := (index $diff.Files 0)}} -
+
@@ -475,7 +480,7 @@ {{end}} -
+
{{range $comms}} {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index ca1a87b55..619bc749e 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -1220,6 +1220,16 @@ display: block; } } + + .tag { + color: black; + margin: 3px 0 0 5px; + padding: 2px 5px; + font-size: 12px; + border: 1px solid rgba(0, 0, 0, .1); + border-radius: 3px; + background-color: #fffbb2; + } } }