- <%= custom_auto_link(step.tinymce_render(:description),
+
+ <% 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),
simple_format: false,
tags: %w(img),
team: current_team,
preview_repository: true) %>
- <% end %>
-
-
<%= 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 %>
-
+ <% when 'StepTable' %>
+ <% table = step_element.orderable.table %>
+
+ <% 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| %>