Sha256: f1aa5d9dfd8cb6cf3cfa43504026e7b5569b8d472bc03a8d9744dd0395daddac
Contents?: true
Size: 1.11 KB
Versions: 8
Compression:
Stored size: 1.11 KB
Contents
<% if !!local_assigns[:apply_css] and (classes = css_for_menu_branch(menu_branch, menu_branch_counter, sibling_count||=nil, collection, selected_item ||= nil)).any? css = "class='#{classes.join(' ')}'" end dom_id = ("id='item_#{menu_branch_counter}'" if menu_branch.parent_id.nil? and menu_branch.title.present?) hide_children = (defined?(hide_children) && hide_children) children = if (hide_children || !menu_branch.has_descendants?) [] else collection.select { |p| p.parent_id == menu_branch.id } end -%> <li<%= ['', css, dom_id].compact.join(' ').gsub(/\ *$/, '') %>> <%= link_to menu_branch.title, menu_branch.url -%> <% if children.present? -%> <ul class='clearfix'> <%= render :partial => "/shared/menu_branch", :collection => children, :locals => { :apply_css => local_assigns[:apply_css], :hide_children => hide_children, :collection => collection, :selected_item => selected_item, :sibling_count => children.size - 1 } -%> </ul> <% end -%> </li>
Version data entries
8 entries across 8 versions & 1 rubygems