%= form_for [:admin, @pod] do |f| -%>
<%= render :partial => "/shared/admin/error_messages", :locals => {
:object => @pod,
:include_object_name => true
} %>
<%= hidden_field_tag 'pod[page_ids][]' %>
<%= f.label :pod_type -%>
<%#= f.collection_select :pod_type_id, PodType.order(:name), :id , :name, {:prompt => "-- Please select --"}, {} -%>
<%= f.select :pod_type, Pod::POD_TYPES, {:include_blank => true} %>
<%= f.label :name -%>
<%= f.text_field :name, :class => 'larger widest' -%>
<% [:body].each_with_index do |part, part_index| %>
- '>
<%= link_to part.to_s.titleize, "##{part}" %>
<% end %>
<% [:body].each do |part| %>
<%= f.text_area part, :rows => 20, :class => 'wymeditor widest' -%>
<% end %>
<%= f.label :url -%>
<%= f.text_field :url -%>
<%= f.label :image -%>
<%= render :partial => "/shared/admin/image_picker", :locals => {
:f => f,
:field => :image_id,
:image => @pod.image,
:toggle_image_display => false
} %>
<%= f.label :portfolio_entry_id, 'Gallery' -%>
<%= f.collection_select :portfolio_entry_id, PortfolioEntry.order(:title), :id , :title, {:prompt => "-- Please select when relevant --"}, {} -%>
<%= f.label :video_id -%>
<%= f.collection_select :video_id, Video.order(:name), :id , :name, {:prompt => "-- Please select when relevant --"}, {} -%>
<%= f.label :pages %>
<% for page in Page.find(:all) %>
<%= check_box_tag "pod[page_ids][]", page.id, @pod.pages.include?(page) %>
<%= page.title %>
<% end %>
<%= render :partial => "/shared/admin/form_actions",
:locals => {
:f => f,
:continue_editing => false,
:delete_title => t('delete', :scope => 'admin.pods.pod'),
:delete_confirmation => t('message', :scope => 'shared.admin.delete', :title => @pod.name)
} %>
<% end -%>
<% content_for :javascripts do %>
<% end %>