2016-04-15 14:12:04 +00:00
|
|
|
- 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]
|
2020-10-30 18:08:56 +00:00
|
|
|
.dropdown.form-group.mb-lg-0.mx-lg-1.gl-p-0{ data: { testid: "group-filter" } }
|
2019-08-02 21:59:29 +00:00
|
|
|
%label.d-block{ for: "dashboard_search_group" }
|
2019-07-24 13:31:26 +00:00
|
|
|
= _("Group")
|
2020-12-03 21:09:35 +00:00
|
|
|
%input#js-search-group-dropdown.dropdown-menu-toggle{ value: "Loading...", data: { "initial-data": @group.to_json } }
|
2020-10-29 03:09:25 +00:00
|
|
|
.dropdown.form-group.mb-lg-0.mx-lg-1{ data: { testid: "project-filter" } }
|
2019-08-02 21:59:29 +00:00
|
|
|
%label.d-block{ for: "dashboard_search_project" }
|
2019-07-24 13:31:26 +00:00
|
|
|
= _("Project")
|
2020-10-29 03:09:25 +00:00
|
|
|
%button.dropdown-menu-toggle.gl-display-inline-flex.js-search-project-dropdown.gl-mt-0{ type: "button", id: "dashboard_search_project", data: { toggle: "dropdown" } }
|
2020-10-08 03:08:39 +00:00
|
|
|
%span.dropdown-toggle-text.gl-flex-grow-1.str-truncated-100
|
|
|
|
= @project&.full_name || _("Any")
|
|
|
|
- if @project.present?
|
|
|
|
= link_to sprite_icon("clear"), url_for(safe_params.except(:project_id)), class: 'search-clear js-search-clear has-tooltip', title: _('Clear')
|
2020-11-23 21:09:19 +00:00
|
|
|
= sprite_icon("chevron-down", css_class: 'dropdown-menu-toggle-icon gl-top-3')
|
2018-04-17 17:18:41 +00:00
|
|
|
.dropdown-menu.dropdown-select.dropdown-menu-selectable.dropdown-menu-right
|
2018-06-14 04:11:10 +00:00
|
|
|
= dropdown_title(_("Filter results by project"))
|
|
|
|
= dropdown_filter(_("Search projects"))
|
2016-04-15 14:12:04 +00:00
|
|
|
= dropdown_content
|
|
|
|
= dropdown_loading
|