mirror of
https://github.com/go-gitea/gitea
synced 2024-12-21 05:24:25 +01:00
668eaf95d5
* 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
21 lines
736 B
Cheetah
21 lines
736 B
Cheetah
{{if .ctx.IsSigned}}
|
|
<div class="item action ui pointing top right select-reaction dropdown" data-action-url="{{ .ActionURL }}">
|
|
<a class="add-reaction">
|
|
<i class="octicon octicon-plus-small" style="width: 10px"></i>
|
|
<i class="octicon octicon-smiley"></i>
|
|
</a>
|
|
<div class="menu has-emoji">
|
|
<div class="header">{{ .ctx.i18n.Tr "repo.pick_reaction"}}</div>
|
|
<div class="divider"></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}}
|