diff options
author | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-04-02 12:12:29 +1100 |
---|---|---|
committer | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-05-06 16:41:46 +0100 |
commit | 6bab1f8dde3365007c83f3719758a96589673225 (patch) | |
tree | 9dbf32c8bed01d69fd48e1add701802a0ba27f9b /app/views/explore | |
parent | 4ebbfb9f1e95091a7753a10e12d989d72f4332f8 (diff) | |
download | gitlab-ce-6bab1f8dde3365007c83f3719758a96589673225.tar.gz |
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.haml | 6 | ||||
-rw-r--r-- | app/views/explore/projects/_nav.html.haml | 5 |
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' + |