Sha256: 2255fd510c53d4d6f66bae3e6c25c91bbc636904a893e9ff4fe6c0fe4abfd991

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

<div class="page-header">
  <h2><%%= I18n.t :listing_<%= plural_name %> %> - <%%= link_to I18n.t(:new_<%= singular_name %>), new_<%= singular_name %>_path, class: 'btn btn-success' %></h2>
</div>

<table class="table table-bordered table-striped">
  <thead>
    <tr>
      <%- model_attributes.each do |attribute| -%>
      <th><%%= t :<%= attribute.name %> %></th>
      <%- end -%>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
  <%% @<%= plural_name %>.each do |<%= singular_name %>| %>
    <tr>
      <%- model_attributes.each do |attribute| -%>
      <td><%%= <%= singular_name %>.<%= attribute.name %> %></td>
      <%- end -%>
      <td><%%= link_to I18n.t(:show), <%= singular_name %>, class: 'btn' %></td>
      <td><%%= link_to I18n.t(:edit), edit_<%= singular_name %>_path(<%= singular_name %>), class: 'btn btn-primary' %></td>
      <td><%%= button_to I18n.t(:delete), { action: :destroy, id: <%= singular_name %>.id }, method: :delete, class: 'btn btn-danger' %></td>
    </tr>
  <%% end %>
  </tbody>
</table>
<%%= will_paginate @<%= plural_name %>, previous_label: I18n.t(:previous), next_label: I18n.t(:next) %>
<br />

<%%= link_to I18n.t(:new_<%= singular_name %>), new_<%= singular_name %>_path, class: 'btn btn-success' %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zscaffold_admin-0.0.4 lib/generators/scaffold_admin/templates/views/index.html.erb