aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2019-12-28 00:43:56 +0100
committertechknowlogick <techknowlogick@gitea.io>2019-12-27 18:43:56 -0500
commit4ee97465e97ae6b9d3ac6ea57246f67715246afe (patch)
treee332e1e4c954536e393eb33eb85073f26687bd6b /templates
parente64880ef0767a6921498401e041bf9ad8dfa9a6f (diff)
downloadgitea-4ee97465e97ae6b9d3ac6ea57246f67715246afe.tar.gz
gitea-4ee97465e97ae6b9d3ac6ea57246f67715246afe.zip
[Fix] AllowedReaction code (#9518)
* optimize * CI.restart() Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/comments.tmpl2
-rw-r--r--templates/repo/issue/view_content.tmpl4
-rw-r--r--templates/repo/issue/view_content/add_reaction.tmpl2
-rw-r--r--templates/repo/issue/view_content/comments.tmpl4
-rw-r--r--templates/repo/issue/view_content/reactions.tmpl4
5 files changed, 8 insertions, 8 deletions
diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl
index 26029dbaa6..64080f990f 100644
--- a/templates/repo/diff/comments.tmpl
+++ b/templates/repo/diff/comments.tmpl
@@ -38,7 +38,7 @@
{{$reactions := .Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions">
- {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions "AllowedReactions" $.AllowedReactions }}
+ {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) "Reactions" $reactions}}
</div>
{{end}}
</div>
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 8490841f97..bee8a3dfe5 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -28,7 +28,7 @@
{{end}}
{{if not $.Repository.IsArchived}}
<div class="ui right actions">
- {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "AllowedReactions" $.AllowedReactions}}
+ {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" .Issue "delete" false "diff" false }}
</div>
{{end}}
@@ -47,7 +47,7 @@
{{$reactions := .Issue.Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions">
- {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions "AllowedReactions" $.AllowedReactions}}
+ {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
</div>
{{end}}
{{if .Issue.Attachments}}
diff --git a/templates/repo/issue/view_content/add_reaction.tmpl b/templates/repo/issue/view_content/add_reaction.tmpl
index 3bd64ff786..9e1dc3cc87 100644
--- a/templates/repo/issue/view_content/add_reaction.tmpl
+++ b/templates/repo/issue/view_content/add_reaction.tmpl
@@ -7,7 +7,7 @@
<div class="menu has-emoji">
<div class="header">{{ .ctx.i18n.Tr "repo.pick_reaction"}}</div>
<div class="divider"></div>
- {{range $value := .AllowedReactions}}
+ {{range $value := AllowedReactions}}
{{if eq $value "hooray"}}
<div class="item" data-content="hooray">:tada:</div>
{{else if eq $value "laugh"}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 170379bb7f..9a9bb6b8d4 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -37,7 +37,7 @@
{{end}}
</div>
{{end}}
- {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "AllowedReactions" $.AllowedReactions}}
+ {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
{{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "diff" false }}
</div>
{{end}}
@@ -56,7 +56,7 @@
{{$reactions := .Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions">
- {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions "AllowedReactions" $.AllowedReactions}}
+ {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
</div>
{{end}}
{{if .Attachments}}
diff --git a/templates/repo/issue/view_content/reactions.tmpl b/templates/repo/issue/view_content/reactions.tmpl
index 4837370d22..b2aa9339d1 100644
--- a/templates/repo/issue/view_content/reactions.tmpl
+++ b/templates/repo/issue/view_content/reactions.tmpl
@@ -10,6 +10,6 @@
{{len $value}}
</a>
{{end}}
-{{if $.AllowedReactions}}
- {{template "repo/issue/view_content/add_reaction" Dict "ctx" $.ctx "ActionURL" .ActionURL "AllowedReactions" $.AllowedReactions}}
+{{if AllowedReactions}}
+ {{template "repo/issue/view_content/add_reaction" Dict "ctx" $.ctx "ActionURL" .ActionURL}}
{{end}}