<%= link_to rails_blob_path(asset.file, disposition: 'attachment'), class: "file-preview-link file-name", id: "modal_link#{asset.id}", data: { no_turbolink: true, id: asset.id, gallery_view_id: gallery_view_id, preview_url: asset_file_preview_path(asset) } do %> <% if asset.file.attached? && asset&.file&.metadata['asset_type'] %> <%= asset.file.metadata['name'] %> <% else %> <%= asset.file_name %> <% end %> <% end %>
<%= render partial: 'assets/asset_context_menu.html.erb', locals: { asset: asset, deletable: deletable, editable: editable } %>
<% if wopi_enabled? && wopi_file?(asset) %>
<% elsif asset.previewable? %>
<%= image_tag asset.large_preview, onerror: 'ActiveStoragePreviews.reCheckPreview(event)', onload: 'ActiveStoragePreviews.showPreview(event)', style: 'opacity: 0' %>
<% else %>
<% end %>