2021-04-12 08:09:15 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Sidebars
|
|
|
|
module Projects
|
|
|
|
class Panel < ::Sidebars::Panel
|
2021-04-14 11:09:04 -04:00
|
|
|
override :configure_menus
|
|
|
|
def configure_menus
|
2021-04-23 08:09:52 -04:00
|
|
|
set_scope_menu(Sidebars::Projects::Menus::ScopeMenu.new(context))
|
2021-04-15 11:09:11 -04:00
|
|
|
|
2021-04-23 08:09:52 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::ProjectOverviewMenu.new(context))
|
|
|
|
add_menu(Sidebars::Projects::Menus::LearnGitlabMenu.new(context))
|
|
|
|
add_menu(Sidebars::Projects::Menus::RepositoryMenu.new(context))
|
2021-04-26 08:09:44 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::IssuesMenu.new(context))
|
2021-04-27 08:10:12 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::ExternalIssueTrackerMenu.new(context))
|
|
|
|
add_menu(Sidebars::Projects::Menus::LabelsMenu.new(context))
|
2021-04-28 11:09:35 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::MergeRequestsMenu.new(context))
|
2021-04-29 05:10:11 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::CiCdMenu.new(context))
|
2021-04-29 11:10:07 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::SecurityComplianceMenu.new(context))
|
2021-04-30 11:09:50 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::OperationsMenu.new(context))
|
2021-05-05 14:10:31 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::InfrastructureMenu.new(context))
|
2021-05-04 05:09:59 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::PackagesRegistriesMenu.new(context))
|
2021-05-05 08:10:33 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::AnalyticsMenu.new(context))
|
2021-05-06 08:10:38 -04:00
|
|
|
add_menu(confluence_or_wiki_menu)
|
|
|
|
add_menu(Sidebars::Projects::Menus::ExternalWikiMenu.new(context))
|
2021-05-06 14:10:06 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::SnippetsMenu.new(context))
|
|
|
|
add_menu(Sidebars::Projects::Menus::MembersMenu.new(context))
|
2021-05-07 08:10:27 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::SettingsMenu.new(context))
|
2021-04-12 08:09:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
override :render_raw_menus_partial
|
|
|
|
def render_raw_menus_partial
|
|
|
|
'layouts/nav/sidebar/project_menus'
|
|
|
|
end
|
|
|
|
|
|
|
|
override :aria_label
|
|
|
|
def aria_label
|
|
|
|
_('Project navigation')
|
|
|
|
end
|
2021-05-06 08:10:38 -04:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def confluence_or_wiki_menu
|
|
|
|
confluence_menu = ::Sidebars::Projects::Menus::ConfluenceMenu.new(context)
|
|
|
|
|
|
|
|
confluence_menu.render? ? confluence_menu : Sidebars::Projects::Menus::WikiMenu.new(context)
|
|
|
|
end
|
2021-04-12 08:09:15 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2021-04-27 08:10:12 -04:00
|
|
|
|
|
|
|
Sidebars::Projects::Panel.prepend_if_ee('EE::Sidebars::Projects::Panel')
|