<%= 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 %> <%= asset.render_file_name %> <% end %>
<%= render partial: 'assets/asset_context_menu.html.erb', locals: { asset: asset, deletable: deletable, editable: editable } %>
<% if wopi_enabled? && wopi_file?(asset) %> <% if asset.file_size.positive? %>
<% else %>

<%= t('assets.empty_office_file.description') %>

<%= link_to(load_asset_path(asset), remote: true, class: 'btn btn-primary reload-asset', params: { asset: {view_mode: asset.view_mode }}) do %> <%= t('assets.empty_office_file.reload') %> <% end %>
<% end %> <% elsif asset.pdf_previewable? %> <%= render partial: 'shared/pdf_viewer.html.erb', locals: { asset: asset, report_document: false } %> <% elsif asset.previewable? %>
<%= image_tag asset.large_preview, class: 'asset-inline-image', style: 'opacity: 0' %>
<%= javascript_include_tag 'assets/asset_inline' %> <% else %>
<% end %>