Sha256: 940e38f50e75c18f62cf51faea638e64ef29343f5c22512bcb08cf2530ce46fc

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

<div class="row">
  <div class="col-xs-12">
    <header class="page-header">
      <div class="pull-right">
        <%= link_to "Create new",[ :new, :admin, @resource_class.model_name.singular_route_key ], class: "btn btn-lg btn-success" %>
      </div>
      <h1>All <%= @resource_class.model_name.plural %></h1>
    </header>
  </div>
</div>

<div class="row">
  <div class="col-xs-12">
    <table class="table table-striped">
      <thead>
        <tr>
          <% @resource_class.attribute_names.each do |attr| %>
            <th><%= @resource_class.human_attribute_name attr %></th>
          <% end %>
          <th>&nbsp;</th>
        </tr>
      </thead>
      <tbody>
        <% @resources.each do |resource| %>
          <tr>
            <% resource.attributes.values.each do |attr| %>
              <td><%= attr %></th>
            <% end %>
            <td>
              <%= link_to "Show", [ :admin, resource ] %>
              <%= link_to "Edit", [ :edit, :admin, resource ] %>
              <%= link_to "Destroy", [ :admin, resource ], method: :delete %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyper_admin-0.2.0 app/views/admin/resources/index.html.erb