2023-05-28 10:34:18 +09:00
|
|
|
<div class="ui attached segment reactions" data-action-url="{{$.ActionURL}}">
|
2017-12-04 08:14:26 +09:00
|
|
|
{{range $key, $value := .Reactions}}
|
2023-05-28 10:34:18 +09:00
|
|
|
{{$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"
|
2024-01-15 10:42:59 +09:00
|
|
|
data-tooltip-content
|
|
|
|
title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
|
|
|
|
aria-label="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
|
2023-05-28 10:34:18 +09:00
|
|
|
data-tooltip-placement="bottom-start"
|
|
|
|
data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
|
2020-04-29 03:05:39 +09:00
|
|
|
<span class="reaction">{{ReactionToEmoji $key}}</span>
|
|
|
|
<span class="reaction-count">{{len $value}}</span>
|
2017-12-04 08:14:26 +09:00
|
|
|
</a>
|
|
|
|
{{end}}
|
2019-12-28 08:43:56 +09:00
|
|
|
{{if AllowedReactions}}
|
2023-04-07 23:39:08 +09:00
|
|
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $.ctxData "ActionURL" .ActionURL}}
|
2019-12-02 07:57:24 +09:00
|
|
|
{{end}}
|
2023-05-28 10:34:18 +09:00
|
|
|
</div>
|