_projects_head.html.haml 1.7 KB
Newer Older
Ezekiel Kigbo's avatar
Ezekiel Kigbo committed
1
- project_tab_filter = local_assigns.fetch(:project_tab_filter, "")
2
- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar)
3
4
= content_for :flash_message do
  = render 'shared/project_limit'
Phil Hughes's avatar
Phil Hughes committed
5

6
.page-title-holder.d-flex.align-items-center
7
8
9
10
  %h1.page-title= _('Projects')

  - if current_user.can_create_project?
    .page-title-controls
11
      = link_to _("New project"), new_project_path, class: "btn btn-success"
12

13
14
15
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
  .fade-left= icon('angle-left')
  .fade-right= icon('angle-right')
16
  %ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs{ class: feature_project_list_filter_bar ? "border-0" : "" }
17
    = nav_link(page: [dashboard_projects_path, root_path]) do
18
      = link_to dashboard_projects_path, class: 'shortcuts-activity', data: {placement: 'right'} do
19
        = _("Your projects")
20
        %span.badge.badge-pill= limited_counter_with_delimiter(@total_user_projects_count)
21
    = nav_link(page: starred_dashboard_projects_path) do
22
      = link_to starred_dashboard_projects_path, data: {placement: 'right'} do
23
        = _("Starred projects")
24
        %span.badge.badge-pill= limited_counter_with_delimiter(@total_starred_projects_count)
25
    = nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path]) do
26
      = link_to explore_root_path, data: {placement: 'right'} do
27
        = _("Explore projects")
28
  - unless feature_project_list_filter_bar
29
30
31
    .nav-controls
      = render 'shared/projects/search_form'
      = render 'shared/projects/dropdown'
32
- if feature_project_list_filter_bar
33
  .project-filters
Ezekiel Kigbo's avatar
Ezekiel Kigbo committed
34
    = render 'shared/projects/search_bar', project_tab_filter: project_tab_filter