<%# # Image Form Partial This partial renders an input element for image attributes. By default, the input is a text field for the image's URL. ## Local variables: - `f`: A Rails form generator, used to help create the appropriate input fields. - `field`: An instance of [Administrate::Field::Image][1]. A wrapper around the image url pulled from the database. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/Image %>
<%= f.label field.attribute %>
<% if field.data.present? && field.attached? %> <%= render partial: 'fields/active_storage/items', locals: { field: field, removable: field.destroyable? } %>
Add: <% end %> <%= f.file_field field.attribute, multiple: field.many?, direct_upload: field.direct? %>