diff options
author | 6543 <6543@obermui.de> | 2019-12-01 23:57:24 +0100 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-12-01 17:57:24 -0500 |
commit | 668eaf95d581f68507523563d0701000a4505055 (patch) | |
tree | 4a0bf0aea58ca92f7fde2af0881dd518861512cd /templates/repo/issue/view_content/add_reaction.tmpl | |
parent | 674bc772fb213e2b79478438d16835d387865ac3 (diff) | |
download | gitea-668eaf95d581f68507523563d0701000a4505055.tar.gz gitea-668eaf95d581f68507523563d0701000a4505055.zip |
[Feature] Custom Reactions (#8886)
* add [ui] Reactions
* move contend check from form to go functions
* use else if
* check if reaction is allowed only on react
(so previous custom reaction can be still removed)
* use $.AllowedReactions in templates
* use ctx.Flash.Error
* use it there too
* add redirection
* back to server error
because a wrong reaction is a template issue ...
* add emoji list link
* add docs entry
* small wording nit
suggestions from @jolheiser - thx
* same reactions as github
* fix PR reactions
* handle error so template JS could check
* Add Integrations Test
* add REACTIONS setting to cheat-sheet doc page
Diffstat (limited to 'templates/repo/issue/view_content/add_reaction.tmpl')
-rw-r--r-- | templates/repo/issue/view_content/add_reaction.tmpl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl index 626db5c261..3bd64ff786 100644 --- a/templates/repo/issue/view_content/add_reaction.tmpl +++ b/templates/repo/issue/view_content/add_reaction.tmpl @@ -7,12 +7,15 @@ <div class="menu has-emoji"> <div class="header">{{ .ctx.i18n.Tr "repo.pick_reaction"}}</div> <div class="divider"></div> - <div class="item" data-content="+1">:+1:</div> - <div class="item" data-content="-1">:-1:</div> - <div class="item" data-content="laugh">:laughing:</div> - <div class="item" data-content="confused">:confused:</div> - <div class="item" data-content="heart">:heart:</div> - <div class="item" data-content="hooray">:tada:</div> + {{range $value := .AllowedReactions}} + {{if eq $value "hooray"}} + <div class="item" data-content="hooray">:tada:</div> + {{else if eq $value "laugh"}} + <div class="item" data-content="laugh">:laughing:</div> + {{else}} + <div class="item" data-content="{{$value}}">:{{$value}}:</div> + {{end}} + {{end}} </div> </div> {{end}} |