denny/ShinyCMS-ruby

View on GitHub
plugins/ShinyPages/app/views/shiny_pages/admin/templates/index.html.erb

Summary

Maintainability
Test Coverage
<%= render partial: 'admin/includes/search', locals: { action: shiny_pages.search_templates_path, placeholder: t( '.search' ) } %>

<table class="table table-responsive-sm table-striped">
  <thead>
    <tr>
      <th>
        Template
      </th>
      <th>
        &nbsp;
      </th>
    </tr>
  </thead>
  <% @templates.each do |template| %>
  <tr class="showfocus">
    <td>
      <%= template.name %>
    </td>
    <td class="actions">
      <%= link_to t( 'edit'   ), shiny_pages.edit_template_path( template ) %>
      <%= link_to t( 'delete' ), shiny_pages.template_path( template ),
          method: :delete, data: { confirm: t( 'are_you_sure' ) } %>
    </td>
  </tr>
  <% end %>
</table>

<%= render partial: 'admin/includes/pager', locals: { pagy: @pagy, name: @templates.name } %>