Sha256: 6039dd016e73c708620b4f67eee594be0bba8a787b548a65e267b0622d2bfbd6

Contents?: true

Size: 996 Bytes

Versions: 8

Compression:

Stored size: 996 Bytes

Contents

<%#
# Items Partial

This partial renders one or more attachments

## Local variables:

- `field`:
  An instance of [Administrate::Field::Image].
  A wrapper around the image url pulled from the database.
- `removable`:
  A boolean used to control the display of a `Remove` link which
  is used to destroy a single attachment.  Defaults to `false`
- `size`:
  [x, y]
  Maximum size of the ActiveStorage preview.
  Defaults to `field.show_preview_size`.
%>
<%
  removable = local_assigns.fetch(:removable, false)
  size = local_assigns.fetch(:size, field.show_preview_size)
%>
<div class="d-flex" style="flex-wrap: wrap;">
  <% field.attachments.each do |attachment| %>
    <div class="attachments-listing m-1">
      <%= render partial: 'fields/active_storage/normal/item',
               locals: {
                   field: field,
                   attachment: attachment,
                   removable: removable,
                   size: size
               } %>
    </div>
  <% end %>
</div>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
viniBaxter-field-active_storage-300.0.18 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.17 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.15 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.11 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.10 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.9 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.8 app/views/fields/active_storage/normal/_items.html.erb
viniBaxter-field-active_storage-300.0.4 app/views/fields/active_storage/normal/_items.html.erb