2017-09-06 08:02:51 -04:00
|
|
|
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
|
2021-12-17 16:29:09 -05:00
|
|
|
<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
|
2024-05-06 03:17:22 -04:00
|
|
|
<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}"
|
2024-05-02 06:45:23 -04:00
|
|
|
data-no-results="{{ctx.Locale.Tr "no_results_found"}}"
|
2024-05-08 11:39:13 -04:00
|
|
|
{{if and .Issue (or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}data-url-update-issueref="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref"{{end}}
|
2024-05-02 06:45:23 -04:00
|
|
|
>
|
|
|
|
<div class="ui button branch-dropdown-button">
|
|
|
|
<span class="text-branch-name gt-ellipsis">{{if .Reference}}{{$.RefEndName}}{{else}}{{ctx.Locale.Tr "repo.issues.no_ref"}}{{end}}</span>
|
2021-11-27 23:13:13 -05:00
|
|
|
{{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}}
|
2017-08-24 08:30:27 -04:00
|
|
|
</div>
|
|
|
|
<div class="menu">
|
|
|
|
<div class="ui icon search input">
|
2023-06-14 12:40:15 -04:00
|
|
|
<i class="icon">{{svg "octicon-filter" 16}}</i>
|
2023-09-25 04:56:50 -04:00
|
|
|
<input name="search" placeholder="{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}...">
|
2017-08-24 08:30:27 -04:00
|
|
|
</div>
|
2024-05-02 06:45:23 -04:00
|
|
|
<div class="branch-tag-tab">
|
|
|
|
<a class="branch-tag-item reference column muted active" href="#" data-target="#branch-list">
|
|
|
|
{{svg "octicon-git-branch" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.branches"}}
|
|
|
|
</a>
|
|
|
|
<a class="branch-tag-item reference column muted" href="#" data-target="#tag-list">
|
|
|
|
{{svg "octicon-tag" 16 "tw-mr-1"}} {{ctx.Locale.Tr "repo.tags"}}
|
|
|
|
</a>
|
2017-08-24 08:30:27 -04:00
|
|
|
</div>
|
2024-03-14 23:43:10 -04:00
|
|
|
<div class="branch-tag-divider"></div>
|
2024-05-02 06:45:23 -04:00
|
|
|
<div id="branch-list" class="scrolling menu reference-list-menu">
|
|
|
|
{{if or .Reference (not .Issue)}}
|
|
|
|
<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>
|
2021-04-10 23:46:37 -04:00
|
|
|
{{end}}
|
2020-09-08 12:29:51 -04:00
|
|
|
{{range .Branches}}
|
2024-04-16 04:52:45 -04:00
|
|
|
<div class="item" data-id="refs/heads/{{.}}" data-name="{{.}}" data-id-selector="#ref_selector" title="{{.}}">{{.}}</div>
|
2024-03-14 23:43:10 -04:00
|
|
|
{{else}}
|
|
|
|
<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
|
2020-09-08 12:29:51 -04:00
|
|
|
{{end}}
|
2017-08-24 08:30:27 -04:00
|
|
|
</div>
|
2024-05-02 06:45:23 -04:00
|
|
|
<div id="tag-list" class="scrolling menu reference-list-menu tw-hidden">
|
|
|
|
{{if or .Reference (not .Issue)}}
|
|
|
|
<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>
|
2021-04-10 23:46:37 -04:00
|
|
|
{{end}}
|
2020-09-08 12:29:51 -04:00
|
|
|
{{range .Tags}}
|
|
|
|
<div class="item" data-id="refs/tags/{{.}}" data-name="tags/{{.}}" data-id-selector="#ref_selector">{{.}}</div>
|
2024-03-14 23:43:10 -04:00
|
|
|
{{else}}
|
|
|
|
<div class="item">{{ctx.Locale.Tr "no_results_found"}}</div>
|
2020-09-08 12:29:51 -04:00
|
|
|
{{end}}
|
2017-08-24 08:30:27 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-08 12:55:32 -05:00
|
|
|
<div class="divider"></div>
|
2020-02-11 12:02:41 -05:00
|
|
|
{{end}}
|