<% 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) %>
<% end %>
<% if step.tables.any? %>
<% 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 %>
<% end %>
<% if import %>
<%= render partial: 'steps/attachments/preview_list.html.erb',
locals: { attachments: steps_assets[step.position]} %>
<% else %>
<%= render partial: 'steps/attachments/list.html.erb', locals: { step: step, preview: preview } %>
<% end %>
<% unless step.checklists.blank? then %>
<% step.checklists.asc.each do |checklist| %>
<%= custom_auto_link(checklist.name, team: current_team) %>
<% if checklist.checklist_items.blank? %>
<%= t("protocols.steps.empty_checklist") %>
<% else %>
<% ordered_checklist_items(checklist).each do |checklist_item| %>
<% end %>
<% end %>
<% end %>
<% end %>
<% unless import %>
<%= render partial: 'steps/comments.html.erb', locals: { comments: step.last_comments,
comments_count: step.step_comments.count,
step: step } %>
<% end %>