<%= l(@protocol.created_at, format: :full) %>
<%= render partial: "protocols/header/updated_at_label.html.erb" %>
<%= @protocol.added_by.full_name %>
<%= render partial: "protocols/header/keywords_label.html.erb" %>
<%= render partial: "protocols/header/authors_label.html.erb" %>
<%= render partial: "protocols/header/description_label.html.erb" %>

<%= t("protocols.steps.subtitle") %>

<% protocol.steps.order(:position).each do |step| %>
">
<%= step.position + 1 %>
<%= 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 %>
<%= step.description.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) %> <%= 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? %>

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

    <% end %> <% else %> <%= image_tag preview_asset_path(asset) if asset.is_image? %>

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

    <% end %>
  • <% end %>
<% end %> <% unless step.checklists.blank? then %>
<% step.checklists.each do |checklist| %> <%= checklist.name %> <% if checklist.checklist_items.empty? %>
<%= t("protocols.steps.empty_checklist") %>
<% else %> <% ordered_checklist_items(checklist).each do |checklist_item| %>
<% end %> <% end %> <% end %>
<% end %>
<% end %>
<% if protocol.steps.count == 0 %>
<%= t("protocols.steps.no_steps") %>
<% end %>