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

39 lines
1.2 KiB
Plaintext
Raw Normal View History

2010-01-08 08:05:58 +00:00
<% content_for :secondary do %>
2010-01-08 10:36:36 +00:00
<ul class="list">
2010-01-08 08:05:58 +00:00
<li><%= link_to 'New pages', new_admin_page_path, :class => 'button positive' %></li>
2010-01-08 10:36:36 +00:00
<li><%= link_to 'New component entry', '#' %>
2010-01-08 08:05:58 +00:00
<li><%= link_to 'New root menu snippets', new_admin_snippet_path( :menu => 'root' ), :class => 'button positive' %></li>
</ul>
<% end -%>
2010-01-08 10:36:36 +00:00
<h1>Listing pages: <%= params[:parent] || "root" %></h1>
<table>
<tr>
2009-05-22 06:43:52 +00:00
<th>Name</th>
2010-01-08 10:36:36 +00:00
<th>Title</th>
2009-05-22 06:43:52 +00:00
<th>Layout</th>
<th>Position</th>
<th>Published?</th>
<th>Action</th>
</tr>
<% @pages.each do |page| %>
<tr>
2010-01-08 10:36:36 +00:00
<td><%= link_to page.name, admin_pages_path(:parent => page.name) %></td>
<td><%=h page.title %>
2009-05-22 06:43:52 +00:00
<td><%= page.layout_name %></th>
<td><%= page.position %></td>
<td><%= page.is_published.to_s %></td>
<td>
2010-01-08 10:36:36 +00:00
<%= 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 %>
2009-05-22 06:43:52 +00:00
</td>
</tr>
2009-05-22 06:43:52 +00:00
<% end %>
</table>