<%= form_for resource, as: :post, validate: true do |f| %> <%= transit_toolbar(resource) do %>
    <% unless resource.new_record %> <% end %>
  1. Post Date <%= f.date_select :post_date, { order: [:month, :day, :year], use_short_month: true } %>
  2. <% unless resource.new_record? %>
  3. <%= f.check_box :published, class: 'toggle_button', data: { 'ui-icon' => 'ui-icon-star' } %> <%= f.label :published %>
  4. <%= toolbar_button('Delete This Post', polymorphic_path(resource), method: :delete, class: 'ui-icon-red', icon: 'closethick') %>
  5. <% end %>
<%= f.hidden_field(:user, value: current_user.id) if resource.delivers?(:owner) %> <% end %>
<%= render partial: 'transit/posts/fields/title', locals: { form: f } %> <%= render template: 'transit/contexts/index', locals: { form: f } %>
<% if resource.delivers?(:topics) %> <%= render(partial: 'transit/topics/model', locals: { form: f }) %> <% end %> <% if resource.delivers?(:assets) %> <%= render(partial: 'transit/assets/model', locals: { form: f }) %> <% end %> <%= f.button %> <% end %> <%= text_field_tag :datepicker_holder, resource.post_date.strftime('%Y-%m-%d'), rel: 'post_post_date', data: { 'calendar-link' => "#post_date_menu" } %>