Sha256: ff57802ddf1b6f9cb03bfaf4077e250f7fa0512a25b7d9b9daceadde97c0d2dc
Contents?: true
Size: 1.65 KB
Versions: 8
Compression:
Stored size: 1.65 KB
Contents
= effective_form_with(model: [:admin, post], engine: true) do |f| = f.text_field :title, hint: 'The title of your post.' - if Array(EffectivePosts.categories).length > 1 = f.select :category, EffectivePosts.categories - else = f.hidden_field :category, value: (EffectivePosts.categories.first || 'posts') = acts_as_published_fields(f) = acts_as_slugged_fields(f, url: (effective_posts.post_url(f.object) rescue nil)) - if EffectivePosts.use_description = f.text_field :description, label: "Meta description", input_html: { maxlength: 150 }, hint: "150 character summary that appears on Google search result pages." - if EffectivePosts.use_active_storage = f.file_field :image, label: "Image preview", hint: "Optional. Shown on the posts index and post pages. Dimensions are 220px tall and 350px wide." - if EffectivePosts.use_excerpt - if defined?(EffectiveArticleEditor) = f.article_editor :excerpt, hint: 'Will be used for the post excerpt on index pages. Leave blank to use the body instead.' - else = f.rich_text_area :excerpt, hint: 'Will be used for the post excerpt on index pages. Leave blank to use the body instead.' - if defined?(EffectiveArticleEditor) = f.article_editor :body - else = f.rich_text_area :body = render partial: '/effective/posts/additional_fields', locals: { post: post, form: f, f: f } - if EffectivePosts.use_effective_roles = render partial: '/admin/posts/roles', locals: { post: post, form: f, f: f } = f.submit do = f.save 'Save' = f.save 'Save and View', class: 'btn btn-secondary' - if f.object.persisted? = f.save 'Duplicate', class: 'btn btn-info'
Version data entries
8 entries across 8 versions & 1 rubygems