Sha256: f8c2f8b8f262da10ef58260662d0e5194a1b6fe45097396e556bed4522a3a153

Contents?: true

Size: 1.49 KB

Versions: 4

Compression:

Stored size: 1.49 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::Page.options_for_select(site: @site, page: @page, exclude_self: true)).present?
  = form.select :parent_id, options

- 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"}

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

#form-fragments-container
  = render "comfy/admin/cms/fragments/form_fragments", record: @page, scope: :page

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

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

= form.check_box :is_published

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-2.0.16 app/views/comfy/admin/cms/pages/_form.html.haml
comfortable_mexican_sofa-2.0.15 app/views/comfy/admin/cms/pages/_form.html.haml
comfortable_mexican_sofa-2.0.14 app/views/comfy/admin/cms/pages/_form.html.haml
comfortable_mexican_sofa-2.0.13 app/views/comfy/admin/cms/pages/_form.html.haml