Sha256: a7703d0bdaac492fe6a2ed93dd388605f9647f26825cf917e6540f6a1bccb7de
Contents?: true
Size: 1.43 KB
Versions: 22
Compression:
Stored size: 1.43 KB
Contents
<%%= render partial: 'contour/layouts/per_page', locals: { per_page: 40, object_count: @<%= resource_name_plural %>.total_count } %> <table class="table table-striped"> <thead> <tr> <%- columns.each do |column| -%> <th style="white-space:nowrap"><%%== sort_field_helper(@order, '<%= resource_name_plural %>.<%= column.name %>', '<%= column.name.titleize %>') %></th> <%- end -%> <th>Actions</th> </tr> </thead> <%% @<%= resource_name_plural %>.each do |<%= resource_name %>| %> <tr> <%- columns.each do |column| -%> <%- if column.name.split('_').last == 'id' -%> <td><%%= link_to <%= resource_name %>.<%= column.name.split('_')[0..-2].join('_') %>.name, <%= resource_name %>.<%= column.name.split('_')[0..-2].join('_') %> if <%= resource_name %>.<%= column.name.split('_')[0..-2].join('_') %> %></td> <%- else -%> <td><%%= <%= resource_name %>.<%= column.name %> %></td> <%- end -%> <%- end -%> <td> <%%= link_to 'Edit', edit_<%= resource_name %>_path(<%= resource_name %>), class: 'btn btn-xs btn-default' %> <%%= link_to 'Delete', <%= resource_name %>, method: :delete, class: 'btn btn-xs btn-danger-inverse', data: { confirm: "Are you sure you want to delete <%= resource_title %> #{<%= resource_name %>.name}?" } %> </td> </tr> <%% end %> </table> <div class="center"><%%= paginate @<%= resource_name_plural %>, theme: 'contour' %></div>
Version data entries
22 entries across 22 versions & 1 rubygems