summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBenno <blueworrybear@gmail.com>2019-10-30 13:58:18 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2019-10-30 13:58:18 +0800
commite6706df49ddc4ad7e02901c054b2f344894d7193 (patch)
tree90aaa1d46a9818c0611c885d65cedf23be9074f8 /templates
parent7bb817e6d19f21ccb16c6ba1eecd0e89fd052322 (diff)
downloadgitea-e6706df49ddc4ad7e02901c054b2f344894d7193.tar.gz
gitea-e6706df49ddc4ad7e02901c054b2f344894d7193.zip
Create PR on Current Repository by Default (#8670)
* 'update' * Send push tag event when release created * send tag create event while release created in UI * update to go v1.13 * fix gofmt error * fix #8576 create pull request on current repository by default
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/compare.tmpl7
-rw-r--r--templates/repo/issue/list.tmpl2
2 files changed, 7 insertions, 2 deletions
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl
index 1c8942d42f..50a51c44ac 100644
--- a/templates/repo/diff/compare.tmpl
+++ b/templates/repo/diff/compare.tmpl
@@ -28,6 +28,11 @@
{{range .Branches}}
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{EscapePound .}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound $.HeadBranch}}">{{$.BaseName}}:{{.}}</div>
{{end}}
+ {{if .Repository.IsFork}}
+ {{range .BaseRepoBranches}}
+ <div class="item" data-url="{{$.PullRequestCtx.BaseRepo.Link}}/compare/{{EscapePound .}}...{{$.HeadUser.Name}}:{{EscapePound $.HeadBranch}}">{{$.PullRequestCtx.BaseRepo.OwnerName}}:{{.}}</div>
+ {{end}}
+ {{end}}
</div>
</div>
</div>
@@ -54,7 +59,7 @@
{{if .IsNothingToCompare}}
<div class="ui segment">{{.i18n.Tr "repo.pulls.nothing_to_compare"}}</div>
- {{else if .PageIsComparePull}}
+ {{else if .PageIsComparePull}}
{{if .HasPullRequest}}
<div class="ui segment">
{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 9b354a6800..d68e6dac26 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -14,7 +14,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 .PullRequestCtx.Allowed}}disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | EscapePound}}{{end}}">{{.i18n.Tr "repo.pulls.new"}}</a>
+ <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | EscapePound}}{{end}}">{{.i18n.Tr "repo.pulls.new"}}</a>
{{end}}
</div>
{{else}}