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

15 lines
825 B
Text
Raw Normal View History

.attachment-multiple{ class: class_names("fr-downloads-group": view_as == :download, "destroyable": user_can_destroy?) }
= template
- if @attachments.size >= 1
%ul.fr-my-1v
- each_attachment do |attachment, index|
%li{ id: dom_id(attachment) }
2024-02-13 08:04:27 +01:00
= render Attachment::EditComponent.new(champ:, attached_file:, attachment:, index:, view_as:, user_can_destroy:, form_object_name:)
2024-06-27 14:05:48 +02:00
%div{ id: empty_component_id, data: { turbo_force: :server } }
= render Attachment::EditComponent.new(champ:, as_multiple: champ.nil?, attached_file:, attachment: nil, index: attachments_count, user_can_destroy:, form_object_name:, max: @max)
// single poll and refresh message for all attachments
= render Attachment::PendingPollComponent.new(attachments: attachments, poll_url:, context: poll_context)