Sha256: 87aee98f186a3b6d903c515f35667efdec3466997bf4fec3214e2896550ad373

Contents?: true

Size: 1.96 KB

Versions: 4

Compression:

Stored size: 1.96 KB

Contents

%h3.head Post Images
.well
  = form_for([@post, @post.images.build], :html => { :multipart => true }) do |f|
    .custom-upload
      %input{:name => "image[image]", :type => "file"}
      .fake-file
        %input{:disabled => "disabled"}
    = f.submit :class => "btn btn-small", :value => "Upload Image"
  - unless @post.images.empty?
    .images
      - @post.images.each do |image|
        - if image.id
          - unless image.thumb.nil?
            .image-thumb
              = image_tag image.thumb.url
              %p.centered
                %a{ :href => "#add", :class => "add-photo", "data-image" => image.image.url } Add To Post
                -#%a{ :class => "close"} ×
%h3.head Post Editor
.well
  = form_for @post do |f|
    - if @post.errors.any?
      #error_explanation.well
        %h4
          = pluralize(@post.errors.count, "error")
          prohibited this post from being saved:
        %ul
          - @post.errors.full_messages.each do |msg|
            %li= msg
    .row-fluid
      .span6
        .field
          = f.label :title, "Post Title"
          = f.text_field :title, :placeholder => "Title is required."
      .span6
        .field
          = f.label :written_at, "Timestamp"
          = f.text_field :written_at, :class => "datepicker"
    .field
      = f.label :slug, "Post Slug"
      = f.text_field :slug, :placeholder => "Auto-filled"
    .field
      = f.label :excerpt, "Excerpt"
      = f.text_area :excerpt, :placeholder => "This is where you can put a summary of your post. You can use Markdown here. It's not required.", :rows => 2
    .field
      = f.label :body, "Main Content"
      = f.text_area :body, :placeholder => "This is where your post goes. You can use markdown here."
    .field
      = f.label :tag_list, "Tags"
      = f.text_field :tag_list, :placeholder => "Comma-separated tags."
    %label.checkbox
      = f.check_box :published
      = f.label :published, "Publish"
    .actions
      = f.submit :class => "btn btn-primary"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
almanac-0.5.3 app/views/almanac/posts/_form.html.haml
almanac-0.5.2 app/views/almanac/posts/_form.html.haml
almanac-0.5.1 app/views/almanac/posts/_form.html.haml
almanac-0.5.0 app/views/almanac/posts/_form.html.haml