2022-11-17 19:18:58 +01:00
|
|
|
%div{ id: dom_id(attachment, :show), class: class_names("attachment-error": error?, "fr-mb-2w": !should_display_link?) }
|
2022-11-09 12:33:20 +01:00
|
|
|
- if should_display_link?
|
2022-12-05 15:59:50 +01:00
|
|
|
= render Dsfr::DownloadComponent.new(attachment: attachment, new_tab: new_tab) do |c|
|
2022-11-07 16:09:15 +01:00
|
|
|
- if !attachment.virus_scanner.started?
|
2022-11-09 12:33:20 +01:00
|
|
|
- c.right do
|
2022-11-22 19:25:45 +01:00
|
|
|
= "(#{t(".virus_not_analyzed")})"
|
2019-05-21 14:21:13 +02:00
|
|
|
|
2022-11-09 12:33:20 +01:00
|
|
|
- else
|
2022-11-22 17:12:16 +01:00
|
|
|
.attachment-filename.fr-mb-1w.fr-mr-1w= attachment.filename.to_s
|
2021-04-06 16:32:45 +02:00
|
|
|
|
2022-11-22 15:47:28 +01:00
|
|
|
= render Attachment::ProgressComponent.new(attachment: attachment)
|
|
|
|
|
2022-11-09 12:33:20 +01:00
|
|
|
- if error?
|
|
|
|
%p.fr-error-text= error_message
|