Sha256: 0e683baff3c16812046b171969421ed9febf04d3e49eaab4ffe26ffeda40ba9a
Contents?: true
Size: 980 Bytes
Versions: 5
Compression:
Stored size: 980 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 %> <% if field.attached? %> <style> <%# figure out a way to remove this %> td img { max-height: unset !important; } </style> <% if field.index_display_preview? %> <%= render partial: 'fields/active_storage/preview', locals: { field: field, attachment: field.attachments[0], size: field.index_preview_size } %> <% end %> <% if field.index_display_count? %> <div class="attachments-count"> <%= pluralize(field.attachments.count, 'Attachment') %> </div> <% end %> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems