summaryrefslogtreecommitdiff
path: root/app/views/shared/groups/_dropdown.html.haml
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/views/shared/groups/_dropdown.html.haml
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/views/shared/groups/_dropdown.html.haml')
-rw-r--r--app/views/shared/groups/_dropdown.html.haml27
1 files changed, 3 insertions, 24 deletions
diff --git a/app/views/shared/groups/_dropdown.html.haml b/app/views/shared/groups/_dropdown.html.haml
index 75c34102935..80edce8e7c4 100644
--- a/app/views/shared/groups/_dropdown.html.haml
+++ b/app/views/shared/groups/_dropdown.html.haml
@@ -1,26 +1,5 @@
- options_hash = local_assigns.fetch(:options_hash, groups_sort_options_hash)
-- show_archive_options = local_assigns.fetch(:show_archive_options, false)
+- groups_sort_options = options_hash.map { |value, title| { value: value, text: title, href: filter_groups_path(sort: value) } }
-.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")
+%div{ data: { testid: 'group_sort_by_dropdown' } }
+ = gl_redirect_listbox_tag groups_sort_options, project_list_sort_by, data: { right: true }