diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 21:09:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-12 21:09:28 +0300 |
commit | ce8a0b90849ac5d1895e741c023432930f24d724 (patch) | |
tree | dbdc97de542cdbe18a2fc8b1a6b64ac0673ed3d3 /app/views/layouts | |
parent | dc889678d1de8c09310b2f8f9742bb6c78a6f1a4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/nav/sidebar/_group.html.haml | 18 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_project.html.haml | 37 |
2 files changed, 5 insertions, 50 deletions
diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index b2fa647b23e..588ee63c56f 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -1,4 +1,3 @@ -- should_display_analytics_pages_in_sidebar = Feature.enabled?(:analytics_pages_under_group_analytics_sidebar, @group, default_enabled: true) - issues_count = group_issues_count(state: 'opened') - merge_requests_count = group_merge_requests_count(state: 'opened') @@ -13,8 +12,7 @@ %ul.sidebar-top-level-items.qa-group-sidebar - if group_sidebar_link?(:overview) - paths = group_overview_nav_link_paths - - paths << 'contribution_analytics#show' unless should_display_analytics_pages_in_sidebar - = nav_link(path: paths, unless: -> { should_display_analytics_pages_in_sidebar && current_path?('groups/contribution_analytics#show') }, html_options: { class: 'home' }) do + = nav_link(path: paths, unless: -> { current_path?('groups/contribution_analytics#show') }, html_options: { class: 'home' }) do = link_to group_path(@group) do .nav-icon-container = sprite_icon('home') @@ -45,19 +43,10 @@ %span = _('Activity') - - unless should_display_analytics_pages_in_sidebar - - if group_sidebar_link?(:contribution_analytics) - = nav_link(path: 'contribution_analytics#show') do - = link_to group_contribution_analytics_path(@group), title: _('Contribution'), data: { placement: 'right', qa_selector: 'contribution_analytics_link' } do - %span - = _('Contribution') - - = render_if_exists 'layouts/nav/group_insights_link' - = render_if_exists "layouts/nav/ee/epic_link", group: @group - if group_sidebar_link?(:issues) - = nav_link(path: group_issues_sub_menu_items, unless: -> { should_display_analytics_pages_in_sidebar && current_path?('issues_analytics#show') }) do + = nav_link(path: group_issues_sub_menu_items, unless: -> { current_path?('issues_analytics#show') }) do = link_to issues_group_path(@group), data: { qa_selector: 'group_issues_item' } do .nav-icon-container = sprite_icon('issues') @@ -84,9 +73,6 @@ %span = boards_link_text - - unless should_display_analytics_pages_in_sidebar - = render_if_exists 'layouts/nav/issues_analytics_link' - - if group_sidebar_link?(:labels) = nav_link(path: 'labels#index') do = link_to group_labels_path(@group), title: _('Labels') do diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index aef9532fd46..d7619799f14 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -1,5 +1,3 @@ -- 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 |