From f55c6ee371435afc2a3ff0b8bf85f53706f30ca6 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 26 Apr 2021 17:06:54 +0200 Subject: [PATCH 1/2] stick arrow with label --- app/assets/stylesheets/dossiers_table.scss | 2 -- app/views/instructeurs/procedures/_header_field.html.haml | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/dossiers_table.scss b/app/assets/stylesheets/dossiers_table.scss index 64ec0dc9f..f91a2f7c0 100644 --- a/app/assets/stylesheets/dossiers_table.scss +++ b/app/assets/stylesheets/dossiers_table.scss @@ -46,8 +46,6 @@ } .notification-col { - width: 45px; - a { font-size: 16px; } diff --git a/app/views/instructeurs/procedures/_header_field.html.haml b/app/views/instructeurs/procedures/_header_field.html.haml index 58a73ba15..5ef47b161 100644 --- a/app/views/instructeurs/procedures/_header_field.html.haml +++ b/app/views/instructeurs/procedures/_header_field.html.haml @@ -1,8 +1,9 @@ %th{ class: classname } = link_to update_sort_instructeur_procedure_path(@procedure, table: field['table'], column: field['column']) do - = field['label'] - if @procedure_presentation.sort['table'] == field['table'] && @procedure_presentation.sort['column'] == field['column'] - if @procedure_presentation.sort['order'] == 'asc' - %img.caret-icon{ src: image_url("table/up_caret.svg"), width: 10, height: 6, loading: 'lazy' } + #{field['label']} ↑ - else - %img.caret-icon{ src: image_url("table/down_caret.svg"), width: 10, height: 6, loading: 'lazy' } + #{field['label']} ↓ + - else + #{field['label']} From 55b80df29d1474825670bba799cbc186f281e91b Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 26 Apr 2021 17:15:28 +0200 Subject: [PATCH 2/2] display count before text in tabs --- app/views/instructeurs/procedures/show.html.haml | 2 +- app/views/shared/_tab_item.html.haml | 2 +- spec/features/instructeurs/instruction_spec.rb | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index 9edcc3e0a..fd13d41a2 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -38,7 +38,7 @@ badge: number_with_html_delimiter(@traites_count), notification: @has_termine_notifications) - = tab_item('tous les dossiers', + = tab_item('au total', instructeur_procedure_path(@procedure, statut: 'tous'), active: @statut == 'tous', badge: number_with_html_delimiter(@tous_count)) diff --git a/app/views/shared/_tab_item.html.haml b/app/views/shared/_tab_item.html.haml index 52e36cc36..972ebdd50 100644 --- a/app/views/shared/_tab_item.html.haml +++ b/app/views/shared/_tab_item.html.haml @@ -2,6 +2,6 @@ - if notification %span.notifications{ 'aria-label': 'notifications' } = link_to(url) do - = label - if badge.present? %span.badge= badge + = label diff --git a/spec/features/instructeurs/instruction_spec.rb b/spec/features/instructeurs/instruction_spec.rb index 257ca2a73..1b1bca949 100644 --- a/spec/features/instructeurs/instruction_spec.rb +++ b/spec/features/instructeurs/instruction_spec.rb @@ -216,11 +216,11 @@ feature 'Instructing a dossier:', js: true do def test_statut_bar(a_suivre: 0, suivi: 0, traite: 0, tous_les_dossiers: 0, archive: 0) texts = [ - "à suivre #{a_suivre}", - "suivi #{suivi}", - "traité #{traite}", - "tous les dossiers #{tous_les_dossiers}", - "archivé #{archive}" + "#{a_suivre} à suivre", + "#{suivi} suivi", + "#{traite} traité", + "#{tous_les_dossiers} au total", + "#{archive} archivé" ] texts.each { |text| expect(page).to have_text(text) }