Sha256: d97838c2ab0b48f05957d83cd6a8e5aef91eb3b817a7d74662190d55e7179d80

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

<% field.attachments.each_with_index do |attachment, i| %>
  <div class="<%= field.reorderable? ? 'sortables' : '' %> toggle">
    <%= attachment.pretty_value %>
    <% if field.delete_method || field.keep_method %>
      <a class="btn btn-info btn-remove-image" data-toggle="button" href="#" role="button">
        <i class="fas fa-trash"></i>
        <%= I18n.t('admin.form.delete_file', field_label: field.label, number: i + 1) %>
      </a>
      <% if field.keep_method %>
        <%= form.check_box(field.keep_method, {multiple:true, checked: true, style: 'display:none;'}, attachment.keep_value, nil) %>
      <% elsif field.delete_method %>
        <%= form.check_box(field.delete_method, {multiple:true, style: 'display:none;'}, attachment.delete_value, nil) %>
      <% end %>
    <% end %>
  </div>
<% end %>
<%= form.file_field(field.name, field.html_attributes.reverse_merge({ data: { :"multiple-fileupload" => true }, multiple: true })) %>
<% if field.cache_method %>
  <%= form.hidden_field(field.cache_method) %>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_admin-3.0.0.beta2 app/views/rails_admin/main/_form_multiple_file_upload.html.erb
rails_admin-3.0.0.beta app/views/rails_admin/main/_form_multiple_file_upload.html.erb