Sha256: ef9c0efa185adea186bc21797a9cf8b14f7754cd9c9e37f7dc8c9ce1079aa624
Contents?: true
Size: 916 Bytes
Versions: 1
Compression:
Stored size: 916 Bytes
Contents
<%# # Image Show Partial This partial renders an image attribute, to be displayed on a resource's show 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.image? %> <%= image_tag(field.url) %> <% elsif field.video? %> <%= video_tag(field.url, poster: field.preview(resize: "1920x1080>"), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %> <% elsif field.audio? %> <%= audio_tag(field.url, autoplay: true, controls: true) %> <% elsif field.previewable? %> <%= image_tag(field.preview(resize: "595x842>")) %> <br/> Download: <%= link_to(field.filename, field.blob_url) %> <% else %> <%= link_to(field.filename, field.blob_url) %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-field-active_storage-0.0.2 | app/views/fields/active_storage/_show.html.erb |