summaryrefslogtreecommitdiffstats
path: root/templates/repo/branch_dropdown.tmpl
blob: 063006314baaed009b18ae332d961a8eaf254bd4 (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
<div class="fitted item choose reference">
	<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
			<div class="ui basic compact tiny button">
			<span class="text">
				<i class="octicon octicon-git-branch"></i>
				{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
				<strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
			</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.filter_branch_and_tag"}}...">
			</div>
			<div class="header">
				<div class="ui grid">
					<div class="two column row">
						<a class="reference column" href="#" data-target="#branch-list">
							<span class="text {{if not .IsViewTag}}black{{end}}">
								<i class="octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}}
							</span>
						</a>
						<a class="reference column" href="#" data-target="#tag-list">
							<span class="text {{if .IsViewTag}}black{{end}}">
								<i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
							</span>
						</a>
					</div>
				</div>
			</div>
			<div id="branch-list" class="scrolling menu" {{if .IsViewTag}}style="display: none"{{end}}>
				{{range .Branches}}
					<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/{{if $.PageIsCommits}}commits{{else}}src{{end}}/{{EscapePound .}}{{if $.TreePath}}/{{EscapePound $.TreePath}}{{end}}">{{.}}</div>
				{{end}}
			</div>
			<div id="tag-list" class="scrolling menu" {{if not .IsViewTag}}style="display: none"{{end}}>
				{{range .Tags}}
					<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/{{if $.PageIsCommits}}commits{{else}}src{{end}}/{{EscapePound .}}{{if $.TreePath}}/{{EscapePound $.TreePath}}{{end}}">{{.}}</div>
				{{end}}
			</div>
		</div>
	</div>
</div>