mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 14:46:00 +08:00
db7c6435b3
Implement saving of attachments ordering on steps [SCI-3436]
27 lines
1 KiB
Text
27 lines
1 KiB
Text
<% if asset.file.processing? && (asset.is_image? || asset.file.previewable_document?) %>
|
|
<% asset_status = 'asset-loading' %>
|
|
<% present_url = file_present_asset_path(asset.id) %>
|
|
<% else %>
|
|
<% asset_status = 'asset-present' %>
|
|
<% present_url = '' %>
|
|
<% end %>
|
|
|
|
<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,
|
|
status: asset_status,
|
|
'present-url': present_url,
|
|
'preview-url': asset_file_preview_path(asset),
|
|
'order-atoz': order_atoz,
|
|
'order-ztoa': order_ztoa,
|
|
'order-old': i,
|
|
'order-new': assets_count - i,
|
|
} do %>
|
|
|
|
<%= render partial: 'steps/attachments/placeholder.html.erb',
|
|
locals: { edit_page: false, asset: asset } %>
|
|
<% end %>
|
|
</div>
|