mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-16 02:18:22 -07:00
minor fix for #1961
This commit is contained in:
parent
29ed7872f8
commit
d370effca5
@ -494,6 +494,7 @@ func ViewIssue(ctx *middleware.Context) {
|
|||||||
|
|
||||||
ctx.Data["PageIsPullList"] = true
|
ctx.Data["PageIsPullList"] = true
|
||||||
ctx.Data["PageIsPullConversation"] = true
|
ctx.Data["PageIsPullConversation"] = true
|
||||||
|
ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)
|
||||||
} else {
|
} else {
|
||||||
ctx.Data["PageIsIssueList"] = true
|
ctx.Data["PageIsIssueList"] = true
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
{{template "repo/issue/navbar" .}}
|
{{template "repo/issue/navbar" .}}
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
<a class="ui green button" href="{{$.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
|
{{if .PageIsIssueList}}
|
||||||
|
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
|
||||||
|
{{else}}
|
||||||
|
<a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user