<% content_for :javascript do %> <% end %> <%= form_for(@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.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 %>