diff options
author | Iván Valdés <iv@a.ki> | 2020-10-15 01:17:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 11:17:48 +0300 |
commit | 05c7e5874271fd70bab108b873e1d76bde29367c (patch) | |
tree | a7c656093b3c2fe42cb3afc23a32e1aa7a94a3f2 /templates | |
parent | bfb3333528fea25ed5b193ea2ef723f568174dae (diff) | |
download | gitea-05c7e5874271fd70bab108b873e1d76bde29367c.tar.gz gitea-05c7e5874271fd70bab108b873e1d76bde29367c.zip |
Show outdated comments in pull request (#13148)
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/comments.tmpl | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index f9ae9ba071..86ce6148c1 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}} - <button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="ui compact right labeled button show-outdated"> + <button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}hide {{end}}ui compact right labeled button show-outdated"> {{svg "octicon-unfold"}} - {{if $invalid }} - {{$.i18n.Tr "repo.issues.review.show_outdated"}} - {{else}} + {{if $resolved}} {{$.i18n.Tr "repo.issues.review.show_resolved"}} + {{else}} + {{$.i18n.Tr "repo.issues.review.show_outdated"}} {{end}} </button> - <button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="hide ui compact right labeled button hide-outdated"> + <button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}hide {{end}}ui compact right labeled button hide-outdated"> {{svg "octicon-fold"}} - {{if $invalid}} - {{$.i18n.Tr "repo.issues.review.hide_outdated"}} - {{else}} + {{if $resolved}} {{$.i18n.Tr "repo.issues.review.hide_resolved"}} + {{else}} + {{$.i18n.Tr "repo.issues.review.hide_outdated"}} {{end}} </button> {{end}} - <a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a> + <a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a> + {{if and $invalid (not $resolved)}} + <span class="tag"> + {{$.i18n.Tr "repo.issues.review.outdated"}} + </span> + {{end}} </div> {{$diff := (CommentMustAsDiff (index $comms 0))}} {{if $diff}} {{$file := (index $diff.Files 0)}} - <div id="code-preview-{{(index $comms 0).ID}}" class="ui table segment{{if or $invalid $resolved}} hide{{end}}"> + <div id="code-preview-{{(index $comms 0).ID}}" class="ui table segment{{if $resolved}} hide{{end}}"> <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}"> <div class="file-body file-code code-view code-diff code-diff-unified"> <table> @@ -475,7 +480,7 @@ </div> </div> {{end}} - <div id="code-comments-{{(index $comms 0).ID}}" class="ui segment{{if or $invalid $resolved}} hide{{end}}"> + <div id="code-comments-{{(index $comms 0).ID}}" class="ui segment{{if $resolved}} hide{{end}}"> <div class="ui comments"> {{range $comms}} {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }} |