lib/views/partials/_post_form.haml in schnitzelpress-0.0.7 vs lib/views/partials/_post_form.haml in schnitzelpress-0.0.9
- old
+ new
@@ -1,19 +1,18 @@
%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, :body, type: :textarea, placeholder: "Your post's body of text. Markdown formatting available."
- = form_field @post, :summary, placeholder: "An optional summary of your post. Markdown formatting available."
+ = 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", ...'
.four.columns
= form_field @post, :status, type: :dropdown, options: [[:draft, "Draft"], [:published, "Published"]]
- .row
- .buttons.twelve.columns
- %input{ type: 'submit', value: @post.new_record? ? 'Create Post' : 'Update Post' }
+ .buttons
+ %input{ type: 'submit', value: @post.new_record? ? 'Create Post' : 'Update Post' }