app/views/admin/pages/_page.html.haml in locomotive_cms-0.0.4.beta10 vs app/views/admin/pages/_page.html.haml in locomotive_cms-0.0.4.beta11

- old
+ new

@@ -1,7 +1,9 @@ %li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?}"} - - if not page.index? and not page.children.empty? + - with_children = !page.children.empty? + + - if not page.index? and with_children = image_tag 'admin/list/icons/node_closed.png', :class => 'toggler' %em %strong= link_to truncate(page.title, :length => 80), edit_admin_page_url(page) .more @@ -9,8 +11,8 @@ = l page.updated_at, :format => :short - if not page.index? and not page.not_found? = link_to image_tag('admin/list/icons/trash.png'), admin_page_url(page), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete - - if not page.children.empty? + - if with_children %ul{ :id => "folder-#{page._id}", :class => "folder depth-#{(page.depth || 0) + 1}", :data_url => sort_admin_page_url(page), :style => "display: #{cookies["folder-#{page._id}"] || 'block'}" } = render page.children \ No newline at end of file