diff options
author | Unknwon <u@gogs.io> | 2016-03-04 15:43:01 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-04 15:43:01 -0500 |
commit | 2d2d85bba4dd5131e72db533c31aab423f86232e (patch) | |
tree | e53c3c263021efc846dee43249651142a49e76f3 /templates | |
parent | 9df6ce48c538e0458b6798f0819db8afce43e5c7 (diff) | |
download | gitea-2d2d85bba4dd5131e72db533c31aab423f86232e.tar.gz gitea-2d2d85bba4dd5131e72db533c31aab423f86232e.zip |
#1597 support pull requests in same repository
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/repo/home.tmpl | 3 | ||||
-rw-r--r-- | templates/repo/issue/list.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/pulls/compare.tmpl | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index b147b846a1..76f54f43fe 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.8.56.0304
\ No newline at end of file +0.8.57.0304
\ No newline at end of file diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 47d53bf13c..36752a6eab 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -9,8 +9,7 @@ <div class="ui secondary menu"> {{if .CanPullRequest}} <div class="fitted item"> - {{ $baseRepo := .Repository.BaseRepo}} - <a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}"> + <a href="{{.BaseRepo.RepoLink}}/compare/{{.BaseRepo.DefaultBranch}}...{{if not .IsBetweenBranches}}{{$.Owner.Name}}:{{end}}{{$.BranchName}}"> <button class="ui green small button"><i class="octicon octicon-git-compare"></i></button> </a> </div> diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 790a6572e4..b4e79ee9c6 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 .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a> + <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> {{end}} </div> </div> diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index 110dfa46b3..30a2fd5b69 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/{{.}}...{{$.HeadUser.Name}}:{{$.HeadBranch}}">{{.}}</div> + <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{if not $.IsBetweenBranches}}{{$.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}}...{{$.HeadUser.Name}}:{{.}}">{{.}}</div> + <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{if not $.IsBetweenBranches}}{{$.HeadUser.Name}}:{{end}}{{.}}">{{.}}</div> {{end}} </div> </div> |