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

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

<% if !(preview) && (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) %> <%= render partial: '/assets/marvinjs/create_marvin_sketch_button.html.erb', locals: { element_id: step.id, element_type: 'Step', sketch_container: ".attachments[data-step-id=#{step.id}]" } %> <%= render partial: '/assets/wopi/create_wopi_file_button.html.erb', locals: { element_id: step.id, element_type: 'Step' } %> <% end %>
<% assets.each_with_index do |asset, i| %> <%= render partial: 'assets/asset.html.erb', locals: { asset: asset } %> <% end %>