Browse Source

minor fix for #1961

for-closed-social
Unknwon 9 years ago
parent
commit
d370effca5
2 changed files with 6 additions and 1 deletions
  1. +1
    -0
      routers/repo/issue.go
  2. +5
    -1
      templates/repo/issue/view.tmpl

+ 1
- 0
routers/repo/issue.go View File

@ -494,6 +494,7 @@ func ViewIssue(ctx *middleware.Context) {
ctx.Data["PageIsPullList"] = true
ctx.Data["PageIsPullConversation"] = true
ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)
} else {
ctx.Data["PageIsIssueList"] = true
}

+ 5
- 1
templates/repo/issue/view.tmpl View File

@ -5,7 +5,11 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
<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 class="ui divider"></div>

Loading…
Cancel
Save