diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-12-20 12:08:45 +0000 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-12-20 12:15:15 +0000 |
commit | 5664ea2fdeadbd677dc20f0675f6566cffdfc0a4 (patch) | |
tree | 06ed91e369b54fb45e0e11ea64867d97ab257f5c | |
parent | 5b880f0d36b082a0b443c5fe95f51a84dee27475 (diff) | |
download | gitlab-ce-5664ea2fdeadbd677dc20f0675f6566cffdfc0a4.tar.gz |
Accept options hash for Groups dropdown
-rw-r--r-- | app/views/shared/groups/_dropdown.html.haml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/shared/groups/_dropdown.html.haml b/app/views/shared/groups/_dropdown.html.haml index 8e6747ca740..1a259b679c7 100644 --- a/app/views/shared/groups/_dropdown.html.haml +++ b/app/views/shared/groups/_dropdown.html.haml @@ -1,3 +1,4 @@ +- options_hash = local_assigns.fetch(:options_hash, groups_sort_options_hash) - show_archive_options = local_assigns.fetch(:show_archive_options, false) - if @sort.present? - default_sort_by = @sort @@ -10,12 +11,12 @@ .dropdown.inline.js-group-filter-dropdown-wrap.append-right-10 %button.dropdown-toggle{ type: 'button', 'data-toggle' => 'dropdown' } %span.dropdown-label - = sort_options_hash[default_sort_by] + = options_hash[default_sort_by] = icon('chevron-down') %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %li.dropdown-header = _("Sort by") - - groups_sort_options_hash.each do |value, title| + - options_hash.each do |value, title| %li.js-filter-sort-order = link_to filter_groups_path(sort: value), class: ("is-active" if default_sort_by == value) do = title |