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:
Gusted 2021-11-11 07:29:30 +01:00 committed by GitHub
parent a4dc0c5a82
commit 492e1c2fbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 112 additions and 75 deletions

View file

@ -71,7 +71,7 @@ type Issue struct {
IsLocked bool `xorm:"NOT NULL DEFAULT false"`
// For view issue page.
ShowTag CommentTag `xorm:"-"`
ShowRole RoleDescriptor `xorm:"-"`
}
var (