|
1 | 1 | {{$release := .release}}
|
| 2 | +{{$showBranchesInDropdown := not .root.HideBranchesInDropdown}} |
2 | 3 | <div class="fitted item choose reference{{if not $release}} mr-1{{end}}">
|
3 | 4 | <div class="ui floating filter dropdown custom" data-can-create-branch="{{.root.CanCreateBranch}}" data-no-results="{{.root.i18n.Tr "repo.pulls.no_results"}}">
|
4 | 5 | <div class="ui basic small compact button" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
|
|
14 | 15 | {{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
15 | 16 | </div>
|
16 | 17 | <div class="data" style="display: none" data-mode="{{if .root.IsViewTag}}tags{{else}}branches{{end}}">
|
17 |
| - {{if .root.ShowBranchesInDropdown}} |
| 18 | + {{if $showBranchesInDropdown}} |
18 | 19 | {{range .root.Branches}}
|
19 | 20 | <div class="item branch {{if eq $.root.BranchName .}}selected{{end}}" data-url="{{$.root.RepoLink}}/{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/branch/{{EscapePound .}}{{if $.root.TreePath}}/{{EscapePound $.root.TreePath}}{{end}}">{{.}}</div>
|
20 | 21 | {{end}}
|
21 | 22 | {{end}}
|
22 |
| - {{if .root.ShowTagsInDropdown}} |
23 |
| - {{range .root.Tags}} |
24 |
| - <div class="item tag {{if eq $.root.BranchName .}}selected{{end}}" data-url="{{$.root.RepoLink}}/{{if $release}}compare/{{EscapePound .}}...{{if $release.TagName}}{{EscapePound $release.TagName}}{{else}}{{EscapePound $release.Sha1}}{{end}}{{else}}{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/tag/{{EscapePound .}}{{if $.root.TreePath}}/{{EscapePound $.root.TreePath}}{{end}}{{end}}">{{.}}</div> |
25 |
| - {{end}} |
| 23 | + {{range .root.Tags}} |
| 24 | + <div class="item tag {{if eq $.root.BranchName .}}selected{{end}}" data-url="{{$.root.RepoLink}}/{{if $release}}compare/{{EscapePound .}}...{{if $release.TagName}}{{EscapePound $release.TagName}}{{else}}{{EscapePound $release.Sha1}}{{end}}{{else}}{{if $.root.PageIsCommits}}commits{{else}}src{{end}}/tag/{{EscapePound .}}{{if $.root.TreePath}}/{{EscapePound $.root.TreePath}}{{end}}{{end}}">{{.}}</div> |
26 | 25 | {{end}}
|
27 | 26 | </div>
|
28 | 27 | <div class="menu transition" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
|
29 | 28 | <div class="ui icon search input">
|
30 | 29 | <i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i>
|
31 |
| - <input name="search" ref="searchField" v-model="searchTerm" @keydown="keydown($event)" placeholder="{{if .root.ShowBranchesInDropdown}}{{.root.i18n.Tr "repo.filter_branch_and_tag"}}{{else}}{{.root.i18n.Tr "repo.find_tag"}}{{end}}..."> |
| 30 | + <input name="search" ref="searchField" v-model="searchTerm" @keydown="keydown($event)" placeholder="{{if $showBranchesInDropdown}}{{.root.i18n.Tr "repo.filter_branch_and_tag"}}{{else}}{{.root.i18n.Tr "repo.find_tag"}}{{end}}..."> |
32 | 31 | </div>
|
33 |
| - {{if and .root.ShowBranchesInDropdown .root.ShowTagsInDropdown}} |
| 32 | + {{if $showBranchesInDropdown}} |
34 | 33 | <div class="header branch-tag-choice">
|
35 | 34 | <div class="ui grid">
|
36 | 35 | <div class="two column row">
|
|
0 commit comments