mirror of
https://github.com/go-gitea/gitea
synced 2025-08-06 09:38:21 +00:00
Refactor commentTags functionality (#17558)
* feat: Allow multiple tags on comments - Allow for multiples tags(Currently Poster + {Owner, Writer}). - Utilize the Poster tag within the commentTag function and remove the checking from templates. - Use bitwise on CommentTags to enable specific tags. - Don't show poster tag(view_content.tmpl) on the initial issue comment. * Change parameters naming * Change function name * refactor variable wording * Merge 'master' branch into 'tags-comments' branch * Change naming * `tag` -> `role` Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -49,14 +49,17 @@
|
||||
</div>
|
||||
<div class="comment-header-right actions df ac">
|
||||
{{if not $.Repository.IsArchived}}
|
||||
{{if gt .Issue.ShowTag 0}}
|
||||
<div class="ui basic label">
|
||||
{{if eq .Issue.ShowTag 2}}
|
||||
{{if gt .Issue.ShowRole 0}}
|
||||
{{if (.Issue.ShowRole.HasRole "Writer")}}
|
||||
<div class="ui basic label">
|
||||
{{$.i18n.Tr "repo.issues.collaborator"}}
|
||||
{{else if eq .Issue.ShowTag 3}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if (.Issue.ShowRole.HasRole "Owner")}}
|
||||
<div class="ui basic label">
|
||||
{{$.i18n.Tr "repo.issues.owner"}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
|
||||
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
|
||||
|
Reference in New Issue
Block a user