Module: LotusAdmin::SidebarHelpers
- Defined in:
- app/helpers/lotus_admin/sidebar_helpers.rb
Instance Method Summary collapse
- #class_for_menu(identifier) ⇒ Object
- #class_for_parent_menu_item(identifier) ⇒ Object
- #sidebar_item(identifier, &block) ⇒ Object
- #sidebar_parent_item(identifier, icon, name, &block) ⇒ Object
Instance Method Details
#class_for_menu(identifier) ⇒ Object
15 16 17 |
# File 'app/helpers/lotus_admin/sidebar_helpers.rb', line 15 def (identifier) return 'active' if .to_s == identifier.to_s end |
#class_for_parent_menu_item(identifier) ⇒ Object
19 20 21 22 23 |
# File 'app/helpers/lotus_admin/sidebar_helpers.rb', line 19 def (identifier) return 'sub-menu active toggled' if == identifier 'sub-menu' end |
#sidebar_item(identifier, &block) ⇒ Object
3 4 5 |
# File 'app/helpers/lotus_admin/sidebar_helpers.rb', line 3 def (identifier, &block) content_tag(:li, class: (identifier), &block) end |
#sidebar_parent_item(identifier, icon, name, &block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/helpers/lotus_admin/sidebar_helpers.rb', line 7 def (identifier, icon, name, &block) content_tag(:li, class: (identifier)) do link_to('#', data: { ma_action: 'submenu-toggle' }) do content_tag(:i, nil, class: "zmdi zmdi-#{ icon }") + name end + capture_haml(&block) end end |