Sha256: d7b6e884ff86d69b3cc974d484310c8ff48d46aaa2726b2fcf010d3386082677
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 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 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: '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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
effective_posts-0.5.0 | app/views/effective/posts/_form.html.haml |
effective_posts-0.4.7 | app/views/effective/posts/_form.html.haml |