mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
18 lines
618 B
Text
18 lines
618 B
Text
<%= link_to download_asset_path(asset),
|
|
data: { no_turbolink: true,
|
|
id: true,
|
|
status: 'asset-present' } do %>
|
|
<%= image_tag preview_asset_path(asset) if asset.is_image? %>
|
|
|
|
<% if wopi_file?(asset) %>
|
|
<%= wopi_asset_file_name(asset) %>
|
|
<% else %>
|
|
<p><%= truncate(asset.file_file_name,
|
|
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
|
<% end %>
|
|
<% end %>
|
|
<%= wopi_asset_view_button(asset) %>
|
|
<% view_only ||= false %>
|
|
<% if !view_only && can_edit_step_in_protocol(@protocol) %>
|
|
<%= wopi_asset_edit_button(asset) %>
|
|
<% end %>
|