<% preview = (defined?(preview) ? preview : false) %> <% import = (defined?(import) ? import : false) %>
" data-id="<%= step.id %>">
<% if !preview && @protocol.my_module %> <% end %> <% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %> <%= link_to(move_up_step_path(step), class: 'btn btn-light icon-btn', title: t('protocols.steps.options.up_arrow_title'), remote: true, method: :put, data: { action: 'move-step', direction: :up }) do %> <% end %> <%= link_to(move_down_step_path(step), class: 'btn btn-light icon-btn', title: t('protocols.steps.options.down_arrow_title'), remote: true, method: :put, data: { action: 'move-step', direction: :down }) do %> <% end %> <%= link_to(edit_step_path(step), title: t('protocols.steps.options.edit_title'), class: 'btn btn-light icon-btn', remote: true, data: { action: 'edit-step' }) do %> <% end %> <%= link_to(step_path(step), title: t('protocols.steps.options.delete_title'), method: :delete, class: 'btn btn-light icon-btn', data: { action: 'delete-step', confirm: t('protocols.steps.destroy.confirm', step: step.name) }) do %> <% end %> <% end %>
<% 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.empty? %>
<%= 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 %>