2016-07-21 19:11:15 +08:00
|
|
|
<% if can_view_or_download_result_assets(result.my_module) %>
|
2016-08-17 21:51:04 +08:00
|
|
|
<%= link_to download_asset_path(result.asset), data: {no_turbolink: true} do %>
|
|
|
|
<%= image_tag(preview_asset_path result.asset) if result.asset.is_image? %>
|
2016-10-05 23:45:20 +08:00
|
|
|
<p><%= truncate(result.asset.file_file_name,
|
|
|
|
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
2016-08-17 21:51:04 +08:00
|
|
|
<% end %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= image_tag(preview_asset_path result.asset) if result.asset.is_image? %>
|
|
|
|
<p><%= result.asset.file_file_name %></p>
|
|
|
|
<% end %>
|