7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/simple_navigation_renderers/bootstrap.rb', line 7
def render( item_container )
if skip_if_empty? && item_container.empty?
''
else
list_content = with_bootstrap_configs do
item_container.items.inject([]) do |list, item|
list << SimpleNavigationRenderers::RenderedItem.new( self, item, item_container.level, options[:bv] ).to_s
end.join
end
item_container.dom_class = [ item_container.dom_class, container_class(item_container.level) ].flatten.compact.join(' ')
content_tag(:ul, list_content, {id: item_container.dom_id, class: item_container.dom_class})
end
end
|