2015-08-08 22:43:14 +08:00
|
|
|
{{template "base/head" .}}
|
2015-09-02 16:08:05 +08:00
|
|
|
<div class="repository compare pull diff">
|
2015-08-08 22:43:14 +08:00
|
|
|
{{template "repo/header" .}}
|
2015-08-10 01:04:23 +08:00
|
|
|
<div class="ui container">
|
2015-08-08 22:43:14 +08:00
|
|
|
<div class="sixteen wide column page grid">
|
|
|
|
<h2 class="ui header">
|
2015-12-08 06:30:52 +08:00
|
|
|
{{.i18n.Tr "repo.pulls.compare_changes"}}
|
|
|
|
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
|
2015-08-08 22:43:14 +08:00
|
|
|
</h2>
|
|
|
|
<div class="ui segment choose branch">
|
|
|
|
<span class="octicon octicon-git-compare"></span>
|
2015-08-10 01:04:23 +08:00
|
|
|
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
2015-08-08 22:43:14 +08:00
|
|
|
<div class="ui basic small button">
|
2019-02-12 16:37:32 +08:00
|
|
|
<span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
|
2015-12-08 06:30:52 +08:00
|
|
|
<i class="dropdown icon"></i>
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="menu">
|
|
|
|
<div class="ui icon search input">
|
|
|
|
<i class="filter icon"></i>
|
|
|
|
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
|
|
|
|
</div>
|
|
|
|
<div class="scrolling menu">
|
|
|
|
{{range .Branches}}
|
2019-02-12 16:37:32 +08:00
|
|
|
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{EscapePound .}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound $.HeadBranch}}">{{$.BaseName}}:{{.}}</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
...
|
2015-08-08 22:43:14 +08:00
|
|
|
<div class="ui floating filter dropdown">
|
|
|
|
<div class="ui basic small button">
|
2019-02-12 16:37:32 +08:00
|
|
|
<span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadUser.Name}}:{{$.HeadBranch}}</span>
|
2015-12-08 06:30:52 +08:00
|
|
|
<i class="dropdown icon"></i>
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="menu">
|
|
|
|
<div class="ui icon search input">
|
|
|
|
<i class="filter icon"></i>
|
|
|
|
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
|
|
|
|
</div>
|
|
|
|
<div class="scrolling menu">
|
|
|
|
{{range .HeadBranches}}
|
2019-02-12 16:37:32 +08:00
|
|
|
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{EscapePound $.BaseBranch}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound .}}">{{$.HeadUser.Name}}:{{.}}</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
2015-09-02 07:07:02 +08:00
|
|
|
|
2015-09-02 17:09:12 +08:00
|
|
|
{{if .IsNothingToCompare}}
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="ui segment">
|
|
|
|
{{.i18n.Tr "repo.pulls.nothing_to_compare"}}
|
|
|
|
</div>
|
2015-09-02 17:09:12 +08:00
|
|
|
{{else if .HasPullRequest}}
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="ui segment">
|
|
|
|
{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
|
|
|
|
</div>
|
2019-04-10 04:45:58 +08:00
|
|
|
{{else if eq .CommitCount 0 }}
|
|
|
|
{{template "repo/commits_table" .}}
|
|
|
|
{{template "repo/diff/box" .}}
|
2015-09-02 17:09:12 +08:00
|
|
|
{{else}}
|
2015-12-08 06:30:52 +08:00
|
|
|
{{template "repo/issue/new_form" .}}
|
|
|
|
{{template "repo/commits_table" .}}
|
2016-08-28 19:31:42 +08:00
|
|
|
{{template "repo/diff/box" .}}
|
2015-12-08 06:30:52 +08:00
|
|
|
{{end}}
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
2015-08-26 12:39:32 +08:00
|
|
|
|
2015-08-08 22:43:14 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{template "base/footer" .}}
|