|
|
|
- should_display_analytics_pages_in_sidebar = Feature.enabled?(:analytics_pages_under_project_analytics_sidebar, @project, default_enabled: true)
|
|
|
|
|
|
|
|
.nav-sidebar{ class: ("sidebar-collapsed-desktop" if collapsed_sidebar?) }
|
|
|
|
.nav-sidebar-inner-scroll
|
|
|
|
- can_edit = can?(current_user, :admin_project, @project)
|
| ... | ... | @@ -10,9 +8,7 @@ |
|
|
|
.sidebar-context-title
|
|
|
|
= @project.name
|
|
|
|
%ul.sidebar-top-level-items.qa-project-sidebar
|
|
|
|
- paths = sidebar_projects_paths
|
|
|
|
- paths << 'cycle_analytics#show' unless should_display_analytics_pages_in_sidebar
|
|
|
|
= nav_link(path: paths, html_options: { class: 'home' }) do
|
|
|
|
= nav_link(path: sidebar_projects_paths, html_options: { class: 'home' }) do
|
|
|
|
= link_to project_path(@project), class: 'shortcuts-project rspec-project-link', data: { qa_selector: 'project_link' } do
|
|
|
|
.nav-icon-container
|
|
|
|
= sprite_icon('home')
|
| ... | ... | @@ -39,17 +35,8 @@ |
|
|
|
%span= _('Releases')
|
|
|
|
|
|
|
|
|
|
|
|
- unless should_display_analytics_pages_in_sidebar
|
|
|
|
- if can?(current_user, :read_cycle_analytics, @project)
|
|
|
|
= nav_link(path: 'cycle_analytics#show') do
|
|
|
|
= link_to project_cycle_analytics_path(@project), title: _('Value Stream'), class: 'shortcuts-project-cycle-analytics' do
|
|
|
|
%span= _('Value Stream')
|
|
|
|
|
|
|
|
= render_if_exists 'layouts/nav/project_insights_link'
|
|
|
|
|
|
|
|
|
|
|
|
- if project_nav_tab? :files
|
|
|
|
= nav_link(controller: sidebar_repository_paths, unless: -> { should_display_analytics_pages_in_sidebar && current_path?('projects/graphs#charts') }) do
|
|
|
|
= nav_link(controller: sidebar_repository_paths, unless: -> { current_path?('projects/graphs#charts') }) do
|
|
|
|
= link_to project_tree_path(@project), class: 'shortcuts-tree qa-project-menu-repo' do
|
|
|
|
.nav-icon-container
|
|
|
|
= sprite_icon('doc-text')
|
| ... | ... | @@ -90,11 +77,6 @@ |
|
|
|
= link_to project_compare_index_path(@project, from: @repository.root_ref, to: current_ref) do
|
|
|
|
= _('Compare')
|
|
|
|
|
|
|
|
- unless should_display_analytics_pages_in_sidebar
|
|
|
|
= nav_link(path: 'graphs#charts') do
|
|
|
|
= link_to charts_project_graph_path(@project, current_ref) do
|
|
|
|
= _('Charts')
|
|
|
|
|
|
|
|
= render_if_exists 'projects/sidebar/repository_locked_files'
|
|
|
|
|
|
|
|
- if project_nav_tab? :issues
|
| ... | ... | @@ -178,7 +160,7 @@ |
|
|
|
= number_with_delimiter(@project.open_merge_requests_count)
|
|
|
|
|
|
|
|
- if project_nav_tab? :pipelines
|
|
|
|
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], unless: -> { should_display_analytics_pages_in_sidebar && current_path?('projects/pipelines#charts') }) do
|
|
|
|
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts], unless: -> { current_path?('projects/pipelines#charts') }) do
|
|
|
|
= link_to project_pipelines_path(@project), class: 'shortcuts-pipelines qa-link-pipelines rspec-link-pipelines', data: { qa_selector: 'ci_cd_link' } do
|
|
|
|
.nav-icon-container
|
|
|
|
= sprite_icon('rocket')
|
| ... | ... | @@ -215,12 +197,6 @@ |
|
|
|
%span
|
|
|
|
= _('Schedules')
|
|
|
|
|
|
|
|
- if !should_display_analytics_pages_in_sidebar && @project.feature_available?(:builds, current_user) && !@project.empty_repo?
|
|
|
|
= nav_link(path: 'pipelines#charts') do
|
|
|
|
= link_to charts_project_pipelines_path(@project), title: _('Charts'), class: 'shortcuts-pipelines-charts' do
|
|
|
|
%span
|
|
|
|
= _('Charts')
|
|
|
|
|
|
|
|
= render_if_exists 'layouts/nav/sidebar/project_security_link' # EE-specific
|
|
|
|
|
|
|
|
- if project_nav_tab? :operations
|
| ... | ... | @@ -426,13 +402,6 @@ |
|
|
|
= link_to project_network_path(@project, current_ref), title: _('Network'), class: 'shortcuts-network' do
|
|
|
|
= _('Graph')
|
|
|
|
|
|
|
|
- unless should_display_analytics_pages_in_sidebar
|
|
|
|
-# Shortcut to Repository > Charts (formerly, top-nav item "Graphs")
|
|
|
|
- unless @project.empty_repo?
|
|
|
|
%li.hidden
|
|
|
|
= link_to charts_project_graph_path(@project, current_ref), title: _('Charts'), class: 'shortcuts-repository-charts' do
|
|
|
|
= _('Charts')
|
|
|
|
|
|
|
|
-# Shortcut to Issues > New Issue
|
|
|
|
- if project_nav_tab?(:issues)
|
|
|
|
%li.hidden
|
| ... | ... | |
| ... | ... | |