2021-07-15 12:09:01 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Sidebars
|
|
|
|
module Groups
|
|
|
|
class Panel < ::Sidebars::Panel
|
2021-07-19 15:09:40 +00:00
|
|
|
override :configure_menus
|
|
|
|
def configure_menus
|
|
|
|
set_scope_menu(Sidebars::Groups::Menus::ScopeMenu.new(context))
|
2021-07-15 12:09:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
override :render_raw_menus_partial
|
|
|
|
def render_raw_menus_partial
|
|
|
|
'layouts/nav/sidebar/group_menus'
|
|
|
|
end
|
|
|
|
|
|
|
|
override :aria_label
|
|
|
|
def aria_label
|
|
|
|
context.group.subgroup? ? _('Subgroup navigation') : _('Group navigation')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2021-07-21 21:10:10 +00:00
|
|
|
|
|
|
|
Sidebars::Groups::Panel.prepend_mod_with('Sidebars::Groups::Panel')
|