|
50 | 50 | {{end}}
|
51 | 51 | </div>
|
52 | 52 | <div class="comment-header-right actions gt-df gt-ac">
|
53 |
| - {{if (.ShowRole.HasRole "Poster")}} |
54 |
| - <div class="ui basic label"> |
55 |
| - {{$.locale.Tr "repo.issues.poster"}} |
56 |
| - </div> |
57 |
| - {{end}} |
58 |
| - {{if (.ShowRole.HasRole "Writer")}} |
59 |
| - <div class="ui basic label"> |
60 |
| - {{$.locale.Tr "repo.issues.collaborator"}} |
61 |
| - </div> |
62 |
| - {{end}} |
63 |
| - {{if (.ShowRole.HasRole "Owner")}} |
64 |
| - <div class="ui basic label"> |
65 |
| - {{$.locale.Tr "repo.issues.owner"}} |
66 |
| - </div> |
67 |
| - {{end}} |
| 53 | + {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} |
68 | 54 | {{if not $.Repository.IsArchived}}
|
69 | 55 | {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
70 | 56 | {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
|
442 | 428 | </span>
|
443 | 429 | </div>
|
444 | 430 | <div class="comment-header-right actions gt-df gt-ac">
|
445 |
| - {{if (.ShowRole.HasRole "Poster")}} |
446 |
| - <div class="ui basic label"> |
447 |
| - {{$.locale.Tr "repo.issues.poster"}} |
448 |
| - </div> |
449 |
| - {{end}} |
450 |
| - {{if (.ShowRole.HasRole "Writer")}} |
451 |
| - <div class="ui basic label"> |
452 |
| - {{$.locale.Tr "repo.issues.collaborator"}} |
453 |
| - </div> |
454 |
| - {{end}} |
455 |
| - {{if (.ShowRole.HasRole "Owner")}} |
456 |
| - <div class="ui basic label"> |
457 |
| - {{$.locale.Tr "repo.issues.owner"}} |
458 |
| - </div> |
459 |
| - {{end}} |
460 |
| - {{if not $.Repository.IsArchived}} |
461 |
| - {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} |
462 |
| - {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} |
463 |
| - {{end}} |
| 431 | + {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} |
| 432 | + {{if not $.Repository.IsArchived}} |
| 433 | + {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} |
| 434 | + {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" false "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} |
| 435 | + {{end}} |
464 | 436 | </div>
|
465 | 437 | </div>
|
466 | 438 | <div class="ui attached segment comment-body">
|
|
567 | 539 | </span>
|
568 | 540 | </div>
|
569 | 541 | <div class="comment-header-right actions gt-df gt-ac">
|
570 |
| - {{if (.ShowRole.HasRole "Poster")}} |
571 |
| - <div class="ui basic label"> |
572 |
| - {{$.locale.Tr "repo.issues.poster"}} |
573 |
| - </div> |
574 |
| - {{end}} |
575 |
| - {{if (.ShowRole.HasRole "Writer")}} |
576 |
| - <div class="ui basic label"> |
577 |
| - {{$.locale.Tr "repo.issues.collaborator"}} |
578 |
| - </div> |
579 |
| - {{end}} |
580 |
| - {{if (.ShowRole.HasRole "Owner")}} |
581 |
| - <div class="ui basic label"> |
582 |
| - {{$.locale.Tr "repo.issues.owner"}} |
583 |
| - </div> |
584 |
| - {{end}} |
| 542 | + {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} |
585 | 543 | {{if not $.Repository.IsArchived}}
|
586 | 544 | {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
587 | 545 | {{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
|
0 commit comments