diff --git a/app/helpers/conservation_de_donnees_helper.rb b/app/helpers/conservation_de_donnees_helper.rb index 5a38b1347..562288d6a 100644 --- a/app/helpers/conservation_de_donnees_helper.rb +++ b/app/helpers/conservation_de_donnees_helper.rb @@ -10,7 +10,6 @@ module ConservationDeDonneesHelper def conservation_dans_ds(procedure) if procedure.duree_conservation_dossiers_dans_ds.present? I18n.t('users.procedure_footer.legals.data_retention', - application_name: Current.application_name, duree_conservation_dossiers_dans_ds: procedure.duree_conservation_dossiers_dans_ds) end end diff --git a/app/views/commencer/show.html.haml b/app/views/commencer/show.html.haml index 545789f98..3c5619bfb 100644 --- a/app/views/commencer/show.html.haml +++ b/app/views/commencer/show.html.haml @@ -3,8 +3,8 @@ .commencer.form - if !user_signed_in? = render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c| - - c.with_body do - = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token) } + - c.with_html_body do + = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3 } %ul.fr-btns-group.fr-btns-group--inline %li = link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn' do diff --git a/app/views/shared/_france_connect_login.html.haml b/app/views/shared/_france_connect_login.html.haml index 688f2a2cc..2837e06e8 100644 --- a/app/views/shared/_france_connect_login.html.haml +++ b/app/views/shared/_france_connect_login.html.haml @@ -1,6 +1,6 @@ - if FranceConnectService.enabled? .france-connect-login - %h2.fr-h6 + = tag.public_send(local_assigns.fetch(:heading_level, :h2), class: "fr-h6") do = t('views.shared.france_connect_login.title') %p = t('views.shared.france_connect_login.description') diff --git a/app/views/shared/_procedure_description.html.haml b/app/views/shared/_procedure_description.html.haml index e1cce58eb..2b6bd2593 100644 --- a/app/views/shared/_procedure_description.html.haml +++ b/app/views/shared/_procedure_description.html.haml @@ -1,8 +1,5 @@ .procedure-logos - - procedure_logo_alt = '' - - if procedure.service.present? - - procedure_logo_alt = "#{procedure.service.nom} − #{procedure.service.organisme}" - = image_tag procedure.logo_url, alt: procedure_logo_alt + = image_tag procedure.logo_url, alt: '' - if procedure.euro_flag = image_tag("flag_of_europe.svg", id: 'euro_flag', class: (!procedure.euro_flag ? "hidden" : "")) %h1.fr-h2 @@ -11,7 +8,7 @@ - if procedure.persisted? && procedure.estimated_duration_visible? %p %small - %span.fr-icon-timer-line + %span.fr-icon-timer-line{ "aria-hidden" => "true" } = t('shared.procedure_description.estimated_fill_duration', estimated_minutes: estimated_fill_duration_minutes(procedure)) - if procedure.auto_archive_on diff --git a/app/views/shared/dossiers/_update_contact_information.html.haml b/app/views/shared/dossiers/_update_contact_information.html.haml index 549f0fa22..a4abc0620 100644 --- a/app/views/shared/dossiers/_update_contact_information.html.haml +++ b/app/views/shared/dossiers/_update_contact_information.html.haml @@ -2,7 +2,7 @@ - service = dossier&.service || procedure.service - if service.present? %h3.fr-footer__top-cat= I18n.t('users.procedure_footer.managed_by.header') - .fr-footer__top-link.fr-pb-2w + .fr-footer__top-link.fr-pb-3w %span{ lang: :fr }= service.pretty_nom %div{ lang: :fr } = render SimpleFormatComponent.new(service.adresse, class_names_map: {paragraph: 'fr-footer__content-desc'}) @@ -10,21 +10,19 @@ %ul.fr-footer__top-list - if dossier.present? && dossier.messagerie_available? %li - = link_to I18n.t('users.procedure_footer.contact.in_app_mail.link'), messagerie_dossier_path(dossier), class: 'fr-footer__top-link' + = link_to I18n.t('users.procedure_footer.contact.in_app_mail.link'), messagerie_dossier_path(dossier), class: 'fr-footer__link' - elsif service.present? %li %span.fr-footer__top-link = I18n.t('users.procedure_footer.contact.email.link') - = link_to service.email, "mailto:#{service.email}", class: "fr-footer__top-link" + = link_to service.email, "mailto:#{service.email}", class: "fr-footer__link" - - if service.present? - - if service.telephone.present? || service.horaires.present? + - if service.telephone.present? %li - - horaires = "#{I18n.t('users.procedure_footer.contact.schedule.prefix')}#{formatted_horaires(service.horaires)}" - - if service.telephone.present? - = link_to service.telephone_url, class: 'fr-footer__top-link' do - %p - = I18n.t('users.procedure_footer.contact.phone.link', service_telephone: service.telephone) - - if service.horaires.present? - %p - = horaires + %span.fr-footer__top-link + = I18n.t('users.procedure_footer.contact.phone.label') + = link_to I18n.t('users.procedure_footer.contact.phone.link', service_telephone: service.telephone), service.telephone_url, class: 'fr-footer__link' + + - if service.horaires.present? + %li + = "#{I18n.t('users.procedure_footer.contact.schedule.prefix')}#{formatted_horaires(service.horaires)}" diff --git a/app/views/users/_procedure_footer.html.haml b/app/views/users/_procedure_footer.html.haml index 8381b93c6..d4b149ec1 100644 --- a/app/views/users/_procedure_footer.html.haml +++ b/app/views/users/_procedure_footer.html.haml @@ -1,6 +1,7 @@ %footer.fr-footer.footer-procedure#footer{ role: "contentinfo" } .fr-footer__top.fr-mb-0 .fr-container + %h2.sr-only= t("links.footer.top_labels.hidden_title_procedure") .fr-grid-row.fr-grid-row--start.fr-grid-row--gutters .fr-col-12.fr-col-sm-4.fr-col-md-4 = render partial: 'shared/dossiers/update_contact_information', locals: { dossier: dossier, procedure: procedure } @@ -12,30 +13,29 @@ %ul.fr-footer__top-list - politiques.each do |politique| %li - = link_to t("users.procedure_footer.legals.data_retention_url"), class: "fr-footer__top-link", title: new_tab_suffix(t("users.procedure_footer.legals.data_retention_title")), **external_link_attributes do + = link_to t("users.procedure_footer.legals.data_retention_url"), class: "fr-footer__link", title: new_tab_suffix(t("users.procedure_footer.legals.data_retention_title", data_retention_title: politiques_conservation_de_donnees(procedure).join)), **external_link_attributes do = politique - if procedure.deliberation.attached? %li - = link_to url_for(procedure.deliberation), rel: 'noopener', class: 'fr-footer__top-link' do + = link_to url_for(procedure.deliberation), rel: 'noopener', class: 'fr-footer__link' do = I18n.t("users.procedure_footer.legals.terms") - else %li - = link_to I18n.t("users.procedure_footer.legals.terms"), procedure.cadre_juridique, rel: 'noopener', class: 'fr-footer__top-link' + = link_to I18n.t("users.procedure_footer.legals.terms"), procedure.cadre_juridique, rel: 'noopener', class: 'fr-footer__link' - if procedure.lien_dpo.present? %li - = link_to url_or_email_to_lien_dpo(procedure), rel: 'noopener', class: 'fr-footer__top-link' do + = link_to url_or_email_to_lien_dpo(procedure), rel: 'noopener', class: 'fr-footer__link' do = I18n.t("users.procedure_footer.legals.dpo") %li - = link_to I18n.t('users.procedure_footer.contact.stats.link'), statistiques_path(procedure.path), class: 'fr-footer__top-link', rel: 'noopener' + = link_to I18n.t('users.procedure_footer.contact.stats.link'), statistiques_path(procedure.path), class: 'fr-footer__link', rel: 'noopener' .fr-col-12.fr-col-sm-4.fr-col-md-4 - unless procedure.close? %h3.fr-footer__top-cat= I18n.t('users.procedure_footer.dematerialisation.header') .fr-download - %p - = link_to I18n.t('users.procedure_footer.dematerialisation.title_1'), commencer_dossier_vide_for_revision_path(procedure.active_revision), class: 'fr-footer__top-link fr-download__link' + = link_to I18n.t('users.procedure_footer.dematerialisation.title_1'), commencer_dossier_vide_for_revision_path(procedure.active_revision), download: 'true', class: 'fr-download__link' %h3.fr-footer__top-cat= I18n.t('users.procedure_footer.support.header') .fr-footer__brand.fr-enlarge-link = link_to t("users.procedure_footer.dematerialisation.link"), title: t("users.procedure_footer.dematerialisation.alt"), class: "fr-footer__brand-link" do diff --git a/config/locales/links.en.yml b/config/locales/links.en.yml index 4d4293426..1fa94d1e8 100644 --- a/config/locales/links.en.yml +++ b/config/locales/links.en.yml @@ -16,6 +16,7 @@ en: footer: top_labels: hidden_title: Useful links + hidden_title_procedure: Procedure information communication: Communication legals: Legal information resources: Resources diff --git a/config/locales/links.fr.yml b/config/locales/links.fr.yml index dd0c9ecc7..095363e27 100644 --- a/config/locales/links.fr.yml +++ b/config/locales/links.fr.yml @@ -18,6 +18,7 @@ fr: footer: top_labels: hidden_title: Liens pratiques + hidden_title_procedure: Informations sur la démarche communication: Communication legals: Informations légales resources: Ressources diff --git a/config/locales/views/users/procedure_footer/en.yml b/config/locales/views/users/procedure_footer/en.yml index 4d1632cca..102b8a5f0 100644 --- a/config/locales/views/users/procedure_footer/en.yml +++ b/config/locales/views/users/procedure_footer/en.yml @@ -4,24 +4,23 @@ en: managed_by: header: 'This procedure is managed by' contact: - header: 'Ask a question about the procedure :' + header: 'Ask a question about the procedure' in_app_mail: link: "Direclty via the chat" email: - link: "Directly by email:" + link: "Directly by email: " phone: - link: 'By phone: %{service_telephone}' + label: 'By phone: ' schedule: - prefix: 'Hours : ' + prefix: 'Hours: ' stats: link: "See the procedure's stats" legals: header: "Legals" - data_retention: "%{application_name} : %{duree_conservation_dossiers_dans_ds} months" - data_retention_title: "Explanation of our data retention and archiving policy" + data_retention: "Data retention and archiving: %{duree_conservation_dossiers_dans_ds} months" terms: "Laws regarding this data collection" dpo: "Contact the Data Protection Officer" - dematerialisation: + dematerialisation: header: Paperless title_1: Download the PDF form link: "https://www.transformation.gouv.fr/france-services" diff --git a/config/locales/views/users/procedure_footer/fr.yml b/config/locales/views/users/procedure_footer/fr.yml index a238508b5..557905380 100644 --- a/config/locales/views/users/procedure_footer/fr.yml +++ b/config/locales/views/users/procedure_footer/fr.yml @@ -8,18 +8,19 @@ fr: in_app_mail: link: "Directement par la messagerie" email: - link: "Directement par courriel :" + link: "Directement par courriel :" phone: - link: 'Par téléphone au %{service_telephone}' + label: 'Par téléphone au : ' + link: '%{service_telephone}' schedule: prefix: "Horaires d’ouverture : " stats: link: "Voir les statistiques de la démarche" legals: header: "Cadre juridique" - data_retention: "%{application_name} : %{duree_conservation_dossiers_dans_ds} mois" + data_retention: "Rétention et archivage des données : %{duree_conservation_dossiers_dans_ds} mois" data_retention_url: "https://doc.demarches-simplifiees.fr/pour-aller-plus-loin/archivage-longue-duree-des-demarches" - data_retention_title: "Explications sur notre politique de rétention et d’archivage des données" + data_retention_title: "%{data_retention_title}" terms: "Texte cadrant la demande d’information" dpo: "Contacter le Délégué à la Protection des Données" official_links: diff --git a/spec/helpers/conservation_de_donnees_helper_spec.rb b/spec/helpers/conservation_de_donnees_helper_spec.rb index a7307984d..ff9319c79 100644 --- a/spec/helpers/conservation_de_donnees_helper_spec.rb +++ b/spec/helpers/conservation_de_donnees_helper_spec.rb @@ -4,9 +4,7 @@ RSpec.describe ConservationDeDonneesHelper, type: :helper do let(:procedure) { build(:procedure, duree_conservation_dossiers_dans_ds: dans_ds) } describe "politiques_conservation_de_donnees" do - let(:app_name) { "une superbe application" } - - before { Current.application_name = app_name } + let(:label) { "Rétention et archivage des données" } subject { politiques_conservation_de_donnees(procedure) } @@ -14,7 +12,7 @@ RSpec.describe ConservationDeDonneesHelper, type: :helper do let(:dans_ds) { 3 } let(:hors_ds) { 6 } - it { is_expected.to eq(["#{app_name} : 3 mois"]) } + it { is_expected.to eq(["#{label} : 3 mois"]) } end context "when the retention time is not set" do