2011-07-07 16:03:55 +00:00
|
|
|
%li{ :id => "item-#{page.id}", :class => "#{'not-found' if page.not_found? } #{'templatized' if page.templatized?} #{'redirect' if page.redirect?}"}
|
2011-06-25 16:25:31 +00:00
|
|
|
|
|
|
|
- children = can?(:manage, page) ? page.children : page.children.find_all { |p| !p.templatized? }
|
|
|
|
|
|
|
|
- with_children = !children.empty?
|
2011-01-02 22:58:06 +00:00
|
|
|
|
|
|
|
- if not page.index? and with_children
|
2011-07-05 19:03:10 +00:00
|
|
|
= admin_item_toggler(page)
|
|
|
|
|
2010-05-02 23:33:17 +00:00
|
|
|
%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')
|
2010-05-02 23:33:17 +00:00
|
|
|
= l page.updated_at, :format => :short
|
2010-07-21 23:56:42 +00:00
|
|
|
|
2011-06-25 16:25:31 +00:00
|
|
|
- if !page.index_or_not_found? && can?(:manage, page)
|
2010-05-02 23:33:17 +00:00
|
|
|
= 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
|
|
|
|
2011-01-02 22:58:06 +00:00
|
|
|
- if with_children
|
2011-06-26 00:01:11 +00:00
|
|
|
%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'}" }
|
2011-06-25 16:25:31 +00:00
|
|
|
|
|
|
|
= render children
|