From ada417991a44bf467eb77447877da3a45ff53701 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Thu, 30 Mar 2023 17:23:42 +0200 Subject: [PATCH 1/4] fix fil d'ariane in expert header --- app/views/experts/avis/_header.html.haml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/views/experts/avis/_header.html.haml b/app/views/experts/avis/_header.html.haml index 0dbbb79bb..c808b06f8 100644 --- a/app/views/experts/avis/_header.html.haml +++ b/app/views/experts/avis/_header.html.haml @@ -1,12 +1,15 @@ .sub-header .container .flex.justify-between - %ul.breadcrumbs - %li= link_to('Avis', expert_all_avis_path) - %li - = link_to(dossier.procedure.libelle.truncate_words(10), procedure_expert_avis_index_path(avis.procedure), class: "fr-link") - = procedure_badge(dossier.procedure) - %li= link_to("Dossier nº #{dossier.id}", expert_avis_path(avis.procedure, avis)) + %nav.fr-breadcrumb{"aria-label" => "vous êtes ici :", role: "navigation"} + %button.fr-breadcrumb__button{"aria-controls" => "breadcrumb-1", "aria-expanded" => "false"} Voir le fil d’Ariane + #breadcrumb-1.fr-collapse + %ol.fr-breadcrumb__list + %li= link_to('Avis', expert_all_avis_path, class: 'fr-breadcrumb__link') + %li + = link_to(dossier.procedure.libelle.truncate_words(10), procedure_expert_avis_index_path(avis.procedure), class: "fr-breadcrumb__link") + = procedure_badge(dossier.procedure) + %li= content_tag("a","Dossier nº #{dossier.id}", class: 'fr-breadcrumb__link', 'aria-current': 'page') .header-actions .fr-download From dea04e25144fea2f42673f053467b5fe54048d79 Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Thu, 30 Mar 2023 17:26:05 +0200 Subject: [PATCH 2/4] change wording to make it more explicit --- config/locales/models/avis/en.yml | 2 +- config/locales/models/avis/fr.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/models/avis/en.yml b/config/locales/models/avis/en.yml index 421f41b2f..0415e6076 100644 --- a/config/locales/models/avis/en.yml +++ b/config/locales/models/avis/en.yml @@ -28,7 +28,7 @@ en: give_avis: Give your opinion see_avis: Read opinions ask_avis: Ask for an opinion - ask_new_avis: Ask for a new opinion + ask_new_avis: Ask for another opinion information_text: no_new_avis_text: The file has been proceed no_new_avis_text_detail: Opinion requests are closed diff --git a/config/locales/models/avis/fr.yml b/config/locales/models/avis/fr.yml index 9da6f93dc..cfed555a5 100644 --- a/config/locales/models/avis/fr.yml +++ b/config/locales/models/avis/fr.yml @@ -28,7 +28,7 @@ fr: give_avis: Donner votre avis see_avis: Voir les avis ask_avis: Demander un avis - ask_new_avis: Demander un nouvel avis + ask_new_avis: Demander un autre avis information_text: no_new_avis_text: Le dossier a été traité no_new_avis_text_detail: Les demandes d'avis ne sont plus autorisées From 8f0861fba06dfb579a2deb2194bd747574096b5d Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Thu, 30 Mar 2023 17:41:21 +0200 Subject: [PATCH 3/4] fix linter --- app/views/experts/avis/_header.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/experts/avis/_header.html.haml b/app/views/experts/avis/_header.html.haml index c808b06f8..5c32e9a51 100644 --- a/app/views/experts/avis/_header.html.haml +++ b/app/views/experts/avis/_header.html.haml @@ -1,8 +1,8 @@ .sub-header .container .flex.justify-between - %nav.fr-breadcrumb{"aria-label" => "vous êtes ici :", role: "navigation"} - %button.fr-breadcrumb__button{"aria-controls" => "breadcrumb-1", "aria-expanded" => "false"} Voir le fil d’Ariane + %nav.fr-breadcrumb{ "aria-label" => "vous êtes ici :", role: "navigation" } + %button.fr-breadcrumb__button{ "aria-controls" => "breadcrumb-1", "aria-expanded" => "false" } Voir le fil d’Ariane #breadcrumb-1.fr-collapse %ol.fr-breadcrumb__list %li= link_to('Avis', expert_all_avis_path, class: 'fr-breadcrumb__link') From 630742ee94aef199c6c3860b70986dab4416848a Mon Sep 17 00:00:00 2001 From: Lisa Durand Date: Thu, 30 Mar 2023 17:54:14 +0200 Subject: [PATCH 4/4] fix test --- spec/system/experts/expert_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/experts/expert_spec.rb b/spec/system/experts/expert_spec.rb index 67fb2eb90..9f1bd41e2 100644 --- a/spec/system/experts/expert_spec.rb +++ b/spec/system/experts/expert_spec.rb @@ -78,7 +78,7 @@ describe 'Inviting an expert:' do expect(page).to have_content('Ma réponse d’expert : c’est un oui.') expect(page).to have_content('RIB.pdf') - within('.breadcrumbs') { click_on 'Avis' } + within('.fr-breadcrumb__list') { click_on 'Avis' } expect(page).to have_text('0 avis à donner') expect(page).to have_text('1 avis donné') end @@ -114,7 +114,7 @@ describe 'Inviting an expert:' do expect(page).to have_text('Vous') expect(page).to have_text('non') - within('.breadcrumbs') { click_on 'Avis' } + within('.fr-breadcrumb__list') { click_on 'Avis' } expect(page).to have_text('1 avis donné') end