mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 10:06:53 +08:00
36 lines
1.3 KiB
Text
36 lines
1.3 KiB
Text
|
<div class="list-attachment-container asset"
|
||
|
data-asset-id="<%= asset.id %>"
|
||
|
data-asset-file-name="<%= asset.file_name %>"
|
||
|
data-asset-updated-at="<%= asset.updated_at.to_i %>"
|
||
|
data-asset-order="1"
|
||
|
>
|
||
|
<div class="file-icon">
|
||
|
<i class="fas <%= file_fa_icon_class(asset) if asset.file_name %>"></i>
|
||
|
</div>
|
||
|
<%= link_to rails_blob_path(asset.file, disposition: 'attachment'),
|
||
|
class: "file-preview-link file-name",
|
||
|
id: "modal_link#{asset.id}",
|
||
|
data: { no_turbolink: true, id: true, 'preview-url': asset_file_preview_path(asset)} do %>
|
||
|
<%= asset.file_name %>
|
||
|
<% end %>
|
||
|
<div class="file-metadata">
|
||
|
<span><%= t('assets.placeholder.modified_label') %> <%= l(asset.updated_at, format: :full_date) if asset.updated_at %></span>
|
||
|
<span><%= number_to_human_size(asset.file_size) %></span>
|
||
|
</div>
|
||
|
<div class="change-preview-type"
|
||
|
data-preview-type="inline"
|
||
|
data-toggle-view-url="<%= toggle_view_mode_path(asset) %>">
|
||
|
<i class="fas fa-desktop"></i>
|
||
|
</div>
|
||
|
<div class="change-preview-type"
|
||
|
data-preview-type="list"
|
||
|
data-toggle-view-url="<%= toggle_view_mode_path(asset) %>">
|
||
|
<i class="fas fa-list"></i>
|
||
|
</div>
|
||
|
<div class="change-preview-type"
|
||
|
data-preview-type="thumbnail"
|
||
|
data-toggle-view-url="<%= toggle_view_mode_path(asset) %>">
|
||
|
<i class="fas fa-th-large"></i>
|
||
|
</div>
|
||
|
</div>
|