mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 17:49:20 +08:00
597b04fe2f
Backport #27231 #27259 manually --------- Co-authored-by: delvh <dev.lh@web.de>
16 lines
849 B
Handlebars
16 lines
849 B
Handlebars
<div class="ui attached segment reactions" data-action-url="{{$.ActionURL}}">
|
|
{{range $key, $value := .Reactions}}
|
|
{{$hasReacted := $value.HasUser $.ctxData.SignedUserID}}
|
|
<a role="button" class="ui label basic{{if $hasReacted}} primary{{end}}{{if not $.ctxData.IsSigned}} disabled{{end}} comment-reaction-button"
|
|
data-tooltip-content="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
|
|
data-tooltip-placement="bottom-start"
|
|
data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
|
|
<span class="reaction">{{ReactionToEmoji $key}}</span>
|
|
<span class="reaction-count">{{len $value}}</span>
|
|
</a>
|
|
{{end}}
|
|
{{if AllowedReactions}}
|
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $.ctxData "ActionURL" .ActionURL}}
|
|
{{end}}
|
|
</div>
|