summaryrefslogtreecommitdiff
path: root/app/views/search/_filter.html.haml
blob: fd5987673937da920a21dbe7b5f1cc5270adb2ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
- if params[:group_id].present?
  = hidden_field_tag :group_id, params[:group_id]
- if params[:project_id].present?
  = hidden_field_tag :project_id, params[:project_id]
.dropdown
  %button.dropdown-menu-toggle.btn.js-search-group-dropdown{ type: "button", data: { toggle: "dropdown" } }
    Group:
    - if @group.present?
      = @group.name
    - else
      Any
    = icon("chevron-down")
  .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-align-right
    .dropdown-title
      %span Filter results by group
      %button.dropdown-title-button.dropdown-menu-close{ aria: { label: "Close" } }
        = icon('times')
    = dropdown_filter("Search groups")
    = dropdown_content
    = dropdown_loading

.dropdown.project-filter
  %button.dropdown-menu-toggle.btn.js-search-project-dropdown{ type: "button", data: { toggle: "dropdown" } }
    Project:
    - if @project.present?
      = @project.name_with_namespace
    - else
      Any
    = icon("chevron-down")
  .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-align-right
    .dropdown-title
      %span Filter results by project
      %button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
        = icon('times')
    = dropdown_filter("Search projects")
    = dropdown_content
    = dropdown_loading