Sha256: 98a48968730248514c56cc18719648bd744f5fed04614efe1d783393360bd75c

Contents?: true

Size: 1.79 KB

Versions: 11

Compression:

Stored size: 1.79 KB

Contents

<%= render PandaCms::Admin::ContainerComponent.new do |component| %>
  <% component.with_heading(text: "#{page.title}", level: 1) %>

  <% component.with_slideover(title: "Page Details") do %>
    <%= panda_cms_form_with model: page, url: admin_page_path, method: :put do |f| %>
        <%= f.text_field :title, class: "block w-full rounded-md border-0 p-2 text-gray-900 ring-1 ring-inset ring-mid placeholder:text-gray-300 focus:ring-1 focus:ring-inset focus:ring-dark sm:text-sm sm:leading-6 hover:pointer" %>

        <%= f.text_field :template, value: template.name,  readonly: true, class: "read-only:bg-gray-100 block w-full rounded-md border-0 p-2 text-gray-900 ring-1 ring-inset ring-mid placeholder:text-gray-300 focus:ring-1 focus:ring-inset focus:ring-dark sm:text-sm sm:leading-6 hover:pointer" %>

        <%= f.select :status, options_for_select([["Active", "active"], ["Draft", "draft"], ["Hidden", "hidden"], ["Archived", "archived"]], selected: page.status), {}, class: "block w-full rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-mid focus:ring-1 focus:ring-inset focus:ring-dark sm:text-sm sm:leading-6 hover:pointer" %>

        <%= f.submit "Save" %>
    <% end %>
  <% end %>

  <a class="block mb-2 -mt-4 text-sm text-black/60" target="_blank" href="<%= @page.path %>"><%= @page.path %> <i class="ml-2 fa-solid fa-arrow-up-right-from-square"></i></a>

  <iframe id="editablePageFrame" src="<%= page.path %>?embed_id=<%= page.id %>" class="p-0 m-0 w-full h-full border border-slate-200"></iframe>

  <script src="/panda-cms-assets/javascripts/embed/editable.js"></script>
  <script>
    document.addEventListener("DOMContentLoaded", function() {
      const editable = new EditableController("<%= page.id %>", document.getElementById("editablePageFrame"));
    });
  </script>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
panda_cms-0.5.10 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.9 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.8 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.7 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.6 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.5 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.4 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.3 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.2 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.1 app/views/panda_cms/admin/pages/edit.html.erb
panda_cms-0.5.0 app/views/panda_cms/admin/pages/edit.html.erb