summaryrefslogtreecommitdiffstats
path: root/templates/repo/branch
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2019-07-12 04:35:07 +0000
committerLunny Xiao <xiaolunwen@gmail.com>2019-07-12 12:35:07 +0800
commit2477737fff9d04f6014039c95240b111f75e17e8 (patch)
tree13026f94c07e306ff62606213c4d989ac3710a7c /templates/repo/branch
parenta360daeff98c9144ac0468e4588b3c67427a7e6a (diff)
downloadgitea-2477737fff9d04f6014039c95240b111f75e17e8.tar.gz
gitea-2477737fff9d04f6014039c95240b111f75e17e8.zip
Only show "New Pull Request" button if repo allows pulls (#7426) (#7432)
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'templates/repo/branch')
-rw-r--r--templates/repo/branch/list.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index a2fb5c2069..2028797bdb 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -63,7 +63,7 @@
</td>
<td class="right aligned">
{{if not .LatestPullRequest}}
- {{if not .IsDeleted}}
+ {{if and (not .IsDeleted) $.AllowsPulls}}
<a href="{{$.RepoLink}}/compare/{{$.DefaultBranch | EscapePound}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | EscapePound}}">
<button id="new-pull-request" class="ui compact basic button">{{$.i18n.Tr "repo.pulls.compare_changes"}}</button>
</a>