summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-12-05 23:04:02 +0800
committerGitHub <noreply@github.com>2021-12-05 17:04:02 +0200
commitb4a32afec1fa1989b0060ae31347e583cfb51c13 (patch)
tree2b7f43e1919dd71be5f6f3037c0011afab68a114 /templates/repo/issue/view_content
parent98d903a3c6060dd52e9301b3b965cb761cfd0789 (diff)
downloadgitea-b4a32afec1fa1989b0060ae31347e583cfb51c13.tar.gz
gitea-b4a32afec1fa1989b0060ae31347e583cfb51c13.zip
Display issue/comment role even if repo archived (#17907)
Diffstat (limited to 'templates/repo/issue/view_content')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl36
1 files changed, 19 insertions, 17 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 77925d8e29..c229028540 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -43,22 +43,22 @@
{{end}}
</div>
<div class="comment-header-right actions df ac">
+ {{if (.ShowRole.HasRole "Poster")}}
+ <div class="ui basic label">
+ {{$.i18n.Tr "repo.issues.poster"}}
+ </div>
+ {{end}}
+ {{if (.ShowRole.HasRole "Writer")}}
+ <div class="ui basic label">
+ {{$.i18n.Tr "repo.issues.collaborator"}}
+ </div>
+ {{end}}
+ {{if (.ShowRole.HasRole "Owner")}}
+ <div class="ui basic label">
+ {{$.i18n.Tr "repo.issues.owner"}}
+ </div>
+ {{end}}
{{if not $.Repository.IsArchived}}
- {{if (.ShowRole.HasRole "Poster")}}
- <div class="ui basic label">
- {{$.i18n.Tr "repo.issues.poster"}}
- </div>
- {{end}}
- {{if (.ShowRole.HasRole "Writer")}}
- <div class="ui basic label">
- {{$.i18n.Tr "repo.issues.collaborator"}}
- </div>
- {{end}}
- {{if (.ShowRole.HasRole "Owner")}}
- <div class="ui basic label">
- {{$.i18n.Tr "repo.issues.owner"}}
- </div>
- {{end}}
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
{{end}}
@@ -565,8 +565,10 @@
{{$.i18n.Tr "repo.issues.owner"}}
</div>
{{end}}
- {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
- {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+ {{if not $.Repository.IsArchived}}
+ {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
+ {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
+ {{end}}
</div>
</div>
<div class="text comment-content">