<%= content_tag :header, as: "Post.Header", href: admin_post_image_path(@post), method: 'POST' do |header| %> <% if @post.header? %> <% header[:style] = "background-image: url(#{@post.header.url});" %> <% end %>
<%= content_tag :svg, method: 'DELETE', href: admin_post_image_path(@post), class: %w(clear), version: "1.1", xmlns: "http://www.w3.org/2000/svg", 'xmlns:xlink' => "http://www.w3.org/1999/xlink", x: "0px", y: "0px", viewBox: "0 0 20 20", 'enable-background' => "new 0 0 20 20", 'xml:space' => "preserve" do |svg| %> <% if !@post.header? %> <% svg.css << 'hidden' %> <% end %> <% end %> <%= link_to @post.title, admin_post_titles_path(@post), remote: true, class: %w(title) %>

Set a header image. Either drop an image here or select an image.

<% end %>
<%= content_tag :div, class: %w(publish state), href: admin_post_path(@post.id), as: 'Post.Sticky' do %> <% if @post.published? %> <%= form_for @post, method: :put, html: { class: %w(hide button destroy) } do |f| %> <%= f.button 'Retract', value: 'unpublish'%> <% end %> <% else %> <%= form_for @post, method: :put, html: { id: 'PublishPost', class: %w(button publish) } do |f| %> <%= f.button 'Publish', value: 'publish'%> <% end %> <%= form_for @post, method: :delete, html: { id: 'DeletePost', class: %w(destroy button), as: 'Post.Delete' } do |f| %> <%= f.button disabled: true do %> <%= check_box_tag 'delete' %> Delete this post <% end %> <% end %> <% end %> <% end %>
    <% @post.tags.each do |tag| %> <%= render 'admin/posts/tags/tag', tag: tag, post: @post %> <% end %> <%= link_to "Add tags", admin_post_tags_path(@post), remote: true %>
<%= post_edit_content(@post) %>
<%= form_for @post, method: :put, remote: true, html: {as: 'Editor.Save', class: %w(save button)} do |f| %> <%= f.button '', dirty: 'Update', persisted: 'Up to date', disabled: true %> <%= content_tag :div, class: %w(update) do %> Last updated <%= content_tag :p, nil, time: @post.updated_at.iso8601 %> <% end %> <% end %> <%= link_to 'Syntax', help_admin_posts_path, remote: true, class: %w(help), as: 'Post.Documentation' %> <% unless Rails.application.secrets.has_key?(:s3) %>
<%= link_to 'Configure S3 to upload images.', admin_configurations_images_path %>
<% end %>