Sha256: 7a0cc5c1ff96d22f21865915280705262ffc89767b9994f0cc484b7436b4e6e0

Contents?: true

Size: 1.94 KB

Versions: 8

Compression:

Stored size: 1.94 KB

Contents

= simple_form_for(post, (EffectivePosts.admin_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: 'The title of your post.'

  - if Array(EffectivePosts.categories).length > 1
    = f.input :category,
      as: (defined?(EffectiveFormInputs) ? :effective_select : :select),
      collection: EffectivePosts.categories,
      include_blank: false
  - else
    = f.input :category, as: :hidden, input_html: { value: (EffectivePosts.categories.first || 'posts') }

  = render partial: '/effective/posts/additional_fields', locals: { post: post, form: f, f: f }

  = f.input :draft, hint: 'Save this post as a draft.  It will not be accessible on the website.'

  = f.input :published_at,
    as: (defined?(EffectiveFormInputs) ? :effective_date_time_picker : :datetime),
    label: 'Publish date',
    hint: 'When your post will be displayed on the website.'

  = f.input :body,
    as: (defined?(EffectiveFormInputs) ? :effective_ckeditor_text_area : :text),
    hint: 'The body of your post.',
    toolbar: 'full',
    required: true

  - if defined?(EffectiveRoles) and f.object.respond_to?(:roles) && EffectivePosts.use_effective_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-actions.effective-post-actions
    = f.button :submit, 'Save', data: { disable_with: 'Saving...' }, class: 'btn btn-primary'
    - if EffectivePosts.use_fullscreen_editor
      = f.button :submit, 'Save and Edit Content', data: { disable_with: 'Saving...' }, class: 'btn btn-primary'
    = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }, class: 'btn btn-default'
    = f.button :submit, 'Save and Duplicate', data: { disable_with: 'Saving...' }, class: 'btn btn-default'
    = link_to 'Cancel', effective_posts.admin_posts_path

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_posts-0.7.1 app/views/admin/posts/_form.html.haml
effective_posts-0.7.0 app/views/admin/posts/_form.html.haml
effective_posts-0.6.4 app/views/admin/posts/_form.html.haml
effective_posts-0.6.3 app/views/admin/posts/_form.html.haml
effective_posts-0.6.2 app/views/admin/posts/_form.html.haml
effective_posts-0.6.1 app/views/admin/posts/_form.html.haml
effective_posts-0.6.0 app/views/admin/posts/_form.html.haml
effective_posts-0.5.10 app/views/admin/posts/_form.html.haml