summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-04-01 00:19:53 +0200
committerGitHub <noreply@github.com>2021-03-31 18:19:53 -0400
commitaee5ef00519cd199992bb7dc02b4fa22a392869e (patch)
treed578e2b5735257bef4c40da37692b9c81ae331ec /templates/repo/issue
parent8d9f191195eaafd6b697683cd5f8c89c3f6e7cf6 (diff)
downloadgitea-aee5ef00519cd199992bb7dc02b4fa22a392869e.tar.gz
gitea-aee5ef00519cd199992bb7dc02b4fa22a392869e.zip
Diff box fixes (#15214)
- Fix misaligned "Show Outdated" buttons via flexbox - Add hover effect to "Show Outdated" buttons - Remove overreaching margin from selector .diff-file-box and handle cases individually. Fixes: https://github.com/go-gitea/gitea/issues/15097 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl50
1 files changed, 27 insertions, 23 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 0cae8bdf95..f84981c1c6 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -459,35 +459,39 @@
{{ range $filename, $lines := .Review.CodeComments}}
{{range $line, $comms := $lines}}
<div class="ui segments">
- <div class="ui segment py-3">
+ <div class="ui segment py-3 df ac sb">
{{$invalid := (index $comms 0).Invalidated}}
{{$resolved := (index $comms 0).IsResolved}}
{{$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="{{if not $resolved}}hide {{end}}ui compact right labeled button show-outdated">
- {{svg "octicon-unfold"}}
- {{if $resolved}}
- {{$.i18n.Tr "repo.issues.review.show_resolved"}}
- {{else}}
- {{$.i18n.Tr "repo.issues.review.show_outdated"}}
+ <div class="df ac">
+ <a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment ml-3">{{$filename}}</a>
+ {{if $invalid }}
+ <span class="ui label basic small ml-3">
+ {{$.i18n.Tr "repo.issues.review.outdated"}}
+ </span>
{{end}}
- </button>
- <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 $resolved}}
- {{$.i18n.Tr "repo.issues.review.hide_resolved"}}
- {{else}}
- {{$.i18n.Tr "repo.issues.review.hide_outdated"}}
+ </div>
+ <div>
+ {{if or $invalid $resolved}}
+ <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 df ac">
+ {{svg "octicon-unfold" 16 "mr-3"}}
+ {{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="{{if $resolved}}hide {{end}}ui compact right labeled button hide-outdated df ac">
+ {{svg "octicon-fold" 16 "mr-3"}}
+ {{if $resolved}}
+ {{$.i18n.Tr "repo.issues.review.hide_resolved"}}
+ {{else}}
+ {{$.i18n.Tr "repo.issues.review.hide_outdated"}}
+ {{end}}
+ </button>
{{end}}
- </button>
- {{end}}
- <a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a>
- {{if $invalid }}
- <span class="ui label basic small yellow">
- {{$.i18n.Tr "repo.issues.review.outdated"}}
- </span>
- {{end}}
+ </div>
</div>
{{$diff := (CommentMustAsDiff (index $comms 0))}}
{{if $diff}}