|
441 | 441 | {{$resolveDoer := (index $comms 0).ResolveDoer}} |
442 | 442 | {{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}} |
443 | 443 | {{if or $invalid $resolved}} |
444 | | - <button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="ui compact right labeled button show-outdated"> |
| 444 | + <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"> |
445 | 445 | {{svg "octicon-unfold"}} |
446 | | - {{if $invalid }} |
447 | | - {{$.i18n.Tr "repo.issues.review.show_outdated"}} |
448 | | - {{else}} |
| 446 | + {{if $resolved}} |
449 | 447 | {{$.i18n.Tr "repo.issues.review.show_resolved"}} |
| 448 | + {{else}} |
| 449 | + {{$.i18n.Tr "repo.issues.review.show_outdated"}} |
450 | 450 | {{end}} |
451 | 451 | </button> |
452 | | - <button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="hide ui compact right labeled button hide-outdated"> |
| 452 | + <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"> |
453 | 453 | {{svg "octicon-fold"}} |
454 | | - {{if $invalid}} |
455 | | - {{$.i18n.Tr "repo.issues.review.hide_outdated"}} |
456 | | - {{else}} |
| 454 | + {{if $resolved}} |
457 | 455 | {{$.i18n.Tr "repo.issues.review.hide_resolved"}} |
| 456 | + {{else}} |
| 457 | + {{$.i18n.Tr "repo.issues.review.hide_outdated"}} |
458 | 458 | {{end}} |
459 | 459 | </button> |
460 | 460 | {{end}} |
461 | | - <a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a> |
| 461 | + <a href="{{(index $comms 0).CodeCommentURL}}" class="file-comment">{{$filename}}</a> |
| 462 | + {{if and $invalid (not $resolved)}} |
| 463 | + <span class="tag"> |
| 464 | + {{$.i18n.Tr "repo.issues.review.outdated"}} |
| 465 | + </span> |
| 466 | + {{end}} |
462 | 467 | </div> |
463 | 468 | {{$diff := (CommentMustAsDiff (index $comms 0))}} |
464 | 469 | {{if $diff}} |
465 | 470 | {{$file := (index $diff.Files 0)}} |
466 | | - <div id="code-preview-{{(index $comms 0).ID}}" class="ui table segment{{if or $invalid $resolved}} hide{{end}}"> |
| 471 | + <div id="code-preview-{{(index $comms 0).ID}}" class="ui table segment{{if $resolved}} hide{{end}}"> |
467 | 472 | <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}}"> |
468 | 473 | <div class="file-body file-code code-view code-diff code-diff-unified"> |
469 | 474 | <table> |
|
475 | 480 | </div> |
476 | 481 | </div> |
477 | 482 | {{end}} |
478 | | - <div id="code-comments-{{(index $comms 0).ID}}" class="ui segment{{if or $invalid $resolved}} hide{{end}}"> |
| 483 | + <div id="code-comments-{{(index $comms 0).ID}}" class="ui segment{{if $resolved}} hide{{end}}"> |
479 | 484 | <div class="ui comments"> |
480 | 485 | {{range $comms}} |
481 | 486 | {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }} |
|
0 commit comments