<%= form_for(@post) do |f| %> <% if @post.errors.any? %>

<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:

<% end %>
<%= fake_form_field @post, :title do content_tag :h1, @post.title, class: "post_title editable", data: { placeholder: "Post Title", disable_return: "true", disable_toolbar: "true", } end %> <%= fake_form_field @post, :body do content_tag :div, @post.body.html_safe, class: "post_body editable", data: { placeholder: "Post Body", image_upload_path: cache_image_path, image_delete_path: discard_image_path, } end %>
<% if @post.published? %> Written <%= timeago_tag @post.published_at, format: "%B %d, %Y" %> by <% elsif @post.new_record? %> Currently being written by <% else %> Draft last updated <%= timeago_tag @post.updated_at, format: "%B %d, %Y" %> by <% end %> <%= @post.author.send(Proclaim.author_name_method) %>
<%= f.hidden_field :title %> <%= f.hidden_field :body %> <% if @post.published? and not @post.new_record? %> This post has already been published <% else %>
<%= label_tag :publish, "Publish this post" %> <%= check_box_tag :publish, "true", @post.published? %>
<% end %>
<%= f.submit %>
<% end %>