File: _dropdown.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (21 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- toggle_classes = local_assigns.fetch(:toggle_classes, '')

= f.hidden_field(:name)

= dropdown_tag(_('Select branch or create wildcard'),
               options: { toggle_class: "js-protected-branch-select js-filter-submit wide monospace #{toggle_classes}",
                          filter: true,
                          dropdown_class: "dropdown-menu-selectable git-revision-dropdown",
                          dropdown_testid: "protected-branch-dropdown-content",
                          placeholder: _("Search protected branches"),
                          footer_content: true,
                          data: { show_no: true, show_any: true, show_upcoming: true,
                                  selected: params[:protected_branch_name],
                                  project_id: @project.try(:id),
                                  testid: "protected-branch-dropdown" } }) do

  %ul.dropdown-footer-list
    %li
      %button{ class: "dropdown-create-new-item-button js-dropdown-create-new-item", title: _("New Protected Branch") }
        = _('Create wildcard')
        %code