You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reactions.tmpl 978B

1234567891011121314151617
  1. <div class="bottom-reactions" data-action-url="{{$.ActionURL}}">
  2. {{range $key, $value := .Reactions}}
  3. {{$hasReacted := $value.HasUser ctx.RootData.SignedUserID}}
  4. <a role="button" class="ui label basic{{if $hasReacted}} primary{{end}}{{if not ctx.RootData.IsSigned}} disabled{{end}} comment-reaction-button"
  5. data-tooltip-content
  6. title="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
  7. aria-label="{{$value.GetFirstUsers}}{{if gt ($value.GetMoreUserCount) 0}} {{ctx.Locale.Tr "repo.reactions_more" $value.GetMoreUserCount}}{{end}}"
  8. data-tooltip-placement="bottom-start"
  9. data-reaction-content="{{$key}}" data-has-reacted="{{$hasReacted}}">
  10. <span class="reaction">{{ReactionToEmoji $key}}</span>
  11. <span class="reaction-count">{{len $value}}</span>
  12. </a>
  13. {{end}}
  14. {{if AllowedReactions}}
  15. {{template "repo/issue/view_content/add_reaction" dict "ActionURL" .ActionURL}}
  16. {{end}}
  17. </div>