Class: ExpressAdmin::ModuleSidebar
- Inherits:
-
ExpressTemplates::Components::Base
- Object
- ExpressTemplates::Components::Base
- ExpressAdmin::ModuleSidebar
- Defined in:
- app/components/express_admin/module_sidebar.rb
Overview
renders a sidebar partial if one is available otherwise uses menu.yml
Instance Method Summary collapse
Instance Method Details
#build(*args, &block) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/components/express_admin/module_sidebar.rb', line 14 def build(*args, &block) begin render("shared/#{helpers.current_module_path_name}/sidebar") rescue Exception => e super(*args, &block) end end |
#menu_list(list) ⇒ Object
22 23 24 25 26 |
# File 'app/components/express_admin/module_sidebar.rb', line 22 def (list) list.each do |item| (item) end end |
#menu_list_item(item) ⇒ Object
28 29 30 31 32 |
# File 'app/components/express_admin/module_sidebar.rb', line 28 def (item) li { link_to item.title.html_safe, helpers.instance_eval(item.path) } end |