scinote-web/app/views/steps/attachments/_item.html.erb
2019-07-10 14:37:23 +02:00

16 lines
744 B
Text

<div class="pseudo-attachment-container" style="order: <%= assets_count - i %>">
<%= link_to download_asset_path(asset),
class: 'file-preview-link',
id: "modal_link#{asset.id}",
data: { no_turbolink: true,
id: true,
'preview-url': asset_file_preview_path(asset),
'order-atoz': az_ordered_assets_index(step, asset.id),
'order-ztoa': assets_count - az_ordered_assets_index(step, asset.id),
'order-old': i,
'order-new': assets_count - i,
} do %>
<%= render partial: 'shared/asset_placeholder.html.erb', locals: { edit_page: false, asset: asset } %>
<% end %>
</div>