aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-01-30 00:49:07 +0100
committertechknowlogick <matti@mdranta.net>2019-01-29 18:49:07 -0500
commit16678f5255ff0f2a1d9c37de6f382db898f16cbe (patch)
tree1cf9b2fa0a42f8ab156c962447618caba70f4bda /templates
parentc62c0b669abd44a51197f3d1b2489447ac4c5c9e (diff)
downloadgitea-16678f5255ff0f2a1d9c37de6f382db898f16cbe.tar.gz
gitea-16678f5255ff0f2a1d9c37de6f382db898f16cbe.zip
fix compare button on upstream repo leading to 404 (#5877)
Diffstat (limited to 'templates')
-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 13101827ec..735f6c00b9 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -59,8 +59,8 @@
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
{{if and .PullRequestCtx.Allowed .IsViewBranch}}
<div class="fitted item">
- <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{.Repository.Owner.Name}}:{{.BranchName | EscapePound}}">
- <button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
+ <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{ if .Repository.IsFork }}{{.Repository.Owner.Name}}{{ else }}{{ .SignedUserName }}{{ end }}:{{.BranchName | EscapePound}}">
+ <button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
</a>
</div>
{{end}}