Sha256: dd9e45f0062c941ac4168b55b4ee60a54aeef4e5e3344d9c351fcb68adb5ce78

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

<header class="navbar border-bottom p-4">
  <h2 class="m-0"><%= model_class.name %></h2>
  <div>
    <a
      href="<%= "#{self.class.url_base}/#{model_class.name.underscore.pluralize}/new" %>"
      class="btn btn-primary">
        new
    </a>
  </div>
</header>

<main class="p-4">
  <table class="table">
    <thead>
      <tr>
        <% index_attributes.each do |attribute| %>
        <th scope="col"><%= attribute %></th>
        <% end %>
        <th scope="col">show</th>
        <th scope="col">edit</th>
      </tr>
    </thead>
    <tbody>
    <% @resources.each do |record| %>
      <tr>
        <% index_attributes.each do |attribute| %>
        <td><%= record.send(attribute) %></td>
        <% end %>
        <td>
          <a href="<%= "#{self.class.url_base}/#{model_class.name.underscore.pluralize}/#{record.id}" %>">
            show
          </a>
        </td>
        <td>
          <a href="<%= "#{self.class.url_base}/#{model_class.name.underscore.pluralize}/#{record.id}/edit" %>">
            edit
          </a>
        </td>
      </tr>
    <% end %>
    </tbody>
  </table>
</main>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
micro_admin-0.1.7 lib/micro_admin/dashboard/base/index.erb