mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
* Make compare button URL aware if current repo is a fork (#2162) * Optimize code * To not change current behaviour check if signed in user has fork of base repository * Fix to check only if signed user has forked repo otherwise it will still redirect to wrong page
This commit is contained in:
parent
98c5a1e006
commit
32f289ae3b
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@
|
||||||
<div class="ui secondary menu">
|
<div class="ui secondary menu">
|
||||||
{{if .PullRequestCtx.Allowed}}
|
{{if .PullRequestCtx.Allowed}}
|
||||||
<div class="fitted item">
|
<div class="fitted item">
|
||||||
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.SignedUser.Name}}:{{.BranchName}}">
|
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .SignedUser.HasForkedRepo .BaseRepo.ID }}{{.SignedUser.Name}}:{{end}}{{.BranchName}}">
|
||||||
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
|
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue