2019-07-08 23:22:29 +08:00
|
|
|
<% if @step_description[:body].present? %>
|
2019-06-18 23:47:08 +08:00
|
|
|
<p> <%= sanitize(@step_description[:body], tags: Constants::PROTOCOLS_DESC_TAGS) %> </p>
|
2019-06-03 18:42:15 +08:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% @step_description[:components]&.each do |component| %>
|
|
|
|
<% sanitized_component = component.except('type') %>
|
2019-06-18 23:47:08 +08:00
|
|
|
<% sanitized_component[:body] = sanitize(component[:body], tags: Constants::PROTOCOLS_DESC_TAGS) if component[:body] %>
|
2019-06-03 18:42:15 +08:00
|
|
|
<%= render partial: "protocol_importers/templates/#{component[:type]}", locals: { item: sanitized_component } %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% @step_description[:extra_content]&.each do |i| %>
|
|
|
|
<b><%= strip_tags i[:title] %>:</b> <br/>
|
2019-06-18 23:47:08 +08:00
|
|
|
<%= sanitize(i[:body], tags: Constants::PROTOCOLS_DESC_TAGS) %><br/>
|
2019-06-03 18:42:15 +08:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|