mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 14:46:00 +08:00
26 lines
949 B
Text
26 lines
949 B
Text
<div class="attachment-placeholder pull-left">
|
|
<div class="attachment-thumbnail <%= asset.previewable? ? '' : 'no-shadow' %>">
|
|
<% if asset.previewable? %>
|
|
<%= image_tag asset.medium_preview %>
|
|
<% else %>
|
|
<i class="fas <%= file_fa_icon_class(asset) if asset.file_name %>"></i>
|
|
<% end %>
|
|
</div>
|
|
<div class="attachment-label">
|
|
<%= truncate(asset.file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
|
</div>
|
|
<div class="spencer-bonnet-modif">
|
|
<%= t('assets.placeholder.modified_label') %> <%= l(asset.updated_at, format: :full_date) if asset.updated_at %> <br>
|
|
<%= number_to_human_size(asset.file_size) %>
|
|
</div>
|
|
|
|
<% if edit_page %>
|
|
<div class="remove-icon pull-right">
|
|
<% unless ff.object.file.attached? && ff.object.locked? %>
|
|
<%= ff.remove_nested_fields_link do %>
|
|
<span class="fas fa-trash"></span>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|