Module: Sidebars::Concerns::SuperSidebarPanel
- Included in:
- Groups::SuperSidebarPanel, Organizations::Panel, Organizations::SuperSidebarPanel, Projects::SuperSidebarPanel
- Defined in:
- lib/sidebars/concerns/super_sidebar_panel.rb
Overview
Contains helper methods aid conversion of a “normal” panel into a Super Sidebar Panel
Instance Method Summary collapse
-
#pick_from_old_menus(old_menus) ⇒ Object
Picks menus from a list and adds them to the current menu list if they should be picked into the super sidebar.
- #transform_old_menus(current_menus, *old_menus) ⇒ Object
Instance Method Details
#pick_from_old_menus(old_menus) ⇒ Object
Picks menus from a list and adds them to the current menu list if they should be picked into the super sidebar
10 11 12 13 14 15 16 17 |
# File 'lib/sidebars/concerns/super_sidebar_panel.rb', line 10 def () .select! do || next true unless . () false end end |
#transform_old_menus(current_menus, *old_menus) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/sidebars/concerns/super_sidebar_panel.rb', line 19 def (, *) .each do || next unless .render? .renderable_items.each { |item| (, item) } = . next if .nil? ( , ::::MenuItem.new(**) ) end end |