Sha256: 7329c103d6e6ca2efa33ff5fb35752875642bce077ea1f46ef6ecd93d165d5ae

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

<div class="page-header">
  <%%= link_to new_<%= singular_table_name %>_path, :class => 'btn btn-primary' do %>
    <i class="icon-plus icon-white"></i>
    New <%= human_name %>
  <%% end %>
  <h1>Listing <%= plural_table_name %></h1>
</div>

<table class="table table-bordered table-striped">
  <thead>
    <tr>
<% attributes.each do |attribute| -%>
      <th><%= attribute.human_name %></th>
<% end -%>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
    <tr>
<% attributes.each do |attribute| -%>
      <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
      <td><%%= link_to 'Show', <%= singular_table_name %> %></td>
      <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
      <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :confirm, "'Are you sure?'" %>, <%= key_value :method, ":delete" %> %></td>
    </tr>
<%% end %>
  </tbody>
</table>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bootstrap-generators-2.3.1.1 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.3.1 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.2.2 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.2.1 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.1.1 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.0.4 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.0.1 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb
bootstrap-generators-2.0.0 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb