Redesign search filters
This commit is contained in:
parent
4673c85379
commit
e84df44ea0
1 changed files with 10 additions and 18 deletions
|
@ -1,24 +1,16 @@
|
||||||
%fieldset
|
%fieldset
|
||||||
%legend Groups:
|
%legend Groups:
|
||||||
%ul.nav.nav-pills.nav-stacked
|
.clearfix
|
||||||
%li{class: ("active" if params[:group_id].blank?)}
|
= select_tag 'group_id', options_from_collection_for_select(current_user.authorized_groups, :id, :name, params[:group_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
|
||||||
= link_to search_path(group_id: nil, search: params[:search]) do
|
|
||||||
Any
|
|
||||||
- current_user.authorized_groups.each do |group|
|
%fieldset
|
||||||
%li{class: ("active" if params[:group_id] == group.id.to_s)}
|
%legend Teams:
|
||||||
= link_to search_path(group_id: group.id, search: params[:search]) do
|
.clearfix
|
||||||
= group.name
|
= select_tag 'team_id', options_from_collection_for_select(current_user.authorized_teams, :id, :name, params[:team_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
|
||||||
|
|
||||||
%fieldset
|
%fieldset
|
||||||
%legend Projects:
|
%legend Projects:
|
||||||
%ul.nav.nav-pills.nav-stacked
|
.clearfix
|
||||||
%li{class: ("active" if params[:project_id].blank?)}
|
= select_tag 'project_id', options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace, params[:project_id]), prompt: 'All', include_blank: true, class: 'trigger-submit chosen'
|
||||||
= link_to search_path(project_id: nil, search: params[:search]) do
|
|
||||||
Any
|
|
||||||
- current_user.authorized_projects.each do |project|
|
|
||||||
%li{class: ("active" if params[:project_id] == project.id.to_s)}
|
|
||||||
= link_to search_path(project_id: project.id, search: params[:search]) do
|
|
||||||
= project.name_with_namespace
|
|
||||||
|
|
||||||
= hidden_field_tag :group_id, params[:group_id]
|
|
||||||
= hidden_field_tag :project_id, params[:project_id]
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue