2019-04-05 08:41:28 -04:00
|
|
|
- inactive_class = 'btn p-2'
|
|
|
|
- active_class = 'btn p-2 active'
|
2019-04-17 07:02:34 -04:00
|
|
|
- project_tab_filter = local_assigns.fetch(:project_tab_filter, "")
|
|
|
|
- is_explore_trending = project_tab_filter == :explore_trending
|
2019-04-19 04:36:16 -04:00
|
|
|
- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar)
|
|
|
|
|
2019-05-02 08:49:11 -04:00
|
|
|
.nav-block{ class: ("w-100" if feature_project_list_filter_bar) }
|
2019-04-19 04:36:16 -04:00
|
|
|
- if feature_project_list_filter_bar
|
2019-04-12 11:11:46 -04:00
|
|
|
.btn-group.button-filter-group.d-flex.m-0.p-0
|
2019-04-17 07:02:34 -04:00
|
|
|
- if project_tab_filter == :explore || is_explore_trending
|
2019-04-05 08:41:28 -04:00
|
|
|
= 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
|
2019-04-19 04:36:16 -04:00
|
|
|
- else
|
2021-11-12 13:12:20 -05:00
|
|
|
= gl_tabs_nav do
|
|
|
|
= gl_tab_link_to s_('DashboardProjects|All'), dashboard_projects_path, { item_active: params[:personal].blank? }
|
|
|
|
= gl_tab_link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), { item_active: params[:personal].present? }
|