Commit 3ed8a8e5 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'search-results-filter-dropdown' into 'master'

Improved search results filter dropdown

## Current

Currently filter dropdowns on search results page can be **very** long and off the page

![Screen_Shot_2016-03-11_at_15.25.24](/uploads/3418b0a6f4f8a0a8bd2441b53502c574/Screen_Shot_2016-03-11_at_15.25.24.png)

## New

Changed over to the new dropdown

![Screen_Shot_2016-03-11_at_15.29.06](/uploads/2d3a4a9b3e50f3e0fc1748a026cd5905/Screen_Shot_2016-03-11_at_15.29.06.png)

See merge request !3183
parents 6bc7fad8 9f866198
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
} }
.dropdown-content { .dropdown-content {
max-height: 200px; max-height: 215px;
overflow-y: scroll; overflow-y: scroll;
} }
......
...@@ -6,14 +6,21 @@ ...@@ -6,14 +6,21 @@
- else - else
Any Any
%b.caret %b.caret
%ul.dropdown-menu .dropdown-menu.dropdown-select.dropdown-menu-selectable
%li .dropdown-title
= link_to search_filter_path(group_id: nil) do %span Filter results by group
Any %button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
- current_user.authorized_groups.sort_by(&:name).each do |group| = icon('times')
%li .dropdown-content
= link_to search_filter_path(group_id: group.id, project_id: nil) do %ul
= group.name %li
= link_to search_filter_path(group_id: nil), class: ("is-active" if !params[:group_id].present?) do
Any
%li.divider
- current_user.authorized_groups.sort_by(&:name).each do |group|
%li
= link_to search_filter_path(group_id: group.id, project_id: nil), class: ("is-active" if params[:group_id] == group.id.to_s) do
= group.name
.dropdown.inline.prepend-left-10.project-filter .dropdown.inline.prepend-left-10.project-filter
%button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'} %button.dropdown-toggle.btn.btn-sm{type: 'button', 'data-toggle' => 'dropdown'}
...@@ -23,11 +30,18 @@ ...@@ -23,11 +30,18 @@
- else - else
Any Any
%b.caret %b.caret
%ul.dropdown-menu .dropdown-menu.dropdown-select.dropdown-menu-selectable
%li .dropdown-title
= link_to search_filter_path(project_id: nil) do %span Filter results by project
Any %button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
- current_user.authorized_projects.sort_by(&:name_with_namespace).each do |project| = icon('times')
%li .dropdown-content
= link_to search_filter_path(project_id: project.id, group_id: nil) do %ul
= project.name_with_namespace %li
= link_to search_filter_path(project_id: nil), class: ("is-active" if !params[:project_id].present?) do
Any
%li.divider
- current_user.authorized_projects.sort_by(&:name_with_namespace).each do |project|
%li
= link_to search_filter_path(project_id: project.id, group_id: nil), class: ("is-active" if params[:project_id] == project.id.to_s) do
= project.name_with_namespace
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment