Sha256: 36b6b6f71a45bb41b37269fcb80db903951bc388a78aa3d69504fdcd9d6c2e48

Contents?: true

Size: 741 Bytes

Versions: 7

Compression:

Stored size: 741 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`
%>

<% 
  attachments = Array(field.many? ? field.attachments : field.data)
  removable = local_assigns.fetch(:removable, false)
%>

<% attachments.each do |attachment| %>
  <div class="attachments-listing">
    <%= render partial: 'fields/active_storage/item', locals: { field: field, attachment: attachment, removable: removable, image_size: field.show_preview_size } %>
  </div>
<% end %>

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
viniBaxter-field-active_storage-3.0.0 app/views/fields/active_storage/_items.html.erb
viniBaxter-field-active_storage-0.2.4 app/views/fields/active_storage/_items.html.erb
administrate-field-active_storage-0.2.2 app/views/fields/active_storage/_items.html.erb
administrate-field-active_storage-0.2.1 app/views/fields/active_storage/_items.html.erb
administrate-field-active_storage-0.2.0 app/views/fields/active_storage/_items.html.erb
administrate-field-active_storage-0.1.8 app/views/fields/active_storage/_items.html.erb
administrate-field-active_storage-0.1.7 app/views/fields/active_storage/_items.html.erb