aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2019-07-11 20:21:16 +0000
committertechknowlogick <techknowlogick@gitea.io>2019-07-11 16:21:16 -0400
commit072bdfa3f50591863d523202e6d8a0fac0ca7ea7 (patch)
tree8758acbf265b47e1f4df8690c61cd8a9f2878e0e /templates
parenta7b1ba0e3d49e699ce7d6e614bc8605aef0a2c9a (diff)
downloadgitea-072bdfa3f50591863d523202e6d8a0fac0ca7ea7.tar.gz
gitea-072bdfa3f50591863d523202e6d8a0fac0ca7ea7.zip
Only show "New Pull Request" button if repo allows pulls (#7426)
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'templates')
-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>