summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2021-01-23 04:58:22 +0100
committerGitHub <noreply@github.com>2021-01-23 11:58:22 +0800
commit91e59a66904a54c2b7fb6174c5c5aef4a89f1f39 (patch)
treecd971254c6a3aed7d2681c325e88a29f74e9652e /templates/repo
parent6764e8f7b8d53e377d50766f051dc77fb5cb9f5d (diff)
downloadgitea-91e59a66904a54c2b7fb6174c5c5aef4a89f1f39.tar.gz
gitea-91e59a66904a54c2b7fb6174c5c5aef4a89f1f39.zip
Don't show "Reference in new issue" when issues unit is globally disabled (#14437)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/view_content/context_menu.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/context_menu.tmpl b/templates/repo/issue/view_content/context_menu.tmpl
index f5a965b8a9..bbffd53460 100644
--- a/templates/repo/issue/view_content/context_menu.tmpl
+++ b/templates/repo/issue/view_content/context_menu.tmpl
@@ -12,7 +12,9 @@
{{ end }}
<div class="item context clipboard" data-clipboard-text="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}</div>
<div class="item context quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.ID}}">{{.ctx.i18n.Tr "repo.issues.context.quote_reply"}}</div>
- <div class="item context reference-issue" data-target="{{.item.ID}}" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-reference="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}</div>
+ {{if not .ctx.UnitIssuesGlobalDisabled}}
+ <div class="item context reference-issue" data-target="{{.item.ID}}" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-reference="{{$referenceUrl}}">{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}</div>
+ {{end}}
{{if or .ctx.Permission.IsAdmin .IsCommentPoster .ctx.HasIssuesOrPullsWritePermission}}
<div class="divider"></div>
<div class="item context edit-content">{{.ctx.i18n.Tr "repo.issues.context.edit"}}</div>