Sha256: df96a2832cd155461ab5d5cb33aebc1f2af51d03cda333aa5f685e4e2eedba4e

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

<%#
# Carrierwave Form Partial

This partial renders a file input field.

## Local variables:

- `f`:
  A Rails form generator, used to help create the appropriate input fields.
- `field`:
  An instance of Administrate::Field::Carrierwave.
  A wrapper around the attribute pulled from the database.
%>

<div class="field-unit__label">
  <%= f.label field.attribute %>
</div>
<div class="field-unit__field">
  <%= f.file_field field.attribute %>
  <br />
  <%- if field.uploaded? -%>
    <%= render 'fields/carrierwave/preview', field: field %>
    <%= link_to field.basename, field.url, title: field.filename, target: '_blank' %>
  <%- else -%>
    <span>No file uploaded yet</span>
  <%- end -%>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
administrate-field-carrierwave-0.0.3 app/views/fields/carrierwave/_form.html.erb