Sha256: b132e356b78bd3d96e49f0f9adad7f166d84cc6a194be57688ea68e40fdaf983

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

<div class="page-header">
  <%%= link_to new_<%= prefixed_plain_model_url %>_path, class: 'btn btn-success pull-right' do %>
    <i class="glyphicon glyphicon-plus"></i>
    New <%= human_name %>
  <%% end %>
  <h1><%= plural_table_name.humanize %></h1>
</div>

<table class="table table-striped table-hover table-bordered">
  <thead>
    <tr>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
      <th><%= attribute.human_name %></th>
<% end -%>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
      <tr>
        <% attributes.reject(&:password_digest?).each do |attribute| -%>
        <td><%%= link_to <%= singular_table_name %>.<%= attribute.name %>, <%= "[:#{prefix}, #{singular_table_name}]" %> %></td>
        <% end -%>
        <td class="text-right">
          <%%= link_to 'Edit', edit_<%= prefixed_plain_model_url %>_path(<%= singular_table_name %>), class: 'btn btn-primary' %>
        </td>
        <td class="text-right">
          <%%= link_to 'Destroy', <%= "[:#{prefix}, #{singular_table_name}]" %>, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>
        </td>
      </tr>
    <%% end %>
  </tbody>
</table>

<div class="row">
  <div class="col-md-8">
    <%%= paginate @<%= plural_table_name %>, theme: 'admin-bootstrap' %>
  </div>
  <div class="col-md-4 text-right">
    <div class="btn-group per-page">
     <%% [ 10, 25, 100, 250, 500, 1000 ].each do |i| %>
      <%%= link_to i, { action: :index, page: params[:page], per_page: i }, class: "btn #{per_page_class(<%= class_name %>, i)}" %>
    <%% end %>
    </div>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin-panel-0.1.4 lib/generators/admin_panel/scaffold/templates/views/erb/index.html.erb.erb