2019-06-05 18:52:43 +08:00
|
|
|
<% if asset.file.processing? && (asset.is_image? || asset.file.previewable_document?) %>
|
2019-05-13 22:53:58 +08:00
|
|
|
<% asset_status = 'asset-loading' %>
|
2019-05-21 23:29:33 +08:00
|
|
|
<% present_url = file_present_asset_path(asset.id) %>
|
2019-05-13 22:53:58 +08:00
|
|
|
<% else %>
|
|
|
|
<% asset_status = 'asset-present' %>
|
|
|
|
<% present_url = '' %>
|
|
|
|
<% end %>
|
|
|
|
|
2019-05-06 15:56:26 +08:00
|
|
|
<div class="pseudo-attachment-container" style="order: <%= assets_count - i %>">
|
2019-04-26 21:20:39 +08:00
|
|
|
<%= link_to download_asset_path(asset),
|
2019-04-09 16:00:56 +08:00
|
|
|
class: 'file-preview-link',
|
|
|
|
id: "modal_link#{asset.id}",
|
2019-05-13 22:53:58 +08:00
|
|
|
data: { no_turbolink: true,
|
|
|
|
id: true,
|
|
|
|
status: asset_status,
|
|
|
|
'present-url': present_url,
|
2019-04-09 16:00:56 +08:00
|
|
|
'preview-url': asset_file_preview_path(asset),
|
2019-06-11 16:08:33 +08:00
|
|
|
'order-atoz': order_atoz,
|
|
|
|
'order-ztoa': order_ztoa,
|
2019-04-09 16:00:56 +08:00
|
|
|
'order-old': i,
|
|
|
|
'order-new': assets_count - i,
|
|
|
|
} do %>
|
|
|
|
|
2019-04-26 21:20:39 +08:00
|
|
|
<%= render partial: 'steps/attachments/placeholder.html.erb',
|
2019-04-23 19:35:10 +08:00
|
|
|
locals: { edit_page: false, asset: asset } %>
|
2019-04-26 21:20:39 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|