noesya/osuny

View on GitHub
app/views/admin/communication/websites/pages/_list.html.erb

Summary

Maintainability
Test Coverage
<%
small ||= false
%>
<div class="row g-2 mb-2">
  <% pages.each do |page| %>
    <div>
      <div class="<%= osuny_card_classes(horizontal: true) %>">
        <%= osuny_thumbnail_localized page %>
        <div class="card-body">
          <%= osuny_published_localized page %>
          <%= osuny_link_localized  page,
                                    admin_communication_website_page_path(website_id: page.website.id, id: page.id),
                                    classes: "stretched-link" %>
        </div>
        <div class="card-footer text-muted">
          <% if small %>
            <%= l page.updated_at.to_date, format: :short %>
          <% else %>
            <%= t("communication.website.pages.defaults.#{page.type_key}.title") if page.is_special_page? %>
            <%= Communication::Website::Page.human_attribute_name('full_width') if page.full_width %>
          <% end %>
        </div>
      </div>
    </div>
  <% end %>
</div>