Sha256: 773fef9ea887d911d9d02f6a36b9d51c873f9fb704779d039678feeeea8a4b7f

Contents?: true

Size: 1.53 KB

Versions: 9

Compression:

Stored size: 1.53 KB

Contents

= simple_form_for(post, (EffectivePosts.simple_form_options || {}).merge(:url => (post.persisted? ? effective_posts.admin_post_path(post.id) : effective_posts.admin_posts_path))) do |f|
  = f.input :title, :hint => "Give this post a title"

  - if Array(EffectivePosts.categories).length > 0
    = f.input :category, :collection => EffectivePosts.categories, :as => :select, :include_blank => false
  - else
    = f.input :category, :as => :hidden, :input_html => {:value => 'posts'}

  %h4 Publish
  = f.input :draft, :hint => "Save this post as a draft.  It will not be accessible on the website."

  - if defined?(EffectiveFormInputs)
    = f.input :published_at, :as => :effective_date_time_picker, :hint => "Set this to a future date to schedule a post to appear in the future."
  - else
    = f.input :published_at, :hint => "Set this to a future date to schedule a post to appear in the future."

  - if defined?(EffectiveRoles) and f.object.respond_to?(:roles)
    = f.input :roles, :collection => EffectiveRoles.roles_collection(f.object), :as => :check_boxes, :hint => '* leave blank for a regular public post that anyone can view'

  .form-group
    .col-xs-12
      .form-group
        .pull-right
          = f.button :submit, 'Save', data: { disable_with: 'Saving...' }
          - if defined?(EffectiveRegions)
            = f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' }
          = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
          = link_to 'Cancel', effective_posts.admin_posts_path

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
effective_posts-0.4.6 app/views/admin/posts/_form.html.haml
effective_posts-0.4.5 app/views/admin/posts/_form.html.haml
effective_posts-0.4.4 app/views/admin/posts/_form.html.haml
effective_posts-0.4.3 app/views/admin/posts/_form.html.haml
effective_posts-0.4.2 app/views/admin/posts/_form.html.haml
effective_posts-0.4.1 app/views/admin/posts/_form.html.haml
effective_posts-0.4.0 app/views/admin/posts/_form.html.haml
effective_posts-0.3.0 app/views/admin/posts/_form.html.haml
effective_posts-0.2.6 app/views/admin/posts/_form.html.haml