summaryrefslogtreecommitdiff
path: root/app/views/shared/_ref_switcher.html.haml
blob: a84e53ea642945bd05c42bd34849db0b33cdef8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
= 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 @ref || @project.default_branch, { toggle: "dropdown", selected: @ref || @project.default_branch, refs_url: refs_namespace_project_path(@project.namespace, @project) }, { toggle_class: "js-project-refs-dropdown" }
    .dropdown-menu.dropdown-menu-selectable
      = dropdown_title "Switch branch/tag"
      = dropdown_filter "Search branches and tags"
      = dropdown_content
      = dropdown_loading
    -# = select_tag "ref", grouped_options_refs, class: "project-refs-select select2 select2-sm"