Sha256: ffb30184af973ee7028e050ee0591bc2ae74ce92b9b5bd39b1e7b61567f1eb13

Contents?: true

Size: 1.2 KB

Versions: 7

Compression:

Stored size: 1.2 KB

Contents

= simple_form_for(post, (EffectivePosts.simple_form_options || {}).merge(url: (post.persisted? ? effective_posts.post_path(post.id) : effective_posts.posts_path))) do |f|
  = f.input :title, hint: 'The title of your post.'

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

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

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

  = f.input :body,
    as: (defined?(EffectiveFormInputs) ? :effective_ckeditor_text_area : :text),
    hint: 'The body of your post. You can add content here, or with the full screen editor on the next page.',
    toolbar: 'simple',
    required: true

  %p.effective-post-actions.pull-right
    = f.button :submit, 'Save', data: { disable_with: 'Saving...' }
    = link_to 'Cancel', effective_posts.posts_path

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
effective_posts-0.5.7 app/views/effective/posts/_form.html.haml
effective_posts-0.5.6 app/views/effective/posts/_form.html.haml
effective_posts-0.5.5 app/views/effective/posts/_form.html.haml
effective_posts-0.5.4 app/views/effective/posts/_form.html.haml
effective_posts-0.5.3 app/views/effective/posts/_form.html.haml
effective_posts-0.5.2 app/views/effective/posts/_form.html.haml
effective_posts-0.5.1 app/views/effective/posts/_form.html.haml