Sha256: c2bdf7c04bb4db62747ea8d98dc572c9e721091482b861571eac74ac2656167f
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
= form_for(@post, html: { multipart: true }) do |f| - if @post.errors.any? #error_explanation %h3 #{pluralize(@post.errors.count, "error")} prohibited this post from being saved: %ul - @post.errors.full_messages.each do |msg| %li= msg .row .col-md-8 = f.label :title = f.text_field :title, class: "form-control" .col-md-4 = f.label :category = f.select :category_id, Blogr::Category.all.collect {|p| [ p.title, p.id ]}, {include_blank: ""}, class: "form-control" .form-group <label>Permalink</label> .input-group %span.input-group-addon #{Blogr.config.host}<span class="category"></span>/ = f.text_field :permalink, class: "form-control" .form-group #{f.label :content} - #{link_to "Markdown Enabled", "http://whatismarkdown.com", target: '_blank'} - #{link_to "Preview", preview_posts_path, data: { url: preview_posts_path, preview: 1 } } = f.text_area :content, rows: 10, style: "width:100%", class: "form-control" .form-group = f.label :tag_list = f.text_field :tag_list, placeholder: "Tags - seperate by commas", class: "form-control" .row .col-md-4 = f.label :published .checkbox %label #{f.check_box :published} Published .col-md-4 = f.label :publish_at = f.text_field :published_at, class: "datepicker form-control" .form-group{style: "margin-top: 20px"} = f.submit "Submit", class: "btn btn-success" #preview
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blogr-0.0.6 | app/views/blogr/posts/_form.html.haml |