Sha256: 52b97dfb169582a9d2ee1e508d2247d9a6d8702467f7abc345bc6e6ad2102dac

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

= effective_form_with(model: post, url: post.persisted? ? effective_posts.admin_post_path(post.id) : effective_posts.admin_posts_path) 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, (EffectivePosts.categories.first || 'posts')

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

  = f.datetime_field :published_at, label: 'Publish date', hint: 'When should this be displayed on the website.'

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

  = f.editor :body, delta: false

  - if defined?(EffectiveRoles) and f.object.respond_to?(:roles) && EffectivePosts.use_effective_roles
    = f.checks :roles, EffectiveRoles.roles_collection(f.object), hint: '* leave blank for a regular public post that anyone can view'

  = f.submit do
    = f.save 'Save'
    - if EffectivePosts.use_fullscreen_editor
      = f.save 'Save and Edit Content'
    = f.save 'Save and Add New'
    = f.save 'Save and Duplicate'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_posts-1.0.1 app/views/admin/posts/_form.html.haml
effective_posts-1.0.0 app/views/admin/posts/_form.html.haml