engine/app/views/admin/pages/_page.html.haml

23 lines
993 B
Plaintext
Raw Normal View History

%li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?} #{'redirect' if page.redirect?}"}
- children = can?(:manage, page) ? page.children : page.children.find_all { |p| !p.templatized? }
- with_children = !children.empty?
- if not page.index? and with_children
= admin_item_toggler(page)
%em
%strong= link_to truncate(page.title, :length => 80), edit_admin_page_url(page)
2010-07-21 23:56:42 +00:00
.more
%span!= t('.updated_at')
= l page.updated_at, :format => :short
2010-07-21 23:56:42 +00:00
- if !page.index_or_not_found? && can?(:manage, page)
= link_to image_tag('admin/list/icons/trash.png'), admin_page_url(page), :class => 'remove', :confirm => t('admin.messages.confirm'), :method => :delete
2010-07-21 23:56:42 +00:00
- 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 children