<%= render 'js' %> <%= form_for([:admin, @post]) do |f| %> <% if @post.errors.any? %>

<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:

<% end %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.fields_for :contents do |builder| %> <%= render "content_fields", :f => builder %> <% end %>

<%= link_to_add_contents "Add Content", f, :contents %>

<%#= f.label :contents %>
<%= f.label :template %> <%= f.text_field :template %>
<%= f.label :layout %> <%= f.select(:layout, ["application", "2-cols-right", "2-cols-left", "3-cols"]) %>
<%= f.label :categories %> <%= collection_select('post', 'category_ids', Category.find(:all), :id, :title, {}, {:multiple => true, :name =>'post[category_ids][]' } ) %>
<%= f.label :parent_id %> <%= f.select(:parent_id, [['','']]+Post.all.map { |i| [i.title, i.id] }, :class => 'ci-select-limited-width') %>
<%= f.label :show_nav %> <%= f.select(:show_nav, ["0", "1"]) %>
<%= f.submit %>
<% end %>