059d1ae4c8
Allow creating nested group via UI See merge request !8786
42 lines
2 KiB
Text
42 lines
2 KiB
Text
- @sort ||= sort_value_recently_updated
|
|
- personal = params[:personal]
|
|
- archived = params[:archived]
|
|
- shared = params[:shared]
|
|
- namespace_id = params[:namespace_id]
|
|
.dropdown
|
|
- toggle_text = projects_sort_options_hash[@sort]
|
|
= dropdown_toggle(toggle_text, { toggle: 'dropdown' }, { id: 'sort-projects-dropdown' })
|
|
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
|
|
%li.dropdown-header
|
|
Sort by
|
|
- projects_sort_options_hash.each do |value, title|
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: value, archived: archived, personal: personal), class: ("is-active" if @sort == value) do
|
|
= title
|
|
|
|
%li.divider
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, archived: nil), class: ("is-active" unless params[:archived].present?) do
|
|
Hide archived projects
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, archived: true), class: ("is-active" if params[:archived].present?) do
|
|
Show archived projects
|
|
- if current_user
|
|
%li.divider
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, personal: nil), class: ("is-active" unless personal.present?) do
|
|
Owned by anyone
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, personal: true), class: ("is-active" if personal.present?) do
|
|
Owned by me
|
|
- if @group && @group.shared_projects.present?
|
|
%li.divider
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, shared: nil), class: ("is-active" unless shared.present?) do
|
|
All projects
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, shared: 0), class: ("is-active" if shared == '0') do
|
|
Hide shared projects
|
|
%li
|
|
= link_to filter_projects_path(namespace_id: namespace_id, sort: @sort, shared: 1), class: ("is-active" if shared == '1') do
|
|
Hide group projects
|