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-05 15:41:28 +0300
committerEzekiel Kigbo <ekigbo@gitlab.com>2019-05-06 18:41:46 +0300
commit6daec21a161821816b1eda03b52369d61685fe48 (patch)
treed2a967ffaf26efac40c95e4482109f632f6b9fa7 /app/views/dashboard/projects/_nav.html.haml
parent6bab1f8dde3365007c83f3719758a96589673225 (diff)
Updated layout for various breakpoints
Updated translations Adds sort direction dropdown Allows the project list sorting direction to be changed, available options can be sorted ascending or descending. Implements the changes from the UX review.
Diffstat (limited to 'app/views/dashboard/projects/_nav.html.haml')
-rw-r--r--app/views/dashboard/projects/_nav.html.haml18
1 files changed, 13 insertions, 5 deletions
diff --git a/app/views/dashboard/projects/_nav.html.haml b/app/views/dashboard/projects/_nav.html.haml
index 2aff1f1f3a3..8f4a517d918 100644
--- a/app/views/dashboard/projects/_nav.html.haml
+++ b/app/views/dashboard/projects/_nav.html.haml
@@ -1,3 +1,8 @@
+
+- is_explore = local_assigns.fetch(:is_explore, false)
+- inactive_class = 'btn p-2'
+- active_class = 'btn p-2 active'
+- is_explore_trending = local_assigns.fetch(:is_explore_trending, false)
.nav-block
- if !Feature.enabled?(:project_list_filter_bar)
%ul.nav-links.mobile-separator.nav.nav-tabs
@@ -6,8 +11,11 @@
= 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)
+ -# %ul.btn-group.button-filter-group.d-flex.m-0.p-0
+ %div.btn-group.button-filter-group.d-flex.m-0.p-0
+ - if is_explore
+ = link_to s_('DashboardProjects|Trending'), trending_explore_projects_path, class: is_explore_trending ? active_class : inactive_class
+ = link_to s_('DashboardProjects|All'), explore_projects_path, class: is_explore_trending ? inactive_class : active_class
+ - else
+ = link_to s_('DashboardProjects|All'), dashboard_projects_path, class: params[:personal].present? ? inactive_class : active_class
+ = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), class: params[:personal].present? ? active_class : inactive_class