This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2009-05-07 17:18:16 +00:00
|
|
|
<h1>Listing pages</h1>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
2009-05-22 06:43:52 +00:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Children</th>
|
|
|
|
<th>Layout</th>
|
|
|
|
<th>Parent</th>
|
|
|
|
<th>Position</th>
|
|
|
|
<th>Published?</th>
|
|
|
|
<th>Action</th>
|
2009-05-07 17:18:16 +00:00
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% @pages.each do |page| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= link_to page.name, admin_page_path(page) %></td>
|
2009-05-22 06:43:52 +00:00
|
|
|
<td><ul>
|
|
|
|
<% page.children.each do |child| %>
|
|
|
|
<li><%= child.name %></li>
|
|
|
|
<% end -%>
|
|
|
|
</td>
|
|
|
|
<td><%= page.layout_name %></th>
|
|
|
|
<td><%= page.parent_page_id %></td>
|
|
|
|
<td><%= page.position %></td>
|
|
|
|
<td><%= page.is_published.to_s %></td>
|
|
|
|
<td>
|
|
|
|
<%= link_to 'Edit', edit_admin_page_path(page) %> |
|
|
|
|
<%= link_to 'Add Child', new_admin_page_path( :parent_page_id => page.id ) %> |
|
|
|
|
<%= link_to 'Destroy', admin_page_path(page), :confirm => 'Are you sure?', :method => :delete %>
|
|
|
|
</td>
|
2009-05-07 17:18:16 +00:00
|
|
|
</tr>
|
2009-05-22 06:43:52 +00:00
|
|
|
|
2009-05-07 17:18:16 +00:00
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
2009-05-22 07:16:22 +00:00
|
|
|
<%= link_to 'New pages', new_admin_page_path, :class => 'button positive' %>
|
|
|
|
<%= link_to 'New root menu snippets', new_admin_snippet_path( :menu => 'root' ), :class => 'button positive' %>
|