Orbit/app/views/admin/pages/index.html.erb

39 lines
1.0 KiB
Plaintext
Raw Normal View History

<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>
</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>
</tr>
2009-05-22 06:43:52 +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' %>