Sha256: 5660e5d80791a8141c3c688f0746a9702412f82ea29389b51e7293253f3e421e

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

%div.container-fluid
  %h1 All Pages

  = link_to 'New Page', admin_pages_path(page: {title: "my page #{PagesCms::Page.last.id.to_i+1}"}), method: :post, class: 'btn btn-default'

  %table.table
    %thead
      %tr
        %th
          Page
        %th
          SubPage
        %th
          Actions

    - @pages.each do |page|
      %tr
        %td
          = page.title
        %td
           
        %td
          = link_to 'edit', edit_admin_page_path(page), class: 'btn btn-default btn-xs'
          = link_to 'show', slugged_path(page), class: 'btn btn-default btn-xs'
          = link_to 'delete', admin_page_path(page), method: :delete, class: 'btn btn-default btn-xs'
      - if page.children.exists?
        - page.children.each do |subpage|
          %tr
            %td
               
            %td
              = subpage.title
            %td
              = link_to 'edit', edit_admin_page_path(subpage), class: 'btn btn-default btn-xs'
              = link_to 'show', slugged_path(subpage), class: 'btn btn-default btn-xs'
              = link_to 'delete', admin_page_path(subpage), method: :delete, class: 'btn btn-default btn-xs'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pages_cms-1.1.0 app/views/pages_cms/admin/pages/index.html.haml