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

15 lines
552 B
Text
Raw Normal View History

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