From 91e59a66904a54c2b7fb6174c5c5aef4a89f1f39 Mon Sep 17 00:00:00 2001 From: Jimmy Praet Date: Sat, 23 Jan 2021 04:58:22 +0100 Subject: [PATCH] Don't show "Reference in new issue" when issues unit is globally disabled (#14437) Co-authored-by: Lunny Xiao --- templates/repo/issue/view_content/context_menu.tmpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }}
{{.ctx.i18n.Tr "repo.issues.context.copy_link"}}
{{.ctx.i18n.Tr "repo.issues.context.quote_reply"}}
-
{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}
+ {{if not .ctx.UnitIssuesGlobalDisabled}} +
{{.ctx.i18n.Tr "repo.issues.context.reference_issue"}}
+ {{end}} {{if or .ctx.Permission.IsAdmin .IsCommentPoster .ctx.HasIssuesOrPullsWritePermission}}
{{.ctx.i18n.Tr "repo.issues.context.edit"}}