Sha256: d75848ca7df1868e357a781431fc23026b759cc52c2927e0813d0bdf13f1e261
Contents?: true
Size: 851 Bytes
Versions: 6
Compression:
Stored size: 851 Bytes
Contents
<%# # 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 %> <div class="field-unit__label"> <%= f.label field.attribute %> </div> <div class="field-unit__field"> <% if field.attached? %> <%= render partial: 'fields/active_storage/items', locals: { field: field } %> <% end %> <div> <%= field.can_add_attachment? ? "Add:" : "Replace:" %> <%= f.file_field field.attribute, multiple: field.many?, direct_upload: field.direct? %> </div> </div>
Version data entries
6 entries across 6 versions & 1 rubygems