<% preview = (defined?(preview) ? preview : 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" data-tooltiplink="<%= I18n.t('tooltips.link.protocol.step_edit') %>" data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.step_edit') %>" > <%= 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 %>
<% unless step.tables.blank? then %>

<% 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 %> <%= render partial: 'steps/attachments/list.html.erb', locals: { step: step, preview: preview } %> <% 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 %>

<%= render partial: 'steps/comments.html.erb', locals: { comments: step.last_comments, comments_count: step.step_comments.count, step: step } %>