|
4 | 4 | <form method="post" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form">
|
5 | 5 | {{$.CsrfTokenHtml}}
|
6 | 6 | </form>
|
7 |
| -{{/* TODO: share this branch selector dropdown with the same in repo page */}} |
8 |
| -<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown tw-max-w-full" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> |
9 |
| - <div class="ui basic small button"> |
10 |
| - <span class="text branch-name gt-ellipsis">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span> |
| 7 | +<div class="ui dropdown select-branch branch-selector-dropdown {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}" |
| 8 | + data-no-results="{{ctx.Locale.Tr "no_results_found"}}" |
| 9 | + {{if not .Issue}}data-for-new-issue="true"{{end}} |
| 10 | +> |
| 11 | + <div class="ui button branch-dropdown-button"> |
| 12 | + <span class="text-branch-name gt-ellipsis">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span> |
11 | 13 | {{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}}
|
12 | 14 | </div>
|
13 | 15 | <div class="menu">
|
14 | 16 | <div class="ui icon search input">
|
15 | 17 | <i class="icon">{{svg "octicon-filter" 16}}</i>
|
16 | 18 | <input name="search" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}...">
|
17 | 19 | </div>
|
18 |
| - <div class="header"> |
19 |
| - <div class="ui grid"> |
20 |
| - <div class="two column row"> |
21 |
| - <a class="reference column muted" href="#" data-target="#branch-list"> |
22 |
| - <span class="text black"> |
23 |
| - {{svg "octicon-git-branch" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.branches"}} |
24 |
| - </span> |
25 |
| - </a> |
26 |
| - <a class="reference column muted" href="#" data-target="#tag-list"> |
27 |
| - <span class="text"> |
28 |
| - {{svg "octicon-tag" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.tags"}} |
29 |
| - </span> |
30 |
| - </a> |
31 |
| - </div> |
32 |
| - </div> |
| 20 | + <div class="branch-tag-tab"> |
| 21 | + <a class="branch-tag-item reference column muted active" href="#" data-target="#branch-list"> |
| 22 | + {{svg "octicon-git-branch" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.branches"}} |
| 23 | + </a> |
| 24 | + <a class="branch-tag-item reference column muted" href="#" data-target="#tag-list"> |
| 25 | + {{svg "octicon-tag" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.tags"}} |
| 26 | + </a> |
33 | 27 | </div>
|
34 | 28 | <div class="branch-tag-divider"></div>
|
35 |
| - <div id="branch-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}"> |
36 |
| - {{if .Reference}} |
37 |
| - <div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div> |
| 29 | + <div id="branch-list" class="scrolling menu reference-list-menu"> |
| 30 | + {{if or .Reference (not .Issue)}} |
| 31 | + <div class="item text small" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div> |
38 | 32 | {{end}}
|
39 | 33 | {{range .Branches}}
|
40 | 34 | <div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" title="{{.}}">{{.}}</div>
|
41 | 35 | {{else}}
|
42 | 36 | <div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
|
43 | 37 | {{end}}
|
44 | 38 | </div>
|
45 |
| - <div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}} tw-hidden"> |
46 |
| - {{if .Reference}} |
47 |
| - <div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div> |
| 39 | + <div id="tag-list" class="scrolling menu reference-list-menu tw-hidden"> |
| 40 | + {{if or .Reference (not .Issue)}} |
| 41 | + <div class="item text small" data-id="" data-name="{{ctx.Locale.Tr "repo.issues.no_ref"}}" data-id-selector="#ref_selector"><strong><a href="#">{{ctx.Locale.Tr "repo.clear_ref"}}</a></strong></div> |
48 | 42 | {{end}}
|
49 | 43 | {{range .Tags}}
|
50 | 44 | <div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
|
|
0 commit comments