%= form_for resource, as: :post, validate: true do |f| %>
<%= transit_toolbar(resource) do %>
<% unless resource.new_record %>
<% end %>
<% unless resource.new_record? %>
-
<%= f.check_box :published, class: 'toggle_button', data: { 'ui-icon' => 'ui-icon-star' } %>
<%= f.label :published %>
-
<%= toolbar_button('Delete This Post', polymorphic_path(resource), method: :delete, class: 'ui-icon-red', icon: 'closethick') %>
<% 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 } %>