2011-11-09 01:35:59 +00:00
|
|
|
- if page.not_found?
|
|
|
|
%li.sep
|
|
|
|
|
|
|
|
%li{ :id => "item-#{page.id}", :class => "page #{css_for_page(page)}" }
|
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)
|
|
|
|
|
2011-11-09 01:35:59 +00:00
|
|
|
.inner
|
|
|
|
|
|
|
|
- unless page.index_or_not_found?
|
|
|
|
%em
|
|
|
|
|
|
|
|
= link_to truncate(page.title, :length => 80), edit_page_url(page)
|
2010-07-21 23:56:42 +00:00
|
|
|
|
2011-11-09 01:35:59 +00:00
|
|
|
.more
|
|
|
|
%span!= t('.updated_at')
|
|
|
|
= l page.updated_at, :format => :short
|
2010-07-21 23:56:42 +00:00
|
|
|
|
2011-11-09 01:35:59 +00:00
|
|
|
- if !page.index_or_not_found? && can?(:manage, page)
|
|
|
|
= link_to image_tag('locomotive/list/icons/trash.png'), page_url(page), :class => 'remove', :confirm => t('locomotive.messages.confirm'), :method => :delete
|
2010-07-21 23:56:42 +00:00
|
|
|
|
2011-01-02 22:58:06 +00:00
|
|
|
- if with_children
|
2011-11-09 01:35:59 +00:00
|
|
|
%ul{ :id => "folder-#{page._id}", :class => "page folder depth-#{(page.depth || 0) + 1}", :'data-url' => sort_page_url(page), :style => "display: #{cookies["folder-#{page._id}"] || 'block'}" }
|
2011-06-25 16:25:31 +00:00
|
|
|
|
|
|
|
= render children
|