Sha256: 9aacdb47c72eb85ead56f551e3e33c78bda39e65a3e83f44f329460779419d79

Contents?: true

Size: 1.02 KB

Versions: 17

Compression:

Stored size: 1.02 KB

Contents

<%# this is pretty bad code - need to rethink this one -%>
<%
  css = []
  css << "selected" if selected_page?(page) or descendant_page_selected?(page)
  css << "first" if position == 0
  css << "last" if position == (siblings ||= page.shown_siblings).size
  domid = "#{page.title.gsub(" ", "_").downcase}_item" unless page.title.blank?

   if page.in_menu?
-%>
<li<%= " class='#{css.join(' ')}'" unless css.blank? -%><%= " id='#{domid}'" unless domid.blank? -%>>
  <%= link_to page.title, page.url %>
  <% unless hide_children or (children = page.children.collect{|c| c if c.in_menu? }.compact).empty? %>
    <ul class='clearfix'>
      <% children.each do |child| -%>
        <% shown_siblings = child.shown_siblings %>
        <%= render :partial => '/shared/menu_branch', :locals => {
          :page => child,
          :position => page.children.index(child),
          :root => false,
          :siblings => shown_siblings,
          :hide_children => hide_children
        } -%>
      <% end %>
    </ul>
  <% end %>
</li>
<% end -%>

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
refinerycms-0.9.5.30 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.29 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.28 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.27 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.26 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.25 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.24 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.23 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.22 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.21 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.20 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.19 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.18 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.17 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.16 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.15 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb
refinerycms-0.9.5.14 vendor/plugins/refinery/app/views/shared/_menu_branch.html.erb