<%= attachment.file.filename %>
<%= form_with model: attachment, url: spina.admin_attachment_path(attachment), data: {turbo_frame: dom_id(attachment), controller: "form loading-button", loading_message: t('spina.media_library.uploading'), action: "turbo:submit-end->loading-button#doneLoading"} do |f| %>
<%= f.file_field :file, id: "attachment_#{attachment.id}_file_field", class: 'hidden', data: {action: "loading-button#loading form#requestSubmit"} %>
<% end %>
<%= link_to spina.edit_admin_attachment_path(attachment), class: "btn btn-default h-7 px-2 mr-2 text-xs" do %>
<%= heroicon('pencil', style: :solid, class: 'w-3 h-3 mr-1 text-gray-600') %>
<%=t 'spina.ui.rename' %>
<% end %>
<%= link_to file_url(attachment.file), class: "btn btn-default h-7 px-2 mr-2 text-xs" do %>
<%= heroicon('download', style: :mini, class: 'w-4 h-4 mr-1 text-gray-600') %>
<%=t 'spina.attachments.download' %>
<% end %>
<%= number_to_human_size attachment.file.byte_size %>
<%= content_type(attachment) %>
<%= button_to spina.admin_attachment_path(attachment), method: :delete, class: "block py-3 px-4 ml-2 text-gray-500 hover:text-gray-900", form: {data: {controller: "confirm", confirm_message: t('spina.attachments.delete_confirmation_html')}} do %>
<%= heroicon('trash', class: "w-5 h-5") %>
<% end %>