Sha256: b22e7be8ee809c8a45d06a994d69edf42362240217ca797d398f903dcfa94b40

Contents?: true

Size: 1.89 KB

Versions: 3

Compression:

Stored size: 1.89 KB

Contents

<h1>Listing <%= plural_name.titleize %></h1>

<ul class="choices">
  <li><%%= link_to 'New <%= singular_name.titleize %>', new_admin_<%= singular_name %>_path %></li>
</ul>
<%% paginated_section do -%>
<table>
  <thead>
    <tr>
<% for attribute in attributes -%>
      <%%= sortable_table_header :name => "<%= attribute.column.human_name %>", :sort => "<%= attribute.name %>" %>
<% end -%>
      <%%= sortable_table_header :name => "Created", :sort => "created_at" %>
      <%%= sortable_table_header :name => "Updated", :sort => "updated_at" %>
      <th colspan="2">Actions</th>
    </tr>
  </thead>
  <tbody>
<%% @<%= plural_name %>.each do |<%= singular_name %>| %>
    <tr id="<%= singular_name %>-<%%= <%= singular_name %>.id %>">
<% for attribute in attributes -%>
<% if attribute == attributes.first -%>
      <td><%%= link_to <%= singular_name %>.<%= attribute.name %>, admin_<%= singular_name %>_path(<%= singular_name %>) %></td>
<% else -%>
      <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
<% end -%>
<% end -%>
      <td><%%=h <%= singular_name %>.created_at.to_formatted_s(:short_ordinal) %></td>
      <td><%%=h <%= singular_name %>.created_at.to_formatted_s(:short_ordinal) %></td>
      <td><%%= link_to 'Edit', admin_<%= singular_name %>_path(<%= singular_name %>), :class => 'edit' %></td>
      <td><%%= link_to 'Destroy', admin_<%= singular_name %>_path(<%= singular_name %>), :confirm => 'Are you sure?', :method => :delete, :class => 'delete' %></td>
    </tr>
<%% end %>
  </tbody>
  <tfoot>
    <tr>
<% for attribute in attributes -%>
      <%%= sortable_table_header :name => "<%= attribute.column.human_name %>",  :sort => "<%= attribute.name %>" %>
<% end -%>
      <%%= sortable_table_header :name => "Created", :sort => "created_at" %>
      <%%= sortable_table_header :name => "Updated", :sort => "updated_at" %>
      <th colspan="2">Actions</th>
    </tr>
  </tfoot>
</table>
<%% end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
beef-admin_area-0.2.1 generators/admin_scaffold/templates/admin_index.html.erb
beef-admin_area-0.2.0 generators/admin_scaffold/templates/admin_index.html.erb
beef-admin_area-0.1.9 generators/admin_scaffold/templates/admin_index.html.erb