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..a9ff09d72 100644 --- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb @@ -109,12 +109,20 @@
<%= 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 %>