2024-04-14 05:58:48 -06:00
|
|
|
<div class="bottom-reactions" data-action-url="{{$.ActionURL}}">
|
2017-12-03 16:14:26 -07:00
|
|
|
{{range $key, $value := .Reactions}}
|
2024-04-14 05:58:48 -06:00
|
|
|
{{$hasReacted := $value.HasUser ctx.RootData.SignedUserID}}
|
|
|
|
<a role="button" class="ui label basic{{if $hasReacted}} primary{{end}}{{if not ctx.RootData.IsSigned}} disabled{{end}} comment-reaction-button"
|
2024-01-14 18:42:59 -07: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-27 19:34:18 -06:00
|
|
|
data-tooltip-placement="bottom-start"
|
|
|
|
data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
|
2020-04-28 12:05:39 -06:00
|
|
|
<span class="reaction">{{ReactionToEmoji $key}}</span>
|
|
|
|
<span class="reaction-count">{{len $value}}</span>
|
2017-12-03 16:14:26 -07:00
|
|
|
</a>
|
|
|
|
{{end}}
|
2019-12-27 16:43:56 -07:00
|
|
|
{{if AllowedReactions}}
|
2024-04-14 05:58:48 -06:00
|
|
|
{{template "repo/issue/view_content/add_reaction" dict "ActionURL" .ActionURL}}
|
2019-12-01 15:57:24 -07:00
|
|
|
{{end}}
|
2023-05-27 19:34:18 -06:00
|
|
|
</div>
|