">
<%= step.position + 1 %>
<% if can_reorder_step_in_protocol(@protocol) %> " data-remote="true"> " data-remote="true"> <% end %> <% if can_edit_step_in_protocol(@protocol) %> " href="<%= edit_step_path(step, format: :json) %>" data-remote="true"> <% end %> <% if can_delete_step_in_protocol(@protocol) && step.can_destroy? %> <%= 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 %>
<%= step.name %> | <%= raw t("protocols.steps.published_on", timestamp: l(step.created_at, format: :full), user: step.user.full_name) %>
<% if strip_tags(step.description).blank? %> <%= t('protocols.steps.no_description') %> <% else %>
<%= auto_link(step.description, link: :urls, html: { target: '_blank' }).html_safe %>
<% end %>

<% unless step.tables.blank? then %>
<%= t('protocols.steps.tables') %> <% step.tables.each do |table| %>
<%= hidden_field(table, :contents, value: table.contents_utf_8, class: "hot-contents") %>
<% end %>
<% end %> <% assets = ordered_assets(step) %> <% unless assets.blank? then %>
<%= t("protocols.steps.files") %>
    <% assets.each do |asset| %>
  • <% if can_view_or_download_step_assets(@protocol) %> <% if asset.file_present %> <%= link_to download_asset_path(asset), data: { no_turbolink: true, id: true, status: 'asset-present' } do %> <%= image_tag preview_asset_path(asset) if asset.is_image? %> <% if wopi_file?(asset) %>

    <%= file_extension_icon(asset) %> <%= truncate(asset.file_file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>

    <% else %>

    <%= truncate(asset.file_file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>

    <% end %> <% end %> <% if asset.can_perform_action('view') %> <%= link_to view_asset_url(id: asset), class: 'btn btn-default btn-sm', target: '_blank', style: 'display: inline-block' do %> <%= file_application_icon(asset) %> <%= wopi_button_text(asset, 'view') %> <% end %> <% end %> <% if can_edit_step_in_protocol(@protocol) && asset.can_perform_action('edit') %> <%= link_to edit_asset_url(id: asset), class: 'btn btn-default btn-sm', target: '_blank', style: 'display: inline-block' do %> <%= file_application_icon(asset) %> <%= wopi_button_text(asset, 'edit') %> <% end %> <% end %> <% else %> <%= asset_loading_span(asset) %> <% end %> <% else %> <%= image_tag preview_asset_path(asset) if asset.is_image? %>

    <%= file_extension_icon(asset) %> <%= truncate(asset.file_file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>

    <% end %>
  • <% end %>
<% end %> <% unless step.checklists.blank? then %>
<% step.checklists.each do |checklist| %> <%= auto_link(simple_format(checklist.name), link: :urls, html: { target: '_blank' }) %> <% if checklist.checklist_items.empty? %>
<%= t("protocols.steps.empty_checklist") %>
<% else %> <% ordered_checklist_items(checklist).each do |checklist_item| %>
>
<% end %> <% end %> <% end %>
<% end %> <% if @protocol.in_module? %> <% if !step.completed? and can_complete_step_in_protocol(@protocol) %>
<% elsif step.completed? and can_uncomplete_step_in_protocol(@protocol) %>
<% end %> <% end %>
<% if can_view_step_comments(@protocol) %>
<% end %>