Sha256: 8ac6851babe169c57124202d5789cb886dd22051d64544fce3aac54d65c06bcd

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

<div class="field-unit__label">
  <%= f.label field.attribute %>
</div>
<div class="field-unit__field">
  <% if field.drop_js? %>
    <%= render partial: 'fields/active_storage/drop_js/dropjs_items', locals: { f: f, field: field, removable: field.destroyable? } %>
  <%else %>
    <%= f.file_field field.attribute, multiple: field.many?, direct_upload: field.direct? %>
  <%end %>
  <!-- show previous images recorded -->
  <% if field.attached?  %>
    <% if !field.drop_js? %>
      <%= render partial: 'fields/active_storage/normal/items_on_show', locals: { field: field, removable: field.destroyable? } %>
      <%= field.can_add_attachment? ? "Add:" : "Replace:" %>
    <%else %>
      <% if  request.env["PATH_INFO"].include?('edit')%>
        <%= render partial: 'fields/active_storage/drop_js/drop_js_items_on_edit', locals: { field: field, removable: field.destroyable? } %>
      <% else %>
        <%= render partial: 'fields/active_storage/drop_js/drop_js_items_on_show', locals: { field: field, removable: field.destroyable? } %>
      <% end %>
    <%end %>
  <% end %>
</div>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
viniBaxter-field-active_storage-300.0.18 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.17 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.15 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.11 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.10 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.9 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.8 app/views/fields/active_storage/_form.html.erb
viniBaxter-field-active_storage-300.0.4 app/views/fields/active_storage/_form.html.erb