demarches-normaliennes/app/components/attachment/multiple_component/multiple_component.html.haml

12 lines
625 B
Text

.fr-mb-4w.attachment-multiple
= template
- each_attachment do |attachment, index|
%div{ id: dom_id(attachment) }
= render Attachment::EditComponent.new(champ:, attached_file:, attachment:, index:, as_multiple: true, user_can_destroy:, user_can_download:)
%div{ id: empty_component_id, class: class_names("hidden": !can_attach_next?) }
= render Attachment::EditComponent.new(champ:, attached_file:, attachment: nil, index: attachments_count, user_can_destroy:)
// single poll and refresh message for all attachments
= render Attachment::PendingPollComponent.new(attachments: attachments, poll_url:)