refactor(links): move FAQ from footer to common scope

This commit is contained in:
François Vantomme 2023-01-09 16:58:19 +01:00 committed by LeSim
parent faa5dda761
commit fe518fed8c
9 changed files with 22 additions and 20 deletions

View file

@ -51,7 +51,7 @@
= render partial: 'shared/help/help_dropdown_instructeur'
- else
// NB: on mobile in order to have links correctly aligned, we need a left icon
= link_to t('help'), t("links.footer.faq.url"), class: 'fr-btn fr-icon-questionnaire-line fr-btn--icon-left', title: new_tab_suffix(t('help')), **external_link_attributes
= link_to t('help'), t("links.common.faq.url"), class: 'fr-btn fr-icon-questionnaire-line fr-btn--icon-left', title: new_tab_suffix(t('help')), **external_link_attributes

View file

@ -28,7 +28,7 @@
%li.fr-footer__top-link
= link_to t("links.footer.api_doc.label"), t("links.footer.api_doc.url"), title: t("links.footer.api_doc.title"), class: "fr-footer__top-link", rel: "noopener noreferrer"
%li.fr-footer__top-link
= link_to t("links.footer.faq.label"), t("links.footer.faq.url"), title: t("links.footer.faq.title"), class: "fr-footer__top-link", rel: "noopener noreferrer"
= link_to t("links.common.faq.label"), t("links.common.faq.url"), title: t("links.common.faq.title"), class: "fr-footer__top-link", rel: "noopener noreferrer"
%li.fr-footer__top-link
= link_to t("links.footer.code.label"), t("links.footer.code.url"), title: t("links.footer.code.title"), class: "fr-footer__top-link", rel: "noopener noreferrer"
.fr-col-12.fr-col-sm-3.fr-col-md-3

View file

@ -120,4 +120,4 @@
%h1.cta-panel-title Une question, un problème ?
%p.cta-panel-explanation Consultez notre FAQ
%div
= link_to "Voir la FAQ", t("links.footer.faq.url"), class: "fr-btn fr-btn--lg", **external_link_attributes
= link_to "Voir la FAQ", t("links.common.faq.url"), class: "fr-btn fr-btn--lg", **external_link_attributes

View file

@ -51,7 +51,7 @@
%h2.cta-panel-title= t(".question")
%p.cta-panel-explanation= t(".answer_in_faq")
%div
= link_to t(".online_help"), t("links.footer.faq.url"), class: "fr-btn fr-btn--lg", title: new_tab_suffix(t(".online_help")), **external_link_attributes
= link_to t(".online_help"), t("links.common.faq.url"), class: "fr-btn fr-btn--lg", title: new_tab_suffix(t(".online_help")), **external_link_attributes
-# We temporarily disable the link to the contact page on the homepage
-# %p.cta-panel-explanation Notre équipe est disponible pour vous renseigner et vous aider
-# %div

View file

@ -1,5 +1,5 @@
%li
= link_to t("links.footer.faq.url"), title: new_tab_suffix(t('help_dropdown.general_title')), **external_link_attributes do
= link_to t("links.common.faq.url"), title: new_tab_suffix(t('help_dropdown.general_title')), **external_link_attributes do
%span.icon.help
.dropdown-description
%span.help-dropdown-title

View file

@ -4,6 +4,11 @@ en:
provided_by: "la DINUM"
title: "Direction Interministérielle au Numérique"
url: "https://numerique.gouv.fr"
common:
faq:
label: "FAQ"
title: "Frequently Asked Questions"
url: "https://faq.demarches-simplifiees.fr"
footer:
top_labels:
communication: Communication
@ -40,10 +45,6 @@ en:
label: "Documentation"
title: "Our Documentation"
url: "https://doc.demarches-simplifiees.fr"
faq:
label: "FAQ"
title: "Frequently Asked Questions"
url: "https://faq.demarches-simplifiees.fr"
mentions_legales:
label: "Legal notices"
title: "Legal notices regarding our platform"

View file

@ -4,6 +4,11 @@ fr:
provided_by: "la DINUM"
title: "Direction Interministérielle au Numérique"
url: "https://numerique.gouv.fr"
common:
faq:
label: "FAQ"
title: "Foire aux Questions"
url: "https://faq.demarches-simplifiees.fr"
footer:
top_labels:
communication: Communication
@ -43,10 +48,6 @@ fr:
label: "Documentation"
title: "Documentation utilisateur"
url: "https://doc.demarches-simplifiees.fr"
faq:
label: "FAQ"
title: "Foire aux Questions"
url: "https://faq.demarches-simplifiees.fr"
mentions_legales:
label: "Mentions légales"
title: "Consulter nos Mentions légales"

View file

@ -19,7 +19,7 @@ describe 'Getting help:' do
within('.help-dropdown') do
expect(page).to have_content(procedure.service.email)
expect(page).to have_content(procedure.service.telephone)
expect(page).to have_link(nil, href: I18n.t("links.footer.faq.url"))
expect(page).to have_link(nil, href: I18n.t("links.common.faq.url"))
end
end
end
@ -52,7 +52,7 @@ describe 'Getting help:' do
within('.help-dropdown') do
expect(page).to have_content(dossier.procedure.service.email)
expect(page).to have_content(dossier.procedure.service.telephone)
expect(page).to have_link(nil, href: I18n.t("links.footer.faq.url"))
expect(page).to have_link(nil, href: I18n.t("links.common.faq.url"))
end
end
end
@ -69,7 +69,7 @@ describe 'Getting help:' do
within('.help-dropdown') do
expect(page).to have_link(nil, href: messagerie_dossier_path(dossier))
expect(page).to have_link(nil, href: I18n.t("links.footer.faq.url"))
expect(page).to have_link(nil, href: I18n.t("links.common.faq.url"))
end
end
end
@ -91,7 +91,7 @@ describe 'Getting help:' do
end
def have_help_button
have_link('Aide', href: I18n.t("links.footer.faq.url"))
have_link('Aide', href: I18n.t("links.common.faq.url"))
end
def have_help_menu

View file

@ -23,7 +23,7 @@ describe 'layouts/_header.html.haml', type: :view do
it { is_expected.to_not have_css(".account-btn") }
it 'displays the Help link' do
expect(subject).to have_link('Aide', href: I18n.t("links.footer.faq.url"))
expect(subject).to have_link('Aide', href: I18n.t("links.common.faq.url"))
end
context 'when on a procedure page' do
@ -48,7 +48,7 @@ describe 'layouts/_header.html.haml', type: :view do
it { is_expected.to have_selector(:button, user.email, class: "account-btn") }
it 'displays the Help button' do
expect(subject).to have_link("Aide", href: I18n.t("links.footer.faq.url"))
expect(subject).to have_link("Aide", href: I18n.t("links.common.faq.url"))
end
end