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