demarches-normaliennes/app/views/shared/piece_jointe/_pj_link.html.haml

21 lines
784 B
Text
Raw Normal View History

- if pj.attached?
.pj-link
- if pj.virus_scanner.safe? || !pj.virus_scanner.started?
= link_to url_for(pj), target: '_blank', rel: 'noopener', title: "Télécharger la pièce jointe" do
%span.icon.attachment
= pj.filename.to_s
- if !pj.virus_scanner.started?
(ce fichier na pas été analysé par notre antivirus, téléchargez-le avec précaution)
- else
= pj.filename.to_s
2019-04-25 12:56:25 +02:00
- if pj.virus_scanner.pending?
(analyse antivirus en cours
= link_to "rafraichir", request.path
)
2019-04-25 12:56:25 +02:00
- elsif pj.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é)