diff options
author | a1012112796 <1012112796@qq.com> | 2020-12-21 23:39:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 16:39:28 +0100 |
commit | 34df4e5df558e7ec648efe083696687be6f8c8a8 (patch) | |
tree | 883e619552a901b4a7437e8574e7307b47c1ac1d /templates | |
parent | 1b1adab26cbe86d77ee0e9a35b18d4765b371e26 (diff) | |
download | gitea-34df4e5df558e7ec648efe083696687be6f8c8a8.tar.gz gitea-34df4e5df558e7ec648efe083696687be6f8c8a8.zip |
Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198)
* Add mentionable teams to tributeValues
Signed-off-by: a1012112796 <1012112796@qq.com>
* Apply suggestions from code review
Co-authored-by: silverwind <me@silverwind.io>
* Change team mention rules to gh's style
* use org's avator as team avator in ui
Signed-off-by: a1012112796 <1012112796@qq.com>
* Update modules/markup/html.go
* Update models/issue.go
Co-authored-by: Lauris BH <lauris@nix.lv>
* Update models/issue.go
* fix a small nit and update test code
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head.tmpl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 7d35664c7b..51d60c46f8 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -44,7 +44,7 @@ EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}}, }, PageIsProjects: {{if .PageIsProjects }}true{{else}}false{{end}}, - {{if .RequireTribute}} + {{if .RequireTribute}} tributeValues: Array.from(new Map([ {{ range .Participants }} ['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', @@ -54,6 +54,10 @@ ['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}', name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}], {{ end }} + {{ range .MentionableTeams }} + ['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}', + name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvator}}'}], + {{ end }} ]).values()), {{end}} }; |