27 lines
1.3 KiB
Plaintext
27 lines
1.3 KiB
Plaintext
- options_hash = local_assigns.fetch(:options_hash, groups_sort_options_hash)
|
|
- show_archive_options = local_assigns.fetch(:show_archive_options, false)
|
|
|
|
.dropdown.inline.js-group-filter-dropdown-wrap.gl-mr-3
|
|
%button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
|
|
%span.dropdown-label
|
|
= options_hash[project_list_sort_by]
|
|
= sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
|
|
%ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
|
|
%li.dropdown-header
|
|
= _("Sort by")
|
|
- options_hash.each do |value, title|
|
|
%li.js-filter-sort-order
|
|
= link_to filter_groups_path(sort: value), class: ("is-active" if project_list_sort_by == value) do
|
|
= title
|
|
- if show_archive_options
|
|
%li.divider
|
|
%li.js-filter-archived-projects
|
|
= link_to filter_groups_path(archived: nil), class: ("is-active" unless params[:archived].present?) do
|
|
= _("Hide archived projects")
|
|
%li.js-filter-archived-projects
|
|
= link_to filter_groups_path(archived: true), class: ("is-active" if Gitlab::Utils.to_boolean(params[:archived])) do
|
|
= _("Show archived projects")
|
|
%li.js-filter-archived-projects
|
|
= link_to filter_groups_path(archived: 'only'), class: ("is-active" if params[:archived] == 'only') do
|
|
= _("Show archived projects only")
|