diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb index ea4530bf9..1a927de67 100644 --- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb @@ -112,9 +112,17 @@
<%= truncate(asset.file_file_name, - length: Constants::FILENAME_TRUNCATION_LENGTH) %>
+ <% if can_view_or_download_step_assets(@protocol) %> + <%= 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? %> +<%= truncate(asset.file_file_name, + length: Constants::FILENAME_TRUNCATION_LENGTH) %>
+ <% end %> + <% else %> + <%= image_tag preview_asset_path(asset) if asset.is_image? %> +<%= truncate(asset.file_file_name, + length: Constants::FILENAME_TRUNCATION_LENGTH) %>
+ <% end %>