<% if @protocol.description.present? %>
<%= custom_auto_link(@protocol.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team) %>
<% else %>
<%= t('my_modules.protocols.protocol_status_bar.no_description') %>
<% end %>
<% @protocol.steps.order(position: :asc).each do |step| %>
<% if step.completed_on %>
<%= image_tag "check-circle-solid.svg" %>
<% else %>
<% end %>
<%= step.position + 1 %>. <%= step.name %>
<% if step.description.blank? %>
<%= t('protocols.steps.no_description') %>
<% else %>
<%= custom_auto_link(step.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team,
preview_repository: true) %>
<% end %>
<% step.checklists.each do |checklist| %>
<%= smart_annotation_parser(checklist.name, current_team).html_safe %>
<% checklist.checklist_items.order(position: :asc).each do |checklist_item| %>
<% if checklist_item.checked %>
<%= image_tag "check-square-solid.svg" %>
<% else %>
<% end %>
<%= smart_annotation_parser(checklist_item.text, current_team).html_safe %>
<% end %>
<% end %>
<% step.tables.each do |table| %>
<%= auto_link(simple_format(table.name),
link: :urls,
html: { target: '_blank' }) %>
<%= hidden_field(table, :contents, value: table.contents_utf_8, class: "hot-contents") %>
<% end %>
<% step.assets.where(view_mode: "inline").each do |asset| %>
<% if asset.previewable? %>
<%= image_tag asset.large_preview %>
<% end %>
<%= asset.render_file_name %>
<% end %>
<% step.assets.where(view_mode: "list").each do |asset| %>
<%= file_extension_icon_html(asset) %>
<%= asset.render_file_name %>
<% end %>
<% step.assets.where(view_mode: "thumbnail").each do |asset| %>
<% if asset.previewable? %>
<%= image_tag asset.blob.representation(resize_to_limit: Constants::MEDIUM_PIC_FORMAT).processed %>
<% end %>
<%= asset.render_file_name %>
<% end %>
<% if params[:include_comments] && step.comments.present? %>
<% end %>
<%= t('Comments') %>:
<% step.step_comments.each do |comment| %>