Sha256: 0520e815ee6dfcb21ec520003dfb48f602bcb2f39553c35c666f98156639cedb
Contents?: true
Size: 1.57 KB
Versions: 2
Compression:
Stored size: 1.57 KB
Contents
- page ||= index_branch - children = @pages_by_parent[page.id] - siblings = @pages_by_parent[page.parent_id] - has_children = children.present? - has_siblings = siblings.size > 1 - branch_open = (session[:cms_page_tree] || []).member?(page.id.to_s) || page.root? - category_view = params[:category].present? %li{:id => dom_id(page)} .item .toggle{:class => branch_open ? 'open' : nil} - if !category_view && has_children && !page.root? = link_to toggle_branch_cms_site_page_path(@site, page), :remote => true do %span= t('.toggle') .icon{:class => page.is_published?? 'published' : 'draft'} - if !category_view && has_siblings .dragger %span ⇅ .btn-group = link_to t('.add_child_page'), new_admin_cms_site_page_path(@site, :parent_id => page.id), :class => 'btn btn-small' = link_to t('.edit'), edit_admin_cms_site_page_path(@site, page), :class => 'btn btn-small' = link_to t('.delete'), admin_cms_site_page_path(@site, page), :method => :delete, :data => {:confirm => t('.are_you_sure')}, :class => 'btn btn-small btn-danger' .item-content .item-title = link_to page.label, edit_admin_cms_site_page_path(@site, page), :class => 'item-label' = render :partial => '/admin/cms/categories/categories', :object => page .item-meta = link_to page.url, page.url, :target => '_blank' - if !category_view && has_children && branch_open %ul.children.sortable = render :partial => 'index_branch', :collection => children
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
comfortable_mexican_sofa-1.10.1 | app/views/admin/cms/pages/_index_branch.html.haml |
comfortable_mexican_sofa-1.10.0 | app/views/admin/cms/pages/_index_branch.html.haml |