app/views/panda_cms/admin/forms/edit.html.erb in panda_cms-0.3.15 vs app/views/panda_cms/admin/forms/edit.html.erb in panda_cms-0.5.0
- old
+ new
@@ -1,40 +1 @@
-<%= render PandaCms::Admin::ContainerComponent.new do |component| %>
- <% component.with_heading(text: "#{page.title}", level: 1) do |heading| %>
- <%# heading.with_button(action: :secondary, text: "Save Draft", link: "#", icon: "clipboard-check") %>
- <%# heading.with_button(action: :save, text: "Publish Page", link: "#") %>
- <% end %>
-
- <% component.with_slideover(title: "Page Details") do %>
- <%= form_with model: page, url: admin_page_path, method: :put do |f| %>
- <div class="col-span-3 mb-2 sm:col-span-2">
- <%= f.label :title, class: "mt-2 block text-sm font-medium leading-6 text-gray-900" %>
- <div class="flex mt-2 rounded-md shadow-sm">
- <%= f.text_field :title, class: "block w-full rounded-md border-0 p-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-300 focus:ring-1 focus:ring-inset focus:ring-gray-500 sm:text-sm sm:leading-6 hover:pointer" %>
- </div>
-
- <%= f.label :template, class: "mt-2 block text-sm font-medium leading-6 text-gray-900" %>
- <div class="flex mt-2 rounded-md shadow-sm">
- <%= 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-gray-300 placeholder:text-gray-300 focus:ring-1 focus:ring-inset focus:ring-gray-500 sm:text-sm sm:leading-6 hover:pointer" %>
- </div>
-
- <%= f.label :status, class: "mt-2 block text-sm font-medium leading-6 text-gray-900" %>
- <div class="flex mt-2 rounded-md shadow-sm">
- <%= 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-gray-300 focus:ring-1 focus:ring-inset focus:ring-gray-500 sm:text-sm sm:leading-6 hover:pointer" %>
- </div>
-
- <%= f.submit "Save", class: "mt-4 inline-flex justify-center rounded-md bg-panda-cms-dark px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-panda-cms-dark focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-panda-dark" %>
- </div>
- <% end %>
- <% end %>
-
- <a class="text-sm text-gray-400 block -mt-4 mb-2" target="_blank" href="<%= @page.path %>"><%= @page.path %> <i class="fa-solid fa-arrow-up-right-from-square ml-2"></i></a>
-
- <iframe id="editablePageFrame" src="<%= page.path %>?embed_id=<%= page.id %>" class="w-full h-full m-0 p-0 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 %>
\ No newline at end of file