Sha256: ce47c6aff6c9115fa54a484159eea7b20a52e5330b47f5d4e6dca34f53ddc5c5

Contents?: true

Size: 1009 Bytes

Versions: 4

Compression:

Stored size: 1009 Bytes

Contents

<%= render PandaCms::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(PandaCms::Page, page) { |i| "#{"-" * i.level} #{i.title} (#{i.path})" } %>
    <div data-controller="slug">
      <input type="hidden" value="<%= PandaCms::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, { meta: t(".path.meta"), data: { prefix: PandaCms::Current.root, "slug-target": "output_text" } } %>
      <%= f.collection_select :panda_cms_template_id, PandaCms::Template.available, :id, :name %>
      <%= f.button %>
    </div>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
panda_cms-0.6.3 app/views/panda_cms/admin/pages/new.html.erb
panda_cms-0.6.2 app/views/panda_cms/admin/pages/new.html.erb
panda_cms-0.6.1 app/views/panda_cms/admin/pages/new.html.erb
panda_cms-0.6.0 app/views/panda_cms/admin/pages/new.html.erb