Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

_nav.html.haml 1.45 KB
Newer Older
1
2
- inactive_class = 'btn p-2'
- active_class = 'btn p-2 active'
Ezekiel Kigbo's avatar
Ezekiel Kigbo committed
3
4
- project_tab_filter = local_assigns.fetch(:project_tab_filter, "")
- is_explore_trending = project_tab_filter == :explore_trending
5
6
- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar)

Ezekiel Kigbo's avatar
Ezekiel Kigbo committed
7
.nav-block{ class: Feature.enabled?(:project_list_filter_bar) ? "w-100" : "" }
8
  - if feature_project_list_filter_bar
Ezekiel Kigbo's avatar
Ezekiel Kigbo committed
9
    .btn-group.button-filter-group.d-flex.m-0.p-0
Ezekiel Kigbo's avatar
Ezekiel Kigbo committed
10
      - if project_tab_filter == :explore || is_explore_trending
11
12
13
14
15
        = 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
16
17
18
19
20
21
  - else
    %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)