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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzekiel Kigbo <ekigbo@gitlab.com>2019-04-02 04:12:29 +0300
committerEzekiel Kigbo <ekigbo@gitlab.com>2019-05-06 18:41:46 +0300
commit6bab1f8dde3365007c83f3719758a96589673225 (patch)
tree9dbf32c8bed01d69fd48e1add701802a0ba27f9b /app/views/explore
parent4ebbfb9f1e95091a7753a10e12d989d72f4332f8 (diff)
Added filter bar to project page
Added project_list_filter_bar feature flag
Diffstat (limited to 'app/views/explore')
-rw-r--r--app/views/explore/projects/_filter.html.haml6
-rw-r--r--app/views/explore/projects/_nav.html.haml5
2 files changed, 8 insertions, 3 deletions
diff --git a/app/views/explore/projects/_filter.html.haml b/app/views/explore/projects/_filter.html.haml
index f518205f14c..5e321956f6e 100644
--- a/app/views/explore/projects/_filter.html.haml
+++ b/app/views/explore/projects/_filter.html.haml
@@ -1,8 +1,10 @@
+- has_label = local_assigns[:has_label] ? local_assigns[:has_label] : false
- if current_user
.dropdown
%button.dropdown-menu-toggle{ href: '#', "data-toggle" => "dropdown", 'data-display' => 'static' }
- = icon('globe', class: 'mt-1')
- %span.light.ml-3= _("Visibility:")
+ - if !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
diff --git a/app/views/explore/projects/_nav.html.haml b/app/views/explore/projects/_nav.html.haml
index bf65c19b720..e4e8d4fc008 100644
--- a/app/views/explore/projects/_nav.html.haml
+++ b/app/views/explore/projects/_nav.html.haml
@@ -11,7 +11,10 @@
= _('All')
.nav-controls
+ -# TODO: filters are currently only shown when logged out, I assume we want to show them all the time?
- unless current_user
= render 'shared/projects/search_form'
= render 'shared/projects/dropdown'
- = render 'filter'
+ - unless Feature.enabled?(:project_list_filter_bar)
+ = render 'filter'
+