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-05-10 05:10:28 -04:00
|
|
|
set_hidden_menu(Sidebars::Projects::Menus::HiddenMenu.new(context))
|
2021-05-14 14:10:34 -04:00
|
|
|
add_menus
|
|
|
|
end
|
|
|
|
|
|
|
|
override :aria_label
|
|
|
|
def aria_label
|
|
|
|
_('Project navigation')
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
2021-04-15 11:09:11 -04:00
|
|
|
|
2021-05-14 14:10:34 -04:00
|
|
|
def add_menus
|
2021-05-07 14:10:21 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::ProjectInformationMenu.new(context))
|
2021-04-23 08:09:52 -04:00
|
|
|
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))
|
2021-10-18 20:10:29 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::ZentaoMenu.new(context)) if ::Integrations::Zentao.feature_flag_enabled?(context.project)
|
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-05-14 14:10:34 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::DeploymentsMenu.new(context))
|
2021-05-18 11:10:46 -04:00
|
|
|
add_menu(Sidebars::Projects::Menus::MonitorMenu.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))
|
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
|
|
|
|
|
2021-05-06 08:10:38 -04:00
|
|
|
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
|
|
|
|
2021-05-11 17:10:21 -04:00
|
|
|
Sidebars::Projects::Panel.prepend_mod_with('Sidebars::Projects::Panel')
|