Sha256: 76177a38d50aa4dd19b22ec2311c2d6e9875e653d8abc42b05023bab4158ca69

Contents?: true

Size: 778 Bytes

Versions: 3

Compression:

Stored size: 778 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.show_preview? %>
    <%= render 'fields/carrierwave/preview', file: field.file, field: field %>
  <% elsif field.show_file? %>
    <%= render 'fields/carrierwave/file', file: field.file %>
  <% else %>
      -
  <% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
administrate-field-carrierwave-0.3.4 app/views/fields/carrierwave/_show.html.erb
administrate-field-carrierwave-0.3.3 app/views/fields/carrierwave/_show.html.erb
administrate-field-carrierwave-0.3.2 app/views/fields/carrierwave/_show.html.erb