<% assets = ordered_assets step %>

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

<% if MarvinJsAsset.enabled? && (can_manage_protocol_in_module?(step.protocol) || can_manage_protocol_in_repository?(step.protocol)) %> <%= render partial: '/assets/marvinjs/create_marvin_sketch_button.html.erb', locals: { element_id: step.id, element_type: 'Step', sketch_container: ".attacments#att-#{step.id}" } %> <% end %> <%= render partial: '/assets/wopi/create_wopi_file_button.html.erb', locals: { element_id: step.id, element_type: 'Step' } %>
<% assets.each_with_index do |asset, i| %> <% if asset.class.name == 'Asset' %> <%= render partial: 'steps/attachments/item.html.erb', locals: { asset: asset, i: i, assets_count: assets.count, step: step } %> <% elsif asset.class.name == 'MarvinJsAsset' %> <%= render partial: 'assets/marvinjs/marvin_sketch_card.html.erb', locals: { sketch: asset, i:i, assets_count: assets.count, step: step} %> <% end %> <% end %>