Sha256: 115fb3a036e209bfdb77131325402ecf0c8b3dad50e6659c18d7afa486e24180

Contents?: true

Size: 856 Bytes

Versions: 1

Compression:

Stored size: 856 Bytes

Contents

<%#
# Carrierwave Show Partial

This partial renders a summary of the current attachment(s)
for this attribute

## Local variables:

- `field`:
  An instance of Administrate::Field::Carrierwave.
  A wrapper around the attribute pulled from the database.
%>

<% if field.multiple? %>
  <% if field.files.any? %>
    <ul>
      <%- field.files.each do |file| %>
        <li><%= render 'fields/carrierwave/file', file: file %></li>
      <% end %>
    </ul>
  <% else %>
    <span>No file(s) uploaded yet</span>
  <% end %>
<% else %>
  <% if field.image.present? && field.data.model.persisted? && field.file.version_exists?(field.image) %>
    <%= render 'fields/carrierwave/preview', file: field.file, field: field %>
  <% elsif field.file.present? %>
    <%= render 'fields/carrierwave/file', file: field.file %>
  <% else %>
      -
  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
administrate-field-carrierwave-0.3.0 app/views/fields/carrierwave/_show.html.erb