Sha256: 760cc5cc2a02267acc5f2072a31f9618bf4369004504c21f7420a120e5c80be5
Contents?: true
Size: 859 Bytes
Versions: 2
Compression:
Stored size: 859 Bytes
Contents
<%# # Image Index Partial This partial renders an image attribute to be displayed on a resource's index page. By default, the attribute is rendered as an image tag. ## Local variables: - `field`: An instance of [Administrate::Field::Image][1]. A wrapper around the image url pulled from the database. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/Image %> <style> <%# figure out a way to remove this %> td img { max-height: unset !important; } </style> <% attachments = Array(field.many? ? field.attachments : field.data) %> <% if field.attached? %> <% if field.show_in_index? %> <%= render partial: 'fields/active_storage/item', locals: { field: field, attachment: attachments[0], image_size: [50, 50] } %> <% end %> <% pluralize(attachments.count, 'Attached file') %> <% else %> 0 Attached files <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
viniBaxter-field-active_storage-3.0.0 | app/views/fields/active_storage/_index.html.erb |
viniBaxter-field-active_storage-0.2.4 | app/views/fields/active_storage/_index.html.erb |