debian-mirror-gitlab/app/views/explore/projects/_filter.html.haml

24 lines
1.1 KiB
Text
Raw Normal View History

2019-07-31 22:56:46 +05:30
- has_label = local_assigns.fetch(:has_label, false)
- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar)
2016-06-02 11:05:42 +05:30
- if current_user
2019-07-31 22:56:46 +05:30
.dropdown.js-project-filter-dropdown-wrap{ class: ('d-flex flex-grow-1 flex-shrink-1' if feature_project_list_filter_bar) }
2019-02-15 15:39:39 +05:30
%button.dropdown-menu-toggle{ href: '#', "data-toggle" => "dropdown", 'data-display' => 'static' }
2019-07-31 22:56:46 +05:30
- unless has_label
= icon('globe', class: 'mt-1')
%span.light.ml-3= _("Visibility:")
2016-06-02 11:05:42 +05:30
- if params[:visibility_level].present?
= visibility_level_label(params[:visibility_level].to_i)
- else
2018-11-18 11:00:15 +05:30
= _('Any')
2017-08-17 22:00:37 +05:30
= icon('chevron-down')
2018-11-08 19:23:39 +05:30
%ul.dropdown-menu.dropdown-menu-right
2016-06-02 11:05:42 +05:30
%li
= link_to filter_projects_path(visibility_level: nil) do
2018-11-18 11:00:15 +05:30
= _('Any')
2016-06-02 11:05:42 +05:30
- Gitlab::VisibilityLevel.values.each do |level|
2017-08-17 22:00:37 +05:30
%li{ class: active_when(level.to_s == params[:visibility_level]) || 'light' }
2016-06-02 11:05:42 +05:30
= link_to filter_projects_path(visibility_level: level) do
= visibility_level_icon(level)
= visibility_level_label(level)