summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-06 23:57:46 -0500
committerUnknwon <u@gogs.io>2016-03-06 23:57:46 -0500
commit0e9bc2d4108ae32611e4fe65af493913c20d0279 (patch)
tree58addb3ebbc98174543f5fc44bd60599941e3dd1 /templates/repo/issue
parent0ea0c5ec4f24f0fc5ef3231085c74b33a16f98ec (diff)
downloadgitea-0e9bc2d4108ae32611e4fe65af493913c20d0279.tar.gz
gitea-0e9bc2d4108ae32611e4fe65af493913c20d0279.zip
Fix pull request availability check
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/list.tmpl2
-rw-r--r--templates/repo/issue/view.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index b4e79ee9c6..2e7de1f7ad 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -8,7 +8,7 @@
{{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 (or .CanPullRequest .HasForkedRepo)}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.Repository.DefaultBranch}}...{{if not (eq .Owner.Name .SignedUserName)}}{{.SignedUserName}}:{{end}}{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
+ <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.Repository.DefaultBranch}}...{{.PullRequestCtx.HeadInfo}}">{{.i18n.Tr "repo.pulls.new"}}</a>
{{end}}
</div>
</div>
diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl
index 4e2e69bbeb..c289dbcb7a 100644
--- a/templates/repo/issue/view.tmpl
+++ b/templates/repo/issue/view.tmpl
@@ -8,7 +8,7 @@
{{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>
+ <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.PullRequestCtx.HeadInfo}}">{{.i18n.Tr "repo.pulls.new"}}</a>
{{end}}
</div>
</div>