Sha256: 70bb115f5a42d979b55bfa06c09fe085e78e7d0764015f7ea3ac0e58e7ec3659

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>
          <% if field.show_file? %>
            <%= render 'fields/carrierwave/file', file: file %>
          <% else %>
            -
          <% end %>
        </li>
      <% end %>
    </ul>
  <% else %>
    <span>No file(s) uploaded yet</span>
  <% end %>
<% else %>
  <% if 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.6.0 app/views/fields/carrierwave/_show.html.erb
administrate-field-carrierwave-0.5.0 app/views/fields/carrierwave/_show.html.erb
administrate-field-carrierwave-0.4.1 app/views/fields/carrierwave/_show.html.erb