BathHacked/energy-sparks

View on GitHub
app/views/admin/comparisons/footnotes/index.html.erb

Summary

Maintainability
Test Coverage
<%= render 'admin/comparisons/header', title: '' %>

<table class="table table-sorted">
  <thead>
    <tr>
      <th>Label</th>
      <th>Key</th>
      <th>Description</th>
      <th>Actions</th>
    </tr>
  </thead>

  <tbody>
    <% @footnotes.each do |footnote| %>
      <tr>
        <td><%= footnote.label %></td>
        <td><%= footnote.key %></td>
        <td><%= footnote.description %></td>
        <td>
          <div class="btn-group">
            <%= link_to 'Edit', edit_admin_comparisons_footnote_path(footnote),
                        class: 'btn btn-sm' %>
            <%= link_to 'Delete', admin_comparisons_footnote_path(footnote),
                        method: :delete,
                        data: { confirm: 'Are you sure?' },
                        class: 'btn btn-sm' %>
          </div>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>