summaryrefslogtreecommitdiff
path: root/app/views/search/_filter.html.haml
blob: c8b6a3258ab4e514e26ff93395c052af995047c9 (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
- 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.js-search-group-dropdown{ type: "button", data: { toggle: "dropdown", default_label: _('Group:'), group_id: params[:group_id] } }
    %span.dropdown-toggle-text
      = _("Group:")
      - if @group.present?
        = @group.name
      - else
        = _("Any")
    = icon("chevron-down")
  .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-right
    = dropdown_title(_("Filter results by group"))
    = dropdown_filter(_("Search groups"))
    = dropdown_content
    = dropdown_loading

.dropdown.project-filter
  %button.dropdown-menu-toggle.js-search-project-dropdown{ type: "button", data: { toggle: "dropdown", default_label: _('Project:') } }
    %span.dropdown-toggle-text
      = _("Project:")
      - if @project.present?
        = @project.full_name
      - else
        = _("Any")
    = icon("chevron-down")
  .dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-right
    = dropdown_title(_("Filter results by project"))
    = dropdown_filter(_("Search projects"))
    = dropdown_content
    = dropdown_loading