Sha256: 4887df891ec5ad3a11b0b1be2e828ba59376713c90f65c9f57187d351c770b70

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

<%= render Panda::CMS::Admin::ContainerComponent.new do |component| %>
  <% component.with_heading(text: "Pages", level: 1) do |heading| %>
    <% heading.with_button(action: :add, text: "Add Page", link: new_admin_page_path) %>
  <% end %>

  <% if root_page %>
    <%= render Panda::CMS::Admin::TableComponent.new(term: "page", rows: root_page.self_and_descendants) do |table| %>
      <% table.column("Name") do |page| %>
        <div class="<%= table_indent(page) %>">
          <%= link_to page.title, edit_admin_page_path(page), class: "block h-full w-full" %>
          <span class="block text-xs text-black/60"><%= page.path %></span>
        </div>
      <% end %>
      <% table.column("Status") { |page| render Panda::CMS::Admin::TagComponent.new(status: page.status) } %>
      <% table.column("Last Updated") { |page| render Panda::CMS::Admin::UserActivityComponent.new(whodunnit_to: page)} %>
    <% end %>
  <% else %>
    <div class="p-6 bg-error/10 text-error rounded-lg">
      <p class="text-base">No homepage (at <code>/</code>) found. Please create a homepage to start building your site.</p>
    </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/index.html.erb
panda-cms-0.7.2 app/views/panda/cms/admin/pages/index.html.erb
panda-cms-0.7.0 app/views/panda/cms/admin/pages/index.html.erb