forked from forgejo/forgejo
Fix generating compare link (#21519)
Fix #6318 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
da3b657c45
commit
16cbd5b59c
2 changed files with 14 additions and 1 deletions
|
@ -70,7 +70,7 @@
|
|||
<!-- If home page, show new PR. If not, show breadcrumb -->
|
||||
{{if eq $n 0}}
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
<a href="{{.BaseRepo.Link}}/compare/{{PathEscapeSegments .BaseRepo.DefaultBranch}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}{{if .BaseRepo.IsFork}}/{{PathEscape .Repository.Name}}{{end}}:{{end}}{{PathEscapeSegments .BranchName}}">
|
||||
<a href="{{CompareLink .BaseRepo .Repository .BranchName}}">
|
||||
<button id="new-pull-request" class="ui compact basic button tooltip" data-content="{{if .PullRequestCtx.Allowed}}{{.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{.locale.Tr "action.compare_branch"}}{{end}}"><span class="text">{{svg "octicon-git-pull-request"}}</span></button>
|
||||
</a>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue