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

32 lines
1.3 KiB
Text
Raw Normal View History

.attachment-link{ id: dom_id(attachment, :show) }
- if should_display_link?
2019-05-21 14:21:13 +02:00
= link_to url_for(attachment.blob), target: '_blank', rel: 'noopener', title: "Télécharger la pièce jointe" do
%span.icon.attached
2019-05-21 14:21:13 +02:00
= attachment.filename.to_s
- if !attachment.virus_scanner.started?
(ce fichier na pas été analysé par notre antivirus, téléchargez-le avec précaution)
- else
%span{ data: poll_controller_options }
2019-05-21 14:21:13 +02:00
= attachment.filename.to_s
%span.fr-text-mention--grey
- if attachment.virus_scanner.pending?
(analyse antivirus en cours
= link_to "rafraichir", attachment_path, data: { action: 'turbo-poll#refresh' }
)
- elsif attachment.watermark_pending?
(traitement de la pièce en cours
= link_to "rafraichir", attachment_path, data: { action: 'turbo-poll#refresh' }
)
- elsif attachment.virus_scanner.infected?
- if user_can_upload?
(virus détecté, merci denvoyer un autre fichier)
- else
(virus détecté, le téléchargement de ce fichier est bloqué)
- elsif attachment.virus_scanner.corrupt?
- if user_can_upload?
(le fichier est corrompu, merci denvoyer un autre fichier)
- else
(le fichier est corrompu, le téléchargement est bloqué)
2021-04-06 16:32:45 +02:00