<% preview = (defined?(preview) ? preview : false) %> <% import = (defined?(import) ? import : false) %>
">
<% if can_complete_or_checkbox_step?(@protocol) && !(preview) %> <% if step.completed? %>
<% else %>
<% end %> <% end %> <% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %> " data-remote="true"> " data-remote="true"> " href="<%= edit_step_path(step, format: :json) %>" data-remote="true" > <%= link_to(step_path(step), title: t("protocols.steps.options.delete_title"), method: "delete", class: "btn btn-link", 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 %>