Sha256: 0756aae8eef9453ce5bacddcbc4338f5af94971a94399fcaddee9184a82a844a

Contents?: true

Size: 1.4 KB

Versions: 3

Compression:

Stored size: 1.4 KB

Contents

= comfy_admin_partial "comfy/admin/cms/partials/page_form_before", form: form

= form.text_field :label, data: { slugify: @page.new_record? }

- if @page.parent.present?
  = form.text_field :slug, data: { slug: true }, prepend: @page.parent.full_path

- if (options = ::Comfy::Cms::Layout.options_for_select(@site)).present?
  = form.select :layout_id, options, {}, {data: {url: form_fragments_comfy_admin_cms_site_page_path(@site, @page.id.to_i)}, id: "fragments-toggle"}

- if (options = ::Comfy::Cms::Page.options_for_select(@site, @page)).present?
  = form.select :parent_id, options

- if (options = ::Comfy::Cms::Page.options_for_select(@site, @page, nil, 0, false)).present?
  = form.select :target_page_id, [["---- #{t('.select_target_page')} ----", nil]] + options

= comfy_admin_partial "comfy/admin/cms/partials/page_form_inner", form: form

= render "form_fragments", form: form, record: @page

= render "comfy/admin/cms/categories/form", form: form

.row
  .col-sm-10.ml-auto
    = form.check_box :is_published

= comfy_admin_partial "comfy/admin/cms/partials/page_form_after", form: form

= form.form_actions do
  = form.submit t(".preview"), name: "preview", id: nil, class: "btn btn-secondary", data: {disable_with: false}
  = form.submit t(@page.new_record?? ".create" : ".update"), class: "btn btn-primary", data: {disable_with: false}
  = link_to t(".cancel"), comfy_admin_cms_site_pages_path, class: "btn btn-link"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-2.0.2 app/views/comfy/admin/cms/pages/_form.html.haml
comfortable_mexican_sofa-2.0.1 app/views/comfy/admin/cms/pages/_form.html.haml
comfortable_mexican_sofa-2.0.0 app/views/comfy/admin/cms/pages/_form.html.haml