|
|
@ -459,35 +459,39 @@ |
|
|
|
{{ range $filename, $lines := .Review.CodeComments}} |
|
|
|
{{ range $filename, $lines := .Review.CodeComments}} |
|
|
|
{{range $line, $comms := $lines}} |
|
|
|
{{range $line, $comms := $lines}} |
|
|
|
<div class="ui segments"> |
|
|
|
<div class="ui segments"> |
|
|
|
<div class="ui segment py-3"> |
|
|
|
<div class="ui segment py-3 df ac sb"> |
|
|
|
{{$invalid := (index $comms 0).Invalidated}} |
|
|
|
{{$invalid := (index $comms 0).Invalidated}} |
|
|
|
{{$resolved := (index $comms 0).IsResolved}} |
|
|
|
{{$resolved := (index $comms 0).IsResolved}} |
|
|
|
{{$resolveDoer := (index $comms 0).ResolveDoer}} |
|
|
|
{{$resolveDoer := (index $comms 0).ResolveDoer}} |
|
|
|
{{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}} |
|
|
|
{{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}} |
|
|
|
{{if or $invalid $resolved}} |
|
|
|
<div class="df ac"> |
|
|
|
<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"> |
|
|
|
<a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment ml-3">{{$filename}}</a> |
|
|
|
{{svg "octicon-unfold"}} |
|
|
|
{{if $invalid }} |
|
|
|
{{if $resolved}} |
|
|
|
<span class="ui label basic small ml-3"> |
|
|
|
{{$.i18n.Tr "repo.issues.review.show_resolved"}} |
|
|
|
{{$.i18n.Tr "repo.issues.review.outdated"}} |
|
|
|
{{else}} |
|
|
|
</span> |
|
|
|
{{$.i18n.Tr "repo.issues.review.show_outdated"}} |
|
|
|
|
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<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"> |
|
|
|
<div> |
|
|
|
{{svg "octicon-fold"}} |
|
|
|
{{if or $invalid $resolved}} |
|
|
|
{{if $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"> |
|
|
|
{{$.i18n.Tr "repo.issues.review.hide_resolved"}} |
|
|
|
{{svg "octicon-unfold" 16 "mr-3"}} |
|
|
|
{{else}} |
|
|
|
{{if $resolved}} |
|
|
|
{{$.i18n.Tr "repo.issues.review.hide_outdated"}} |
|
|
|
{{$.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}} |
|
|
|
{{end}} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
{{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))}} |
|
|
|
{{$diff := (CommentMustAsDiff (index $comms 0))}} |
|
|
|
{{if $diff}} |
|
|
|
{{if $diff}} |
|
|
|