<% assets = step.assets.joins(file_attachment: :blob) %> <% current_order = step.current_view_state(current_user).state.dig('assets', 'sort') %>

<%= t('protocols.steps.files', count: assets.length) %>

<% unless preview %>
<% end %>
<% assets.each_with_index do |asset, i| %> <%= render partial: 'assets/asset.html.erb', locals: { asset: asset, gallery_view_id: step.id } %> <% end %>