Sha256: 2a4fc6edc88282e8651ad22e640246747a6381e74dddc5c379fe727f469d8112
Contents?: true
Size: 973 Bytes
Versions: 2
Compression:
Stored size: 973 Bytes
Contents
- if root && page.level == 0 - children = [page] - else - children = Concen::Page.where(:parent_id => page.id).asc(:position) %ul{:class => children.first.level == 0 && "pages", :data => {:level => children.first.level}} - for child in children %li{:data => {:id => "page-#{child.id}"}} %p{:class => "#{'author' if child.authors_as_user.map(&:_id).include? current_concen_user.id}"} %span.handle = link_to child.title, edit_concen_page_path(child), :class => "title" = link_to "Add", new_concen_page_path(:parent_id => child.id), :class => "link-button hidden" = link_to "Edit", edit_concen_page_path(child), :class => "link-button hidden" = link_to "Delete", concen_page_path(child), :method => :delete, :confirm => "Are you sure?", :class => "link-button hidden" - if Concen::Page.where(:parent_id => child.id).count > 0 = render :partial => "nested_list", :locals => {:page => child, :root => false}
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
concen-0.2.4 | app/views/concen/pages/_nested_list.html.haml |
concen-0.2.3 | app/views/concen/pages/_nested_list.html.haml |