Sha256: 4bfb9808d843bc6375a9b8918956cdef6316c4c5662cbdbbf3c12380aad27460

Contents?: true

Size: 996 Bytes

Versions: 3

Compression:

Stored size: 996 Bytes

Contents

<%= render Panda::CMS::Admin::ContainerComponent.new do |component| %>
  <% component.with_heading(text: "Add Page", level: 1) do |heading| %>
  <% end %>
  <%= panda_cms_form_with model: page, url: admin_pages_path, method: :post do |f| %>
    <% options = nested_set_options(Panda::CMS::Page, page) { |i| "#{"-" * i.level} #{i.title} (#{i.path})" } %>
    <div data-controller="slug">
      <input type="hidden" value="<%= Panda::CMS::Current.root %>" data-slug-target="existing_root">
      <%= f.select :parent_id, options, {}, { "data-slug-target": "input_select", "data-action": "change->slug#setPrePath" } %>
      <%= f.text_field :title, { data: { "slug-target": "input_text", action: "focusout->slug#generatePath" } } %>
      <%= f.text_field :path, { data: { prefix: Panda::CMS::Current.root, "slug-target": "output_text" } } %>
      <%= f.collection_select :panda_cms_template_id, Panda::CMS::Template.available, :id, :name %>
      <%= f.button %>
    </div>
  <% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
panda-cms-0.7.3 app/views/panda/cms/admin/forms/new.html.erb
panda-cms-0.7.2 app/views/panda/cms/admin/forms/new.html.erb
panda-cms-0.7.0 app/views/panda/cms/admin/forms/new.html.erb