<% if strip_tags(step.description).blank? %>
<%= t("protocols.steps.no_description") %>
<% else %>
<%= sanitize_input(generate_image_tag_from_token(step.description, step), ['img']) %>
<% end %>
<% unless step.tables.blank? then %>
<% step.tables.each do |table| %>
<%= table.name %>
<%= hidden_field(table, :contents, value: table.contents_utf_8, class: "hot-contents") %>
<% end %>
<% end %>
<% assets = ordered_assets(step) %>
<% unless assets.blank? then %>
<%= t("protocols.steps.files") %>
<% assets.each do |asset| %>
-
<% if can_read_protocol_in_repository?(@protocol) %>
<% if asset.file_present %>
<% if asset.file.processing? %>
<%= image_tag 'medium/processing.gif' %>
<% else %>
<% if asset.is_image? %>
<%= link_to download_asset_path(asset),
class: 'file-preview-link',
id: "modal_link#{asset.id}",
data: {no_turbolink: true, id: true, status: "asset-present",
description: "#{step.position + 1}. #{truncate(step.name, length: Constants::FILENAME_TRUNCATION_LENGTH)}"} do %>
<%= image_tag asset.url(:medium), data: {'preview-url': asset_file_preview_path(asset)} %>
<%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
<% end %>
<% else %>
<%= render partial: 'steps/wopi_controlls.html.erb', locals: { asset: asset, view_only: true } %>
<% end %>
<% end %>
<% else %>
<%= image_tag 'medium/processing.gif' %>
<% end %>
<% else %>
<% if asset.file.processing? %>
<%= image_tag 'medium/processing.gif' %>
<% else %>
<%= image_tag asset.url(:medium) if asset.is_image? %>
<% end %>
<%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
<% end %>
<% end %>
<% end %>
<% unless step.checklists.blank? then %>
<% end %>