Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_filter.html.haml « projects « explore « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d00a3d266d8e69314dc5fb660921337bee7c87ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- has_label = local_assigns.fetch(:has_label, false)
- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar)

- 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
        = icon('globe', class: 'mt-1')
        %span.light.ml-3= _("Visibility:")
      - if params[:visibility_level].present?
        = visibility_level_label(params[:visibility_level].to_i)
      - else
        = _('Any')
      = icon('chevron-down')
    %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)