2023-06-26 11:47:20 +02:00
|
|
|
.attachment-multiple{ class: class_names("fr-downloads-group": view_as == :download, "destroyable": user_can_destroy?), **replace_controller_attributes }
|
2022-10-25 14:14:24 +02:00
|
|
|
= template
|
|
|
|
|
2023-06-26 11:47:20 +02:00
|
|
|
- if @attachments.size >= 1
|
|
|
|
%ul.fr-my-1v
|
|
|
|
- each_attachment do |attachment, index|
|
|
|
|
%li{ id: dom_id(attachment) }
|
|
|
|
= render Attachment::EditComponent.new(champ:, attached_file:, attachment:, index:, as_multiple: true, view_as:, user_can_destroy:, user_can_replace:, form_object_name:)
|
2022-10-25 14:14:24 +02:00
|
|
|
|
2023-11-10 12:02:52 +01:00
|
|
|
%div{ id: empty_component_id, class: class_names("hidden": !can_attach_next?), data: { turbo_force: :server } }
|
2022-12-13 16:13:31 +01:00
|
|
|
= render Attachment::EditComponent.new(champ:, attached_file:, attachment: nil, index: attachments_count, user_can_destroy:, user_can_replace:, form_object_name:)
|
2022-10-25 14:14:24 +02:00
|
|
|
|
2022-11-09 12:33:20 +01:00
|
|
|
// single poll and refresh message for all attachments
|
2022-12-07 18:36:03 +01:00
|
|
|
= render Attachment::PendingPollComponent.new(attachments: attachments, poll_url:, context: poll_context)
|