Sha256: d20aec177c776e4349701f7a40ad14e60611cfa4dea47602fa0e62b89b9794b4
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
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, { meta: t(".path.meta"), 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 "Create Page" %> </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/pages/new.html.erb |
panda-cms-0.7.2 | app/views/panda/cms/admin/pages/new.html.erb |
panda-cms-0.7.0 | app/views/panda/cms/admin/pages/new.html.erb |