mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 15:53:07 -05:00
fix click create pull request button 404 (#2859)
This commit is contained in:
parent
80a4643359
commit
ff9daa3e9b
2 changed files with 2 additions and 1 deletions
|
@ -424,6 +424,7 @@ func RepoAssignment() macaron.Handler {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ctx.Data["IsForkedRepo"] = repo.IsFork
|
||||||
|
|
||||||
// People who have push access or have forked repository can propose a new pull request.
|
// People who have push access or have forked repository can propose a new pull request.
|
||||||
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
|
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
|
||||||
|
|
|
@ -27,7 +27,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}}...{{if .SignedUser.HasForkedRepo .BaseRepo.ID }}{{.SignedUser.Name}}:{{end}}{{.BranchName}}">
|
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .IsForkedRepo}}{{.Repository.Owner.Name}}:{{else}}{{if .SignedUser.HasForkedRepo .BaseRepo.ID}}{{.SignedUser.Name}}:{{end}}{{end}}{{.BranchName}}">
|
||||||
<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
|
<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue