summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content/reactions.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/issue/view_content/reactions.tmpl')
-rw-r--r--templates/repo/issue/view_content/reactions.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/reactions.tmpl b/templates/repo/issue/view_content/reactions.tmpl
new file mode 100644
index 0000000..da63196
--- /dev/null
+++ b/templates/repo/issue/view_content/reactions.tmpl
@@ -0,0 +1,17 @@
+<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
+ 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}}"
+ 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>