% content_for :secondary do %>
<% if (@items.empty? && !@parent_item ) || (!@items.empty? && @items[0].is_home?) %>
- <%= t('admin.new_page') %>
- <%= t('admin.new_link') %>
- <%= t('admin.new_snippet') %>
<% else %>
- <%= link_to t('admin.new_page'), new_admin_page_path( :parent_id => @parent_item.id ), :class => 'button positive' %>
- <%= link_to t('admin.new_link'), new_admin_link_path( :parent_id => @parent_item.id ) %>
- <%= link_to t('admin.new_snippet'), new_admin_snippet_path( :parent_id => @parent_item.id ), :class => 'button positive' %>
<% end %>
<% end -%>
<%= t('admin.list_items') %>: <%= show_parent_items_link unless @parent_item.nil? %>
<% if !Layout.exist_one? %>
<%= t('admin.no_layout') %>: <%= link_to t('create').downcase, new_admin_layout_path %>
<% elsif (@items.empty? && !@parent_item ) %>
<%= t('admin.no_home_page') %>: <%= link_to t('create').downcase, new_admin_home_path(:parent_id => nil) %>
<% else %>
<%= t('admin.class') %> |
<%= t('admin.name') %> |
<%= t('admin.title') %> |
<%= t('admin.position') %> |
<%= t('admin.published?') %> |
<%= t('admin.action') %> |
|
<% @items.each do |item| %>
<%= render :partial => item.class.to_s.downcase, :locals => { :item => item } %>
<% end if @items %>
<% end %>
<%= render :partial => "snippets", :locals => { :snippets => @snippets } %>