mirror of
https://github.com/go-gitea/gitea
synced 2024-11-16 23:24:25 +00: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
16 lines
688 B
Cheetah
16 lines
688 B
Cheetah
{{range $key, $value := .Reactions}}
|
|
<a class="ui label basic{{if $value.HasUser $.ctx.SignedUserID}} blue{{end}}{{if not $.ctx.IsSigned}} disabled{{end}} has-emoji" data-title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ $.ctx.i18n.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}" data-content="{{ $key }}" data-action-url="{{ $.ActionURL }}">
|
|
{{if eq $key "hooray"}}
|
|
:tada:
|
|
{{else if eq $key "laugh"}}
|
|
:laughing:
|
|
{{else}}
|
|
:{{$key}}:
|
|
{{end}}
|
|
{{len $value}}
|
|
</a>
|
|
{{end}}
|
|
{{if $.AllowedReactions}}
|
|
{{template "repo/issue/view_content/add_reaction" Dict "ctx" $.ctx "ActionURL" .ActionURL "AllowedReactions" $.AllowedReactions}}
|
|
{{end}}
|