diff --git a/app/components/attachment/show_component/show_component.html.haml b/app/components/attachment/show_component/show_component.html.haml index 681aab1fb..49b9768df 100644 --- a/app/components/attachment/show_component/show_component.html.haml +++ b/app/components/attachment/show_component/show_component.html.haml @@ -1,6 +1,6 @@ %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, virus_not_analized: !attachment.virus_scanner.started?, new_tab: new_tab) + = render Dsfr::DownloadComponent.new(attachment: attachment, virus_not_analyzed: !attachment.virus_scanner.started?, new_tab: new_tab) - else .attachment-filename.fr-mb-1w.fr-mr-1w= attachment.filename.to_s diff --git a/app/components/dsfr/download_component.rb b/app/components/dsfr/download_component.rb index b129c4193..ef1e8862f 100644 --- a/app/components/dsfr/download_component.rb +++ b/app/components/dsfr/download_component.rb @@ -3,15 +3,15 @@ class Dsfr::DownloadComponent < ApplicationComponent attr_reader :html_class attr_reader :name attr_reader :ephemeral_link - attr_reader :virus_not_analized + attr_reader :virus_not_analyzed attr_reader :new_tab - def initialize(attachment:, name: nil, url: nil, ephemeral_link: false, virus_not_analized: false, new_tab: false) + def initialize(attachment:, name: nil, url: nil, ephemeral_link: false, virus_not_analyzed: false, new_tab: false) @attachment = attachment @name = name || attachment.filename.to_s @url = url @ephemeral_link = ephemeral_link - @virus_not_analized = virus_not_analized + @virus_not_analyzed = virus_not_analyzed @new_tab = new_tab end diff --git a/app/components/dsfr/download_component/download_component.html.haml b/app/components/dsfr/download_component/download_component.html.haml index 6b0a63b58..71d53624a 100644 --- a/app/components/dsfr/download_component/download_component.html.haml +++ b/app/components/dsfr/download_component/download_component.html.haml @@ -9,6 +9,6 @@ %span.fr-icon-questionnaire-line{ "aria-hidden": "true" } = t('.ephemeral_link') - - if virus_not_analized + - if virus_not_analyzed .fr-text--xs.fr-text-mention--grey = t('.virus_not_analyzed')