<% step.step_orderable_elements.order(position: :asc).each do |step_element| %>
<% case step_element.orderable_type %>
<% when 'StepText' %>
<% step_text = step_element.orderable %>
<%= custom_auto_link(step_text.tinymce_render(:text).gsub(/
\S<\/p>/, '').strip,
simple_format: false,
tags: %w(img),
team: current_team,
preview_repository: true) %>
<% when 'StepTable' %>
<% table = step_element.orderable.table %>
<%= auto_link(simple_format(table.name),
link: :urls,
html: { target: '_blank' }) %>
<%= hidden_field(table, :contents, value: table.contents_utf_8, class: "hot-contents") %>
<%= hidden_field(table, :metadata, value: table.metadata ? table.metadata.to_json : nil, class: "hot-metadata" ) %>
<% when 'Checklist' %>
<% checklist = step_element.orderable %>
<%= 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 %>
<% end %>
<% step.assets.where(view_mode: "inline").each do |asset| %>
<% end %>
<% step.assets.where(view_mode: "list").each do |asset| %>
<%= t('Comments') %>:
<% step.step_comments.each do |comment| %>