2018-03-17 18:26:18 +05:30
|
|
|
- options_hash = local_assigns.fetch(:options_hash, groups_sort_options_hash)
|
|
|
|
- show_archive_options = local_assigns.fetch(:show_archive_options, false)
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
.dropdown.inline.js-group-filter-dropdown-wrap.gl-mr-3
|
2019-02-15 15:39:39 +05:30
|
|
|
%button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
|
2017-09-10 17:25:29 +05:30
|
|
|
%span.dropdown-label
|
2021-02-22 17:27:13 +05:30
|
|
|
= options_hash[project_list_sort_by]
|
|
|
|
= sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
|
2018-03-17 18:26:18 +05:30
|
|
|
%li.dropdown-header
|
|
|
|
= _("Sort by")
|
|
|
|
- options_hash.each do |value, title|
|
|
|
|
%li.js-filter-sort-order
|
2021-02-22 17:27:13 +05:30
|
|
|
= link_to filter_groups_path(sort: value), class: ("is-active" if project_list_sort_by == value) do
|
2018-03-17 18:26:18 +05:30
|
|
|
= title
|
|
|
|
- if show_archive_options
|
|
|
|
%li.divider
|
|
|
|
%li.js-filter-archived-projects
|
2018-03-27 19:54:05 +05:30
|
|
|
= link_to filter_groups_path(archived: nil), class: ("is-active" unless params[:archived].present?) do
|
2019-07-31 22:56:46 +05:30
|
|
|
= _("Hide archived projects")
|
2018-03-17 18:26:18 +05:30
|
|
|
%li.js-filter-archived-projects
|
2018-03-27 19:54:05 +05:30
|
|
|
= link_to filter_groups_path(archived: true), class: ("is-active" if Gitlab::Utils.to_boolean(params[:archived])) do
|
2019-07-31 22:56:46 +05:30
|
|
|
= _("Show archived projects")
|
2018-03-17 18:26:18 +05:30
|
|
|
%li.js-filter-archived-projects
|
2018-03-27 19:54:05 +05:30
|
|
|
= link_to filter_groups_path(archived: 'only'), class: ("is-active" if params[:archived] == 'only') do
|
2019-07-31 22:56:46 +05:30
|
|
|
= _("Show archived projects only")
|