Sha256: afe36ecd0c6f7df86e04770164e8fa06191ed6a1232b360bc3f0aae3d68069a1

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

<div class="page-header">
  <div class="row">
    <div class="col-md-8">
      <h2>Listing <%= plural_table_name %></h2>
    </div>
    <div class="col-md-4 text-right">
      <%%= link_to 'New <%= human_name %>', new_<%= prefixed_plain_model_url %>_path, class: 'btn btn-success'%>
    </div>
  </div>
</div>

<table class="table table-striped">
  <thead>
    <tr>
<% attributes.reject(&:password_digest?).each do |attribute| -%>
      <th><%= attribute.human_name %></th>
<% end -%>
      <th class="text-right">Actions</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 'Show', <%= "[:#{prefix}, #{singular_table_name}]" %>, class: 'btn btn-default' %>
          <%%= link_to 'Edit', edit_<%= prefixed_plain_model_url %>_path(<%= singular_table_name %>), class: 'btn btn-primary' %>
          <%%= link_to 'Destroy', <%= "[:#{prefix}, #{singular_table_name}]" %>, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>
          </td>
      </tr>
    <%% end %>
  </tbody>
</table>

Version data entries

1 entries across 1 versions & 1 rubygems

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