<%= form_for [refinery, :pods_admin, @pod] do |f| -%> <%= render '/refinery/admin/error_messages', :object => @pod, :include_object_name => true %> <%= hidden_field_tag 'pod[page_ids][]' %>
<%= f.label :pod_type -%> <%= f.select :pod_type, ::Refinery::Pods::Pod::POD_TYPES, {:include_blank => true} %>
<%= f.label :name -%> <%= f.text_field :name, :class => 'larger widest' -%>
<% [: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 '/refinery/admin/image_picker', :f => f, :field => :image_id, :image => @pod.image, :toggle_image_display => false %>
<%= f.label :portfolio_entry_id, 'Gallery' -%> <%= f.collection_select :portfolio_entry_id, ::Refinery::Portfolio::Gallery.order(:title), :id , :title, {:prompt => "-- Please select when relevant --"}, {} -%>
<%= f.label :video_id -%> <%= f.collection_select :video_id, ::Refinery::Videos::Video.order(:name), :id , :name, {:prompt => "-- Please select when relevant --"}, {} -%>
<%= f.label :pages %> <% ::Refinery::Page.all.each do |page| %>
<%= check_box_tag "pod[page_ids][]", page.id, @pod.pages.include?(page) %> <%= page.title %>
<% end %>
<%= render '/refinery/admin/form_actions', :f => f, :continue_editing => false, :delete_title => t('delete', :scope => 'refinery.pods.admin.pods.pod'), :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @pod.name) %> <% end -%> <% content_for :javascripts do %> <% end %>