1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-31 06:38:37 +00:00

Improve show role (#26621)

Add a general show role template.
This commit is contained in:
yp05327
2023-08-22 14:30:33 +09:00
committed by GitHub
parent 7934602a4c
commit bd8a253220
3 changed files with 23 additions and 61 deletions

View File

@@ -0,0 +1,15 @@
{{if and (.ShowRole.HasRole "Poster") (not .IgnorePoster)}}
<div class="ui basic label role-label">
{{ctx.Locale.Tr "repo.issues.poster"}}
</div>
{{end}}
{{if (.ShowRole.HasRole "Writer")}}
<div class="ui basic label role-label">
{{ctx.Locale.Tr "repo.issues.collaborator"}}
</div>
{{end}}
{{if (.ShowRole.HasRole "Owner")}}
<div class="ui basic label role-label">
{{ctx.Locale.Tr "repo.issues.owner"}}
</div>
{{end}}