From 6daeac8a18243e4c3cbca976e1be7bd1693b5d58 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 5 Oct 2017 19:12:12 +0200 Subject: [PATCH 1/2] Invert the buttons order in the Dossier header --- app/views/new_gestionnaire/dossiers/_header.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/new_gestionnaire/dossiers/_header.html.haml b/app/views/new_gestionnaire/dossiers/_header.html.haml index c25a332b6..949120b76 100644 --- a/app/views/new_gestionnaire/dossiers/_header.html.haml +++ b/app/views/new_gestionnaire/dossiers/_header.html.haml @@ -7,8 +7,8 @@ %li = "Dossier nº #{dossier.id}" %div - = render partial: "state_button", locals: { dossier: dossier } = render partial: "new_gestionnaire/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_gestionnaire&.follow?(dossier) } + = render partial: "state_button", locals: { dossier: dossier } %ul.tabs - notifications_summary = dossier.notifications_summary %li{ class: current_page?(dossier_path(dossier.procedure, dossier)) ? 'active' : nil } From c58a7abbd1b342f22cec87c606625dcacc105cdb Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 5 Oct 2017 19:21:21 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Capitalize=20the=20buttons=E2=80=99=20label?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../procedures/_dossier_actions.html.haml | 8 ++++---- spec/features/new_gestionnaire/gestionnaire_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/new_gestionnaire/procedures/_dossier_actions.html.haml b/app/views/new_gestionnaire/procedures/_dossier_actions.html.haml index d61410fce..48c3bb000 100644 --- a/app/views/new_gestionnaire/procedures/_dossier_actions.html.haml +++ b/app/views/new_gestionnaire/procedures/_dossier_actions.html.haml @@ -2,18 +2,18 @@ - if dossier_is_followed = link_to unfollow_dossier_path(procedure, dossier), method: :patch, class: 'button' do %i.unfollow> - ne plus suivre + Ne plus suivre - else = link_to follow_dossier_path(procedure, dossier), method: :patch, class: 'button' do %i.follow> - suivre le dossier + Suivre le dossier - elsif dossier.termine? - if dossier.archived = link_to unarchive_dossier_path(procedure, dossier), method: :patch, class: 'button' do %i.unarchive> - désarchiver le dossier + Désarchiver le dossier - else = link_to archive_dossier_path(procedure, dossier), method: :patch, class: 'button' do %i.archive> - archiver le dossier + Archiver le dossier diff --git a/spec/features/new_gestionnaire/gestionnaire_spec.rb b/spec/features/new_gestionnaire/gestionnaire_spec.rb index 503bc4d43..5dbee74e4 100644 --- a/spec/features/new_gestionnaire/gestionnaire_spec.rb +++ b/spec/features/new_gestionnaire/gestionnaire_spec.rb @@ -40,7 +40,7 @@ feature 'The gestionnaire part' do test_statut_bar(a_suivre: 1, tous_les_dossiers: 1) dossier_present?(dossier.id, 'en construction') - click_on 'suivre le dossier' + click_on 'Suivre le dossier' expect(page).to have_current_path(procedure_path(procedure)) test_statut_bar(suivi: 1, tous_les_dossiers: 1) expect(page).to have_text('Aucun dossier') @@ -49,7 +49,7 @@ feature 'The gestionnaire part' do expect(page).to have_current_path(procedure_path(procedure, statut: 'suivis')) dossier_present?(dossier.id, 'en construction') - click_on 'ne plus suivre' + click_on 'Ne plus suivre' expect(page).to have_current_path(procedure_path(procedure, statut: 'suivis')) test_statut_bar(a_suivre: 1, tous_les_dossiers: 1) expect(page).to have_text('Aucun dossier')