mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
737f9e572c
* Replace marvinJS logo and fix some merge issues * Fix tests
32 lines
1.2 KiB
Text
32 lines
1.2 KiB
Text
<div class="attachment-placeholder pull-left">
|
|
|
|
<div class="attachment-thumbnail <%= asset.previewable? ? '' : 'no-shadow' %> <%= asset.file.attached? ? asset.file.metadata['asset_type'] : '' %>">
|
|
<% 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">
|
|
<% if asset.file.attached? && asset&.file&.metadata['asset_type'] %>
|
|
<%= truncate(asset.file.metadata['name'], length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
|
<% else %>
|
|
<%= truncate(asset.file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
|
<% end %>
|
|
</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>
|