orbit-basic/app/views/admin/pages/index.html.erb

39 lines
1.2 KiB
Plaintext

<% content_for :secondary do %>
<ul class="list">
<li><%= link_to 'New pages', new_admin_page_path, :class => 'button positive' %></li>
<li><%= link_to 'New component entry', '#' %>
<li><%= link_to 'New root menu snippets', new_admin_snippet_path( :menu => 'root' ), :class => 'button positive' %></li>
</ul>
<% end -%>
<h1>Listing pages: <%= params[:parent] || "root" %></h1>
<table>
<tr>
<th>Name</th>
<th>Title</th>
<th>Layout</th>
<th>Position</th>
<th>Published?</th>
<th>Action</th>
</tr>
<% @pages.each do |page| %>
<tr>
<td><%= link_to page.name, admin_pages_path(:parent => page.name) %></td>
<td><%=h page.title %>
<td><%= page.layout_name %></th>
<td><%= page.position %></td>
<td><%= page.is_published.to_s %></td>
<td>
<%= link_to t(:show), page_path(page.name) %> |
<%= link_to t(:edit), edit_admin_page_path(page) %> |
<%= link_to t(:add_chile_page, :scope => :admin), new_admin_page_path( :parent_page_name => page.name ) %> |
<%= link_to t(:delete), admin_page_path(page), :confirm => 'Are you sure?', :method => :delete %>
</td>
</tr>
<% end %>
</table>