Sha256: b085da14749e688386ab674095a0e06b0d1b72cc0210c954fd5f5a3b6353f9f0
Contents?: true
Size: 1.36 KB
Versions: 1
Compression:
Stored size: 1.36 KB
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 type="text/css" nonce="<%= content_security_policy_nonce %>"> <%# figure out a way to remove this %> td img { max-height: unset !important; } </style> <% if field.index_display_preview? %> <% if field.many? %> <%= render partial: 'fields/active_storage/items', locals: { field: field, size: field.index_preview_size } %> <% else %> <%= render partial: 'fields/active_storage/item', locals: { field: field, attachment: field.data, size: field.index_preview_size } %> <% end %> <% end %> <% if field.index_display_count? %> <div class="attachments-count"> <%= pluralize(field.attachments.count, I18n.t("administrate.fields.active_storage.attachment", default: 'Attachment') ) %> </div> <% end %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-field-active_storage-0.3.8 | app/views/fields/active_storage/_index.html.erb |