Sha256: e8c7cc36dfc1e1126f92c008c8a1e02f3fc38094103d5d614dc8bb8c64ff7d34

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

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

  <%= render Panda::CMS::Admin::TableComponent.new(term: "post", rows: posts) do |table| %>
    <% table.column("Title") do |post| %>
      <div>
        <%= link_to post.title, edit_admin_post_path(post.admin_param), class: "block h-full w-full" %>
        <span class="block text-xs text-black/60">
          <%= CGI.unescape("#{Panda::CMS.config.posts[:prefix]}#{post.slug}") %>
        </span>
      </div>
    <% end %>
    <% table.column("Status") { |post| render Panda::CMS::Admin::TagComponent.new(status: post.status) } %>
    <% table.column("Published") { |post| render Panda::CMS::Admin::UserActivityComponent.new(at: post.published_at, user: post.author)} %>
    <% table.column("Last Updated") { |post| render Panda::CMS::Admin::UserActivityComponent.new(whodunnit_to: post)} %>
  <% end %>

<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
panda-cms-0.7.3 app/views/panda/cms/admin/posts/index.html.erb
panda-cms-0.7.2 app/views/panda/cms/admin/posts/index.html.erb