summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-12-12 21:06:25 -0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-12-13 13:06:25 +0800
commit0b77dbc11c6e8fbda79766dd578d2e1735228c4d (patch)
tree050ef222bee2c78b6d714e6466f4ad11616ead67 /templates/repo
parente693fda325b1a7639ffb18d41f38a9b7ee2d03f9 (diff)
downloadgitea-0b77dbc11c6e8fbda79766dd578d2e1735228c4d.tar.gz
gitea-0b77dbc11c6e8fbda79766dd578d2e1735228c4d.zip
Fix new pull request link (#3133)
* Fix new pull request link * Only show button for branches
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/home.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 0db8f37320..4799e84a21 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -25,9 +25,9 @@
</div>
{{template "repo/sub_menu" .}}
<div class="ui secondary menu">
- {{if .PullRequestCtx.Allowed}}
+ {{if and .PullRequestCtx.Allowed .IsViewBranch}}
<div class="fitted item">
- <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .IsForkedRepo}}{{.Repository.Owner.Name}}:{{else}}{{if .SignedUser.HasForkedRepo .BaseRepo.ID}}{{.SignedUser.Name}}:{{end}}{{end}}{{.BranchName}}">
+ <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.Repository.Owner.Name}}:{{.BranchName}}">
<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
</a>
</div>