<div class="attachment attachment-<%= f.object.attachable_for&.node_type %>" data-controller="fields">
  
  <div class="attachment__content">
    <%= render partial: 'admin/attachments/asset', collection: Array(f.object.asset) %>  
    <%= render partial: 'material/lexxy_field_i18n', 
                locals: { 
                  f: f, 
                  attr: :body, 
                  label: t('activerecord.attributes.attachment.body', 
                  locale: I18n.default_locale),
                  tmp_id: local_assigns[:tmp_id]
                } %>  
  
  </div>

  <%= button_tag 'delete', 
                  type: 'button', 
                  data: { action: 'click->fields#removeField' }, 
                  class: 'destroy__field-btn' %>

  <%= f.hidden_field :_destroy, class: 'destroy__field' %>
  <%= f.hidden_field :position, class: 'position' %>
  <%= f.hidden_field :asset_id %>

  <div class="handle">more_vert</div>
</div>
