%form.post{:action => @post.new_record? ? '/admin/new' : "/admin/edit/#{@post.id}", :method => 'post'} %input{:type => 'hidden', :name => '_method', :value => @post.new_record? ? 'post' : 'put'} = form_field @post, :title, :placeholder => "Title of your post." = form_field @post, :link, :placeholder => "Optional link to external URL." = form_field @post, :summary, :type => :textarea, :rows => 5, :placeholder => "An optional summary of your post. Markdown formatting available." = form_field @post, :body, :type => :textarea, :rows => 20, :placeholder => "Your post's body of text. Markdown formatting available." = form_field @post, :read_more, :label => "'Read More' Link Text", :placeholder => "When supplying a summary text, this will be the link to the full post." .row .four.columns = form_field @post, :slug, :label => 'URL Slug', :placeholder => "Your post's URL slug.", :hint => @post.previous_slugs.any? ? "Previous slugs: #{@post.previous_slugs.join ', '}" : nil .four.columns = form_field @post, :published_at, :placeholder => 'Try "now", "in 3 days", ...' .two.columns = form_field @post, :status, :type => :dropdown, :options => [[:draft, "Draft"], [:published, "Published"]] .two.columns = form_field @post, :disqus .buttons %input{:type => 'submit', :value => @post.new_record? ? 'Create Post' : 'Update Post' }