Class: NavigatorRails::Decorators::Submenu
- Inherits:
-
Object
- Object
- NavigatorRails::Decorators::Submenu
- Includes:
- Generic
- Defined in:
- lib/navigator_rails/decorators/submenu.rb
Instance Attribute Summary
Attributes included from Generic
Instance Method Summary collapse
Methods included from Generic
#child_count, #children, #children_except, #children_of, #draw, #draw_children, #has_visible_children, included, #resource
Instance Method Details
#template ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/navigator_rails/decorators/submenu.rb', line 5 def template return '' unless has_visible_children <<-LINK_DECORATION.strip_heredoc <li class="dropdown <%= resource.active %>"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><%= resource.content %> <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <%= draw_children %> </ul> </li> LINK_DECORATION end |