Sha256: 80ff571b00701367984431b02aa76d560b7b93d687cc181282cc55db06a27cf2
Contents?: true
Size: 1.51 KB
Versions: 18
Compression:
Stored size: 1.51 KB
Contents
<%%= title t("<%= singular_table_name %>", scope: "activerecord.models").pluralize %> <%% content_for :right do -%> <li class="active"> <%%= link_to t("new_<%= singular_table_name %>"), new_<%= singular_table_name %>_path %> </li> <%% end -%> <table class="table table-striped"> <thead> <tr> <th><%%= sort_link @search, :id, t(:id, scope: "activerecord.attributes") %></th> <% attributes.each do |attribute| -%> <th><%%= sort_link @search, :<%= attribute.name %>, t(:<%= attribute.name %>, scope: "activerecord.attributes.<%= singular_table_name %>") %></th> <% end -%> <th colspan="3"></th> </tr> </thead> <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> <td><%%= <%= singular_table_name %>.id %></td> <% attributes.each do |attribute| -%> <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td> <% end -%> <td> <%%= link_to <%= singular_table_name %> do %> <i class="fa fa-file"></i> <%% end -%> </td> <td> <%%= link_to edit_<%= singular_table_name %>_path(<%= singular_table_name %>) do %> <i class="fa fa-edit"></i> <%% end -%> </td> <td> <%%= link_to <%= singular_table_name %>, method: :delete, data: { confirm: t(:are_you_sure) } do %> <i class="fa fa-trash"></i> <%% end -%> </td> </tr> <%% end %> </tbody> </table> <br> <%%= will_paginate @<%= plural_table_name %> %>
Version data entries
18 entries across 18 versions & 2 rubygems