Sha256: bf797e813036a3df64598d15dec063254e0c814d8b4ee614306b32d2db6bc754

Contents?: true

Size: 782 Bytes

Versions: 2

Compression:

Stored size: 782 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? %>
    <%= 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

2 entries across 2 versions & 1 rubygems

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