aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/pulls
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/pulls
parent0ea0c5ec4f24f0fc5ef3231085c74b33a16f98ec (diff)
downloadgitea-0e9bc2d4108ae32611e4fe65af493913c20d0279.tar.gz
gitea-0e9bc2d4108ae32611e4fe65af493913c20d0279.zip
Fix pull request availability check
Diffstat (limited to 'templates/repo/pulls')
-rw-r--r--templates/repo/pulls/commits.tmpl2
-rw-r--r--templates/repo/pulls/compare.tmpl4
-rw-r--r--templates/repo/pulls/files.tmpl2
3 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl
index 469499ae84..99bac62cfa 100644
--- a/templates/repo/pulls/commits.tmpl
+++ b/templates/repo/pulls/commits.tmpl
@@ -5,7 +5,7 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
<div class="ui right">
- <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>
</div>
</div>
<div class="ui divider"></div>
diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl
index 30a2fd5b69..0d7b6f9b55 100644
--- a/templates/repo/pulls/compare.tmpl
+++ b/templates/repo/pulls/compare.tmpl
@@ -21,7 +21,7 @@
</div>
<div class="scrolling menu">
{{range .Branches}}
- <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{if not $.IsBetweenBranches}}{{$.HeadUser.Name}}:{{end}}{{$.HeadBranch}}">{{.}}</div>
+ <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{$.HeadBranch}}">{{.}}</div>
{{end}}
</div>
</div>
@@ -39,7 +39,7 @@
</div>
<div class="scrolling menu">
{{range .HeadBranches}}
- <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{if not $.IsBetweenBranches}}{{$.HeadUser.Name}}:{{end}}{{.}}">{{.}}</div>
+ <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{.}}">{{.}}</div>
{{end}}
</div>
</div>
diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl
index 14ef29037b..19a75e0763 100644
--- a/templates/repo/pulls/files.tmpl
+++ b/templates/repo/pulls/files.tmpl
@@ -5,7 +5,7 @@
<div class="navbar">
{{template "repo/issue/navbar" .}}
<div class="ui right">
- <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>
</div>
</div>
<div class="ui divider"></div>