Sha256: 109237a0645bfcaec24d62d7659b5daed3462593a9d349415f3f6a589b090734

Contents?: true

Size: 906 Bytes

Versions: 11

Compression:

Stored size: 906 Bytes

Contents

- if root && page.level == 0
  - children = [page]
- else
  - children = Concen::Page.where(:parent_id => page.id).asc(:position)
%ul{:class => children.first.level == 0 && "pages", :data => {:level => children.first.level}}
  - for child in children
    %li{:data => {:id => "page-#{child.id}"}}
      %p
        %span.handle
        = link_to child.title, edit_concen_page_path(child), :class => "title"
        = link_to "Add", new_concen_page_path(:level => child.level + 1, :parent_id => child.id), :class => "link-button hidden"
        = link_to "Edit", edit_concen_page_path(child), :class => "link-button hidden"
        = link_to "Delete", concen_page_path(child), :method => :delete, :confirm => "Are you sure?", :class => "link-button hidden"
      - if Concen::Page.where(:parent_id => child.id).count > 0
        = render :partial => "nested_list", :locals => {:page => child, :root => false}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
concen-0.2.2 app/views/concen/pages/_nested_list.html.haml
concen-0.2.1 app/views/concen/pages/_nested_list.html.haml
concen-0.2.0 app/views/concen/pages/_nested_list.html.haml
concen-0.1.7 app/views/concen/pages/_nested_list.html.haml
concen-0.1.6 app/views/concen/pages/_nested_list.html.haml
concen-0.1.5 app/views/concen/pages/_nested_list.html.haml
concen-0.1.4 app/views/concen/pages/_nested_list.html.haml
concen-0.1.3 app/views/concen/pages/_nested_list.html.haml
concen-0.1.2 app/views/concen/pages/_nested_list.html.haml
concen-0.1.1 app/views/concen/pages/_nested_list.html.haml
concen-0.1 app/views/concen/pages/_nested_list.html.haml