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/dashboard
parent4ebbfb9f1e95091a7753a10e12d989d72f4332f8 (diff)
Added filter bar to project page
Added project_list_filter_bar feature flag
Diffstat (limited to 'app/views/dashboard')
-rw-r--r--app/views/dashboard/_projects_head.html.haml11
-rw-r--r--app/views/dashboard/projects/_nav.html.haml17
-rw-r--r--app/views/dashboard/projects/index.html.haml3
3 files changed, 21 insertions, 10 deletions
diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml
index ca2822e2b29..bb14b33079d 100644
--- a/app/views/dashboard/_projects_head.html.haml
+++ b/app/views/dashboard/_projects_head.html.haml
@@ -23,7 +23,10 @@
= nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path]) do
= link_to explore_root_path, data: {placement: 'right'} do
Explore projects
-
- .nav-controls
- = render 'shared/projects/search_form'
- = render 'shared/projects/dropdown'
+ - unless Feature.enabled?(:project_list_filter_bar)
+ .nav-controls
+ = render 'shared/projects/search_form'
+ = render 'shared/projects/dropdown'
+- if Feature.enabled?(:project_list_filter_bar)
+ .project-filters
+ = render 'shared/projects/search_bar'
diff --git a/app/views/dashboard/projects/_nav.html.haml b/app/views/dashboard/projects/_nav.html.haml
index da3cf5807b0..2aff1f1f3a3 100644
--- a/app/views/dashboard/projects/_nav.html.haml
+++ b/app/views/dashboard/projects/_nav.html.haml
@@ -1,6 +1,13 @@
.nav-block
- %ul.nav-links.mobile-separator.nav.nav-tabs
- = nav_link(html_options: { class: ("active" unless params[:personal].present?) }) do
- = link_to s_('DashboardProjects|All'), dashboard_projects_path
- = nav_link(html_options: { class: ("active" if params[:personal].present?) }) do
- = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true)
+ - if !Feature.enabled?(:project_list_filter_bar)
+ %ul.nav-links.mobile-separator.nav.nav-tabs
+ = nav_link(html_options: { class: ("active" unless params[:personal].present?) }) do
+ = link_to s_('DashboardProjects|All'), dashboard_projects_path
+ = nav_link(html_options: { class: ("active" if params[:personal].present?) }) do
+ = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true)
+ - else
+ %ul.btn-group.button-filter-group.d-flex.m-0.p-0
+ = nav_link(html_options: { class: params[:personal].present? ? "btn p-2" : "btn p-2 active" }) do
+ = link_to s_('DashboardProjects|All'), dashboard_projects_path
+ = nav_link(html_options: { class: params[:personal].present? ? "btn p-2 active" : "btn p-2" }) do
+ = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true)
diff --git a/app/views/dashboard/projects/index.html.haml b/app/views/dashboard/projects/index.html.haml
index dc9468b3368..9d0a4219446 100644
--- a/app/views/dashboard/projects/index.html.haml
+++ b/app/views/dashboard/projects/index.html.haml
@@ -13,7 +13,8 @@
= render "projects/last_push"
- if show_projects?(@projects, params)
= render 'dashboard/projects_head'
- = render 'nav'
+ - unless Feature.enabled?(:project_list_filter_bar)
+ = render 'nav'
= render 'projects'
- else
= render "zero_authorized_projects"