Commit e5f93f50 authored by David Pisek's avatar David Pisek Committed by Fatih Acet

Add partials for security nav-item to group-view

This commit adds the partials and logic needed for rendering the new
top-level navigation item within the group-views sidebar.
parent b481e8fc
......@@ -36,8 +36,6 @@
%span
= _('Activity')
= render_if_exists 'groups/sidebar/security_dashboard' # EE-specific
- if group_sidebar_link?(:contribution_analytics)
= nav_link(path: 'analytics#show') do
= link_to group_analytics_path(@group), title: _('Contribution Analytics'), data: { placement: 'right' } do
......@@ -105,6 +103,8 @@
= _('Merge Requests')
%span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count)
= render_if_exists "layouts/nav/ee/security_link" # EE-specific
- if group_sidebar_link?(:kubernetes)
= nav_link(controller: [:clusters]) do
= link_to group_clusters_path(@group) do
......
......@@ -7,7 +7,6 @@ module EE
override :group_overview_nav_link_paths
def group_overview_nav_link_paths
super + %w[
groups/security/dashboard#show
groups/insights#show
]
end
......
- if @group.feature_available?(:security_dashboard)
= nav_link(path: 'groups/security/dashboard#show') do
= link_to group_security_dashboard_path(@group), title: _('Security Dashboard') do
%span= _('Security Dashboard')
= link_to group_security_dashboard_path(@group), title: _('Security') do
.nav-icon-container
= sprite_icon('shield')
%span.nav-item-name
= _('Security')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: 'groups/security/dashboard#show') do
= link_to group_security_dashboard_path(@group), title: _('Security') do
%strong.fly-out-top-item-name
= _('Security')
---
title: Add "Security" as nav-item to group-view sidebar
merge_request: 14639
author:
type: changed
......@@ -81,7 +81,7 @@ describe 'layouts/nav/sidebar/_group' do
it 'is visible' do
render
expect(rendered).to have_link 'Security Dashboard'
expect(rendered).to have_link 'Security'
end
end
......@@ -91,7 +91,7 @@ describe 'layouts/nav/sidebar/_group' do
it 'is not visible' do
render
expect(rendered).not_to have_link 'Security Dashboard'
expect(rendered).not_to have_link 'Security'
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment