Sha256: ef4c23bbf3b069b575c0d9a6d92190eed4200db11fe4a620c8f3a023ee850d84

Contents?: true

Size: 552 Bytes

Versions: 5

Compression:

Stored size: 552 Bytes

Contents

<%#
# Carrierwave Index Partial

This partial renders the URL of the attachment as a link that
opens in a new window/tab, or the total number of attached files

## Local variables:

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

<% if field.multiple? %>
  <%= pluralize(field.files.size, field.attribute.to_s.humanize.downcase) %>
<% elsif field.file.present? %>
  <%= link_to 'View', field.file.url, title: field.file.filename, target: '_blank' %>
<% else %>
  -
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
administrate-field-carrierwave-0.6.0 app/views/fields/carrierwave/_index.html.erb
administrate-field-carrierwave-0.5.0 app/views/fields/carrierwave/_index.html.erb
administrate-field-carrierwave-0.4.1 app/views/fields/carrierwave/_index.html.erb
administrate-field-carrierwave-0.1.3 app/views/fields/carrierwave/_index.html.erb
administrate-field-carrierwave-0.1.2 app/views/fields/carrierwave/_index.html.erb