summaryrefslogtreecommitdiffstats
path: root/templates/repo/pulls/compare.tmpl
blob: 2296acf1df9a481e48bf22df744dcd7bedb57be0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{{template "base/head" .}}
<div class="repository compare pull diff">
	{{template "repo/header" .}}
	<div class="ui container">
		<div class="sixteen wide column page grid">
			<h2 class="ui header">
				{{.i18n.Tr "repo.pulls.compare_changes"}}
				<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
			</h2>
			<div class="ui segment choose branch">
				<span class="octicon octicon-git-compare"></span>
				<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
					<div class="ui basic small button">
						<span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
						<i class="dropdown icon"></i>
					</div>
					<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}}
								<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}}
						</div>
					</div>
				</div>
				...
				<div class="ui floating filter dropdown">
					<div class="ui basic small button">
						<span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadUser.Name}}:{{$.HeadBranch}}</span>
						<i class="dropdown icon"></i>
					</div>
					<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}}
								<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>
							{{end}}
						</div>
					</div>
				</div>
			</div>

			{{if .IsNothingToCompare}}
				<div class="ui segment">
					{{.i18n.Tr "repo.pulls.nothing_to_compare"}}
				</div>
			{{else if .HasPullRequest}}
				<div class="ui segment">
					{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
				</div>
			{{else if eq .CommitCount 0 }}
				{{template "repo/commits_table" .}}
				{{template "repo/diff/box" .}}
			{{else}}
				{{template "repo/issue/new_form" .}}
				{{template "repo/commits_table" .}}
				{{template "repo/diff/box" .}}
			{{end}}
		</div>

	</div>
</div>
{{template "base/footer" .}}