|
1 | 1 | {{$resolved := (index .comments 0).IsResolved}}
|
| 2 | +{{$invalid := (index .comments 0).Invalidated}} |
2 | 3 | {{$resolveDoer := (index .comments 0).ResolveDoer}}
|
3 | 4 | {{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}}
|
| 5 | +{{$referenceUrl := printf "%s#%s" $.Issue.Link (index .comments 0).HashTag}} |
4 | 6 | <div class="conversation-holder" data-path="{{(index .comments 0).TreePath}}" data-side="{{if lt (index .comments 0).Line 0}}left{{else}}right{{end}}" data-idx="{{(index .comments 0).UnsignedLine}}">
|
5 |
| - {{if $resolved}} |
| 7 | + {{if or $invalid $resolved}} |
6 | 8 | <div class="ui attached header resolved-placeholder gt-df gt-ac gt-sb">
|
7 | 9 | <div class="ui grey text">
|
8 |
| - {{svg "octicon-check" 16 "icon gt-mr-2"}} |
9 |
| - <b>{{$resolveDoer.Name}}</b> {{$.locale.Tr "repo.issues.review.resolved_by"}} |
| 10 | + {{if $resolved}} |
| 11 | + {{svg "octicon-check" 16 "icon gt-mr-2"}} |
| 12 | + <b>{{$resolveDoer.Name}}</b> {{$.locale.Tr "repo.issues.review.resolved_by"}} |
| 13 | + {{end}} |
| 14 | + {{if $invalid}} |
| 15 | + {{if $resolved}} |
| 16 | + | |
| 17 | + {{else}} |
| 18 | + {{svg "octicon-alert-fill" 16 "icon gt-mr-2"}} |
| 19 | + {{end}} |
| 20 | + {{$.locale.Tr "repo.issues.review.comment_points_to_modified_line"}} <a href="{{AppSubUrl}}{{$referenceUrl}}">{{$.locale.Tr "repo.issues.review.show_original_comment"}}</a> |
| 21 | + {{end}} |
10 | 22 | </div>
|
11 | 23 | <div>
|
12 |
| - <button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny labeled button show-outdated gt-df gt-ac"> |
| 24 | + <button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui tiny labeled button show-outdated gt-df gt-ac"> |
13 | 25 | {{svg "octicon-unfold" 16 "gt-mr-3"}}
|
14 |
| - {{$.locale.Tr "repo.issues.review.show_resolved"}} |
| 26 | + {{if $resolved}} |
| 27 | + {{$.locale.Tr "repo.issues.review.show_resolved"}} |
| 28 | + {{else}} |
| 29 | + {{$.locale.Tr "repo.issues.review.show_outdated"}} |
| 30 | + {{end}} |
15 | 31 | </button>
|
16 |
| - <button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny labeled button hide-outdated gt-df gt-ac gt-hidden"> |
| 32 | + <button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="{{if $resolved}}gt-hidden {{end}}ui tiny labeled button hide-outdated gt-df gt-ac"> |
17 | 33 | {{svg "octicon-fold" 16 "gt-mr-3"}}
|
18 |
| - {{$.locale.Tr "repo.issues.review.hide_resolved"}} |
| 34 | + {{if $resolved}} |
| 35 | + {{$.locale.Tr "repo.issues.review.hide_resolved"}} |
| 36 | + {{else}} |
| 37 | + {{$.locale.Tr "repo.issues.review.hide_outdated"}} |
| 38 | + {{end}} |
19 | 39 | </button>
|
20 | 40 | </div>
|
21 | 41 | </div>
|
|
0 commit comments