summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2021-05-07 19:59:01 +0800
committerGitHub <noreply@github.com>2021-05-07 13:59:01 +0200
commitc25813182c7b98f0fce32d6b955a6629c805fea5 (patch)
tree5d04914671224bb957204bb26b45b946f53a383c /templates
parentbdc169772980285a89480a93c78731b6f45ee2ff (diff)
downloadgitea-c25813182c7b98f0fce32d6b955a6629c805fea5.tar.gz
gitea-c25813182c7b98f0fce32d6b955a6629c805fea5.zip
not show `ref-in-new-issue` pop when issue was disabled (#15761)
fix #15718 Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/view_file.tmpl16
1 files changed, 9 insertions, 7 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 5798ec875c..b42283e23e 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -111,15 +111,17 @@
{{end}}
</tbody>
</table>
- <div class="code-view-menu-list ui fluid popup transition hidden">
- <div class="ui column relaxed equal height">
- <div class="column">
- <div class="ui link list">
- <a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{URLJoin AppUrl .RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.issues.context.reference_issue"}}</a>
+ {{if $.Permission.CanRead $.UnitTypeIssues}}
+ <div class="code-view-menu-list ui fluid popup transition hidden">
+ <div class="ui column relaxed equal height">
+ <div class="column">
+ <div class="ui link list">
+ <a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{URLJoin AppUrl .RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.issues.context.reference_issue"}}</a>
+ </div>
+ </div>
</div>
</div>
- </div>
- </div>
+ {{end}}
{{end}}
{{end}}
</div>