diff options
Diffstat (limited to 'app/views/explore/projects/_filter.html.haml')
-rw-r--r-- | app/views/explore/projects/_filter.html.haml | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/app/views/explore/projects/_filter.html.haml b/app/views/explore/projects/_filter.html.haml index 2ead8fc2cfd..f02d30081b6 100644 --- a/app/views/explore/projects/_filter.html.haml +++ b/app/views/explore/projects/_filter.html.haml @@ -1,22 +1,9 @@ - has_label = local_assigns.fetch(:has_label, false) - feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar) +- klass = feature_project_list_filter_bar ? 'gl-ml-3 gl-display-flex gl-flex-grow-1 gl-flex-shrink-1' : 'gl-ml-3' +- selected = projects_filter_selected(params[:visibility_level]) - if current_user - .dropdown.js-project-filter-dropdown-wrap{ class: ('d-flex flex-grow-1 flex-shrink-1' if feature_project_list_filter_bar) } - %button.dropdown-menu-toggle{ href: '#', "data-toggle" => "dropdown", 'data-display' => 'static' } - - unless has_label - %span= _("Visibility:") - - if params[:visibility_level].present? - = visibility_level_label(params[:visibility_level].to_i) - - else - = _('Any') - = sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3') - %ul.dropdown-menu.dropdown-menu-right - %li - = link_to filter_projects_path(visibility_level: nil) do - = _('Any') - - Gitlab::VisibilityLevel.values.each do |level| - %li{ class: active_when(level.to_s == params[:visibility_level]) || 'light' } - = link_to filter_projects_path(visibility_level: level) do - = visibility_level_icon(level) - = visibility_level_label(level) + - unless has_label + %span.gl-float-left= _("Visibility:") + = gl_redirect_listbox_tag(projects_filter_items, selected, class: klass, data: { right: true }) |