summaryrefslogtreecommitdiff
path: root/app/views/dashboard/projects/_nav.html.haml
blob: 8f4a517d918213fadd6ae7fa989d5da5c9bde5fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

- 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
      = 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
    %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