Sha256: 68822df9db34a35dc8a5d4f9e829b02a72ebf8a7edb1c95dfe2864d72ecefd9d
Contents?: true
Size: 1.7 KB
Versions: 3
Compression:
Stored size: 1.7 KB
Contents
<h2><%%= t('headers.index', name: t('activerecord.models.<%= singular_table_name %>.other')) %></h2> <table class="table table-striped table-hover"> <thead> <tr> <% attributes.each do |attribute| -%> <th><%%= t('activerecord.attributes.<%= singular_table_name %>.<%= attribute.name %>') %></th> <% end -%> <th class="form-actions"><%%= t('actions.title') %></th> </tr> </thead> <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> <% attributes.each do |attribute| -%> <td> <%- if attribute.name.include?("picture") -%> <%%= image_tag(<%= singular_table_name %>.<%= attribute.name %>_url(:thumb).to_s) %> <%- elsif attribute.type == :boolean -%> <%%= <%= singular_table_name %>.<%= attribute.name %> ? t('simple_form.yes') : t('simple_form.no') %> <%- elsif attribute.type == :belongs_to -%> <%%= <%= singular_table_name %>.<%= attribute.name %>.name %> <%- else -%> <%%= <%= singular_table_name %>.<%= attribute.name %> %> <%- end -%> </td> <% end -%> <td> <%%= link_to t('actions.show'), <%= singular_table_name %>, class: 'btn btn-default btn-xs' %> <br> <%%= link_to t('actions.edit'), [:edit, <%= singular_table_name %>], class: 'btn btn-default btn-xs' %> <br> <%%= link_to t('actions.destroy'), <%= singular_table_name %>, method: :delete, data: { confirm: t('actions.confirm') }, class: 'btn btn-danger btn-xs' %> </td> </tr> <%% end %> </tbody> </table> <br> <%%= link_to t('actions.add', name: t('activerecord.models.<%= singular_table_name %>.one')), new_<%= singular_table_name %>_path, class: 'btn btn-primary' %>
Version data entries
3 entries across 3 versions & 1 rubygems