mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 06:06:56 +08:00
10 lines
502 B
Text
10 lines
502 B
Text
<% if can_view_or_download_result_assets(result.my_module) %>
|
|
<%= link_to download_asset_path(result.asset), data: {no_turbolink: true} do %>
|
|
<%= image_tag(preview_asset_path result.asset) if result.asset.is_image? %>
|
|
<p><%= truncate(result.asset.file_file_name,
|
|
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
|
<% end %>
|
|
<% else %>
|
|
<%= image_tag(preview_asset_path result.asset) if result.asset.is_image? %>
|
|
<p><%= result.asset.file_file_name %></p>
|
|
<% end %>
|