Note the CSS could probably be improved to avoid duplication with other button style definitions. However, that's fine because we're going to change the style of the links soon. For the same reason, I haven't bothered to style every single link the way it was until now.
55 lines
2.0 KiB
Plaintext
55 lines
2.0 KiB
Plaintext
<% provide :title do %>
|
|
<%= t("admin.header.title") %> - <%= t("admin.menu.site_customization.pages") %>
|
|
<% end %>
|
|
|
|
<%= link_to t("admin.site_customization.pages.index.create"), new_admin_site_customization_page_path, class: "button float-right" %>
|
|
<h2 class="inline-block"><%= t("admin.site_customization.pages.index.title") %></h2>
|
|
|
|
<% if @pages.any? %>
|
|
<h3><%= page_entries_info @pages %></h3>
|
|
|
|
<table class="cms-page-list">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.site_customization.pages.page.title") %></th>
|
|
<th><%= t("admin.site_customization.pages.page.slug") %></th>
|
|
<th><%= t("admin.site_customization.pages.page.created_at") %></th>
|
|
<th><%= t("admin.site_customization.pages.page.updated_at") %></th>
|
|
<th><%= t("admin.site_customization.pages.page.status") %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @pages.each do |page| %>
|
|
<tr id="<%= dom_id(page) %>">
|
|
<td><%= page.title %></td>
|
|
<td><%= page.slug %></td>
|
|
<td><%= I18n.l page.created_at, format: :short %></td>
|
|
<td><%= I18n.l page.created_at, format: :short %></td>
|
|
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(page) do |actions| %>
|
|
<%= actions.link_to t("admin.site_customization.pages.page.see_cards"),
|
|
admin_site_customization_page_cards_path(page),
|
|
class: "cards-link" %>
|
|
|
|
<% if page.status == "published" %>
|
|
<%= actions.link_to t("admin.site_customization.pages.index.see_page"),
|
|
page.url,
|
|
target: "_blank",
|
|
class: "show-link" %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate @pages %>
|
|
<% else %>
|
|
<div class="callout primary">
|
|
<%= page_entries_info @pages %>
|
|
</div>
|
|
<% end %>
|