diff options
author | yp05327 <576951401@qq.com> | 2023-08-24 14:06:17 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 13:06:17 +0800 |
commit | d2e4039def61d9cc9952be462216001125327270 (patch) | |
tree | 45f12e0c48fb603f868a80296e07670bcc35dce4 /templates/repo/issue | |
parent | 0d55f64e6cd3de2e1e5c0ee795605823efb14231 (diff) | |
download | gitea-d2e4039def61d9cc9952be462216001125327270.tar.gz gitea-d2e4039def61d9cc9952be462216001125327270.zip |
Add `member`, `collaborator`, `contributor`, and `first-time contributor` roles and tooltips (#26658)
GitHub like role descriptor
![image](https://github.com/go-gitea/gitea/assets/18380374/ceaed92c-6749-47b3-89e8-0e0e7ae65321)
![image](https://github.com/go-gitea/gitea/assets/18380374/8193ec34-cbf0-47f9-b0de-10dbddd66970)
![image](https://github.com/go-gitea/gitea/assets/18380374/56c7ed85-6177-425e-9f2f-926e99770782)
---------
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/view_content/show_role.tmpl | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/templates/repo/issue/view_content/show_role.tmpl b/templates/repo/issue/view_content/show_role.tmpl index f85f43bd66..40c8b67fa9 100644 --- a/templates/repo/issue/view_content/show_role.tmpl +++ b/templates/repo/issue/view_content/show_role.tmpl @@ -1,15 +1,10 @@ -{{if and (.ShowRole.HasRole "Poster") (not .IgnorePoster)}} - <div class="ui basic label role-label"> - {{ctx.Locale.Tr "repo.issues.poster"}} +{{if and .ShowRole.IsPoster (not .IgnorePoster)}} + <div class="ui basic label role-label" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.author_helper"}}"> + {{ctx.Locale.Tr "repo.issues.author"}} </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"}} +{{if .ShowRole.RoleInRepo}} + <div class="ui basic label role-label" data-tooltip-content="{{.ShowRole.RoleInRepo.LocaleHelper ctx.Locale}}"> + {{.ShowRole.RoleInRepo.LocaleString ctx.Locale}} </div> {{end}} |