Module: Decidim::Admin::MenuHelper
- Defined in:
- app/helpers/decidim/admin/menu_helper.rb
Overview
This module includes helpers to manage menus in admin layout
Instance Method Summary collapse
-
#main_menu ⇒ Object
Public: Returns the main menu presenter object.
- #sidebar_menu(target_menu) ⇒ Object
- #simple_menu(target_menu:, options: {}) ⇒ Object
Instance Method Details
#main_menu ⇒ Object
Public: Returns the main menu presenter object
8 9 10 11 12 13 14 15 |
# File 'app/helpers/decidim/admin/menu_helper.rb', line 8 def @main_menu ||= ::Decidim::MenuPresenter.new( :admin_menu, self, active_class: "is-active", label: t("layouts.decidim.header.main_menu") ) end |
#sidebar_menu(target_menu) ⇒ Object
17 18 19 |
# File 'app/helpers/decidim/admin/menu_helper.rb', line 17 def () ::Decidim::Admin::SecondaryMenuPresenter.new(, self, active_class: "is-active") end |
#simple_menu(target_menu:, options: {}) ⇒ Object
21 22 23 24 |
# File 'app/helpers/decidim/admin/menu_helper.rb', line 21 def (target_menu:, options: {}) = { active_class: "is-active" }.merge() ::Decidim::Admin::SimpleMenuPresenter.new(, self, ) end |