Commit 6c69868c authored by Phil Hughes's avatar Phil Hughes

Improved search results filter dropdown

parent f7da99ae
...@@ -6,13 +6,20 @@ ...@@ -6,13 +6,20 @@
- else - else
Any Any
%b.caret %b.caret
%ul.dropdown-menu .dropdown-menu.dropdown-select.dropdown-menu-selectable
.dropdown-title
%span Filter results by group
%button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
= icon('times')
.dropdown-content
%ul
%li %li
= link_to search_filter_path(group_id: nil) do = link_to search_filter_path(group_id: nil), class: ("is-active" if !params[:group_id].present?) do
Any Any
%li.divider
- current_user.authorized_groups.sort_by(&:name).each do |group| - current_user.authorized_groups.sort_by(&:name).each do |group|
%li %li
= link_to search_filter_path(group_id: group.id, project_id: nil) do = 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 = group.name
.dropdown.inline.prepend-left-10.project-filter .dropdown.inline.prepend-left-10.project-filter
...@@ -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
.dropdown-title
%span Filter results by project
%button.dropdown-title-button.dropdown-menu-close{aria: {label: "Close"}}
= icon('times')
.dropdown-content
%ul
%li %li
= link_to search_filter_path(project_id: nil) do = link_to search_filter_path(project_id: nil), class: ("is-active" if !params[:project_id].present?) do
Any Any
%li.divider
- current_user.authorized_projects.sort_by(&:name_with_namespace).each do |project| - current_user.authorized_projects.sort_by(&:name_with_namespace).each do |project|
%li %li
= link_to search_filter_path(project_id: project.id, group_id: nil) do = 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 = 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