mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 05:36:07 +10:00
Refs dropdown is now loaded async ## What does this MR do? The refs dropdown is loaded async so not to block the page. ## What are the relevant issue numbers? Part of #18202 ## Screenshots (if relevant)  See merge request !4508
15 lines
867 B
Plaintext
15 lines
867 B
Plaintext
- dropdown_toggle_text = @ref || @project.default_branch
|
|
= form_tag switch_namespace_project_refs_path(@project.namespace, @project), method: :get, class: "project-refs-form" do
|
|
= hidden_field_tag :destination, destination
|
|
- if defined?(path)
|
|
= hidden_field_tag :path, path
|
|
- @options && @options.each do |key, value|
|
|
= hidden_field_tag key, value, id: nil
|
|
.dropdown
|
|
= dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: @ref, refs_url: refs_namespace_project_path(@project.namespace, @project) }, { toggle_class: "js-project-refs-dropdown" }
|
|
.dropdown-menu.dropdown-menu-selectable{ class: ("dropdown-menu-align-right" if local_assigns[:align_right]) }
|
|
= dropdown_title "Switch branch/tag"
|
|
= dropdown_filter "Search branches and tags"
|
|
= dropdown_content
|
|
= dropdown_loading
|