From 172d81856b9f7f82b9eeb7fbfd7259154e06a264 Mon Sep 17 00:00:00 2001 From: Kara Diaby Date: Mon, 18 Nov 2024 23:04:21 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20apr=C3=A8s=20retours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/02_utils.scss | 4 -- app/assets/stylesheets/buttons.scss | 21 ---------- .../deleted_dossiers_component.html.haml | 2 +- app/views/instructeurs/_breadcrumbs.html.haml | 40 ++----------------- .../instructeurs/archives/index.html.haml | 2 +- .../groupe_instructeurs/index.html.haml | 2 +- .../instructeurs/procedures/_header.html.haml | 6 +-- .../procedures/administrateurs.html.haml | 2 +- .../procedures/email_notifications.html.haml | 2 +- .../procedures/email_usagers.html.haml | 2 +- .../instructeurs/procedures/exports.html.haml | 5 +-- .../instructeurs/procedures/show.html.haml | 3 +- app/views/shared/procedures/_stats.html.haml | 2 +- .../views/instructeurs/procedures/en.yml | 2 + .../views/instructeurs/procedures/fr.yml | 3 +- .../procedure_export_template_tabular_spec.rb | 4 +- .../procedure_export_template_zip_spec.rb | 4 +- 17 files changed, 27 insertions(+), 79 deletions(-) diff --git a/app/assets/stylesheets/02_utils.scss b/app/assets/stylesheets/02_utils.scss index df1f8c4ee..3d5ae5a13 100644 --- a/app/assets/stylesheets/02_utils.scss +++ b/app/assets/stylesheets/02_utils.scss @@ -85,10 +85,6 @@ position: relative; } -.absolute { - position: absolute; -} - .sticky { position: sticky; top: 2em; diff --git a/app/assets/stylesheets/buttons.scss b/app/assets/stylesheets/buttons.scss index ad93cf731..1293eb494 100644 --- a/app/assets/stylesheets/buttons.scss +++ b/app/assets/stylesheets/buttons.scss @@ -393,24 +393,3 @@ ul.dropdown-items { content: none !important; } } - -.btn-back { - border: 1px solid $blue-france-500; - color: $blue-france-500; - background-color: transparent; - height: 2em; - width: 2em; - padding: 0; - display: flex; - justify-content: center; - align-items: center; - margin-right: $default-spacer * 2; - - &:hover { - background-color: transparent !important; - } -} - -.btn-back .fr-icon-arrow-left-line { - font-size: 0.8em; -} diff --git a/app/components/dossiers/deleted_dossiers_component/deleted_dossiers_component.html.haml b/app/components/dossiers/deleted_dossiers_component/deleted_dossiers_component.html.haml index 1fc51132a..d32eac862 100644 --- a/app/components/dossiers/deleted_dossiers_component/deleted_dossiers_component.html.haml +++ b/app/components/dossiers/deleted_dossiers_component/deleted_dossiers_component.html.haml @@ -1,6 +1,6 @@ .fr-container - %h1.fr-h2 + %h1.fr-h4 Historique des dossiers supprimés .fr-container diff --git a/app/views/instructeurs/_breadcrumbs.html.haml b/app/views/instructeurs/_breadcrumbs.html.haml index b4339980f..b5b98fec9 100644 --- a/app/views/instructeurs/_breadcrumbs.html.haml +++ b/app/views/instructeurs/_breadcrumbs.html.haml @@ -1,4 +1,4 @@ -%nav.fr-breadcrumb.mt-0{ role: "navigation", aria: { label: t('you_are_here', scope: [:layouts, :breadcrumb]) } } +%nav.fr-mb-0.fr-breadcrumb.mt-0{ role: "navigation", aria: { label: t('you_are_here', scope: [:layouts, :breadcrumb]) } } %button.fr-breadcrumb__button{ aria: { expanded: "false", controls: "breadcrumb-1" } } = t('show', scope: [:layouts, :breadcrumb]) @@ -7,39 +7,7 @@ %li= link_to t('root', scope: [:layouts, :breadcrumb]), root_path, class: 'fr-breadcrumb__link' - steps.each.with_index do |step, i| - - if i == 0 - %li= link_to "#{step[0]} - Suivi des dossiers", step[1], class: 'fr-breadcrumb__link' + - if i == steps.size - 1 + %li= link_to step[0], '', { aria: { current: "page" } , class: 'fr-breadcrumb__link' } - else - %li= link_to step[0], step[1], class: 'fr-breadcrumb__link' - -- if defined?(metadatas) - .metadatas.pb-3 - %h1.fr-h6.fr-mb-1w - = @procedure.libelle - - - if @procedure.close? - .flex - %span.fr-badge.fr-badge--warning.fr-mr-1w - = t('closed', scope: [:layouts, :breadcrumb]) - = t('since', scope: [:layouts, :breadcrumb], date: l(@procedure.closed_at.to_date)) - - - elsif @procedure.locked? - = link_to commencer_url(@procedure.path), commencer_url(@procedure.path), class: "fr-link" - .flex.fr-mt-1w - - - if @procedure.api_entreprise_token_expired_or_expires_soon? - %span.fr-badge.fr-badge--error.fr-mr-1w - = t('to_modify', scope: [:layouts, :breadcrumb]) - - %span.fr-badge.fr-badge--success.fr-mr-1w - = t('published', scope: [:layouts, :breadcrumb]) - = t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.published_at.to_date)) - - - else - %p.fr-mb-1w - = t('more_info_on_test', scope: [:layouts, :breadcrumb]) - = link_to t('go_to_FAQ', scope: [:layouts, :breadcrumb]), t("url_FAQ", scope: [:layouts, :breadcrumb]), title: new_tab_suffix(t('go_to_FAQ', scope: [:layouts, :breadcrumb])) - .flex - %span.fr-badge.fr-badge--new.fr-mr-1w - = t('draft', scope: [:layouts, :breadcrumb]) - = t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.created_at.to_date)) + %li= link_to "#{step[0]} - Suivi des dossiers", step[1], class: 'fr-breadcrumb__link' diff --git a/app/views/instructeurs/archives/index.html.haml b/app/views/instructeurs/archives/index.html.haml index a34c4d96c..b8d8560f3 100644 --- a/app/views/instructeurs/archives/index.html.haml +++ b/app/views/instructeurs/archives/index.html.haml @@ -11,7 +11,7 @@ locals: { procedure: @procedure } .container - %h1.mb-2 Téléchargement mensuel + %h1.mb-2.fr-h4 Téléchargement mensuel = render partial: "shared/archives/notice" = render partial: "shared/archives/table", locals: {count_dossiers_termines_by_month: @count_dossiers_termines_by_month, archives: @archives, average_dossier_weight: @average_dossier_weight, procedure: @procedure } diff --git a/app/views/instructeurs/groupe_instructeurs/index.html.haml b/app/views/instructeurs/groupe_instructeurs/index.html.haml index 11611f7e3..435df6d24 100644 --- a/app/views/instructeurs/groupe_instructeurs/index.html.haml +++ b/app/views/instructeurs/groupe_instructeurs/index.html.haml @@ -10,7 +10,7 @@ locals: { procedure: @procedure } .fr-container.groupe-instructeur - %h1 Gestion des instructeurs + %h1.fr-h4 Gestion des instructeurs .card %h2.fr-h3 Liste des groupes %table.table.mt-2 diff --git a/app/views/instructeurs/procedures/_header.html.haml b/app/views/instructeurs/procedures/_header.html.haml index fe3208ff9..45b2c5b2d 100644 --- a/app/views/instructeurs/procedures/_header.html.haml +++ b/app/views/instructeurs/procedures/_header.html.haml @@ -9,7 +9,7 @@ .fr-nav__item.relative{ class: ('section-active' if current_nav_section == 'procedure_management') } %button.account-btn.fr-translate__btn.fr-btn.fr-btn--tertiary.fr-btn--no-border.fr-text--md{ "aria-controls" => "procedure-management", "aria-expanded" => "false", style: "box-shadow: none; background: none;" } = t('instructeurs.dossiers.header.banner.procedure_management') - #procedure-management.fr-collapse.fr-menu.absolute + #procedure-management.fr-collapse.fr-menu %ul.fr-menu__list %li = link_to t('instructeurs.dossiers.header.banner.administrators_list'), administrateurs_instructeur_procedure_path(procedure), class: 'fr-nav__link' @@ -29,7 +29,7 @@ .fr-nav__item.relative{ class: ('section-active' if current_nav_section == 'user_support') } %button.account-btn.fr-translate__btn.fr-btn.fr-btn--tertiary.fr-btn--no-border.fr-text--md{ "aria-controls" => "user-support", "aria-expanded" => "false", style: "box-shadow: none; background: none;" } = t('instructeurs.dossiers.header.banner.user_support') - #user-support.fr-collapse.fr-menu.absolute + #user-support.fr-collapse.fr-menu %ul.fr-menu__list %li = link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(procedure), class: 'fr-nav__link' @@ -42,7 +42,7 @@ .fr-nav__item.relative{ class: ('section-active' if current_nav_section == 'downloads') } %button.account-btn.fr-translate__btn.fr-btn.fr-btn--tertiary.fr-btn--no-border.fr-text--md{ "aria-controls" => "downloads", "aria-expanded" => "false", style: "box-shadow: none; background: none;" } = t('instructeurs.dossiers.header.banner.downloads') - #downloads.fr-collapse.fr-menu.absolute + #downloads.fr-collapse.fr-menu %ul.fr-menu__list %li = link_to t('instructeurs.dossiers.header.banner.exports_list'), exports_instructeur_procedure_path(procedure), class: 'fr-nav__link' diff --git a/app/views/instructeurs/procedures/administrateurs.html.haml b/app/views/instructeurs/procedures/administrateurs.html.haml index fe542e5ff..4af281b0e 100644 --- a/app/views/instructeurs/procedures/administrateurs.html.haml +++ b/app/views/instructeurs/procedures/administrateurs.html.haml @@ -8,7 +8,7 @@ = render partial: 'instructeurs/procedures/header', locals: { procedure: @procedure } .container - %h1 + %h1.fr-h4 = t('instructeurs.procedures.administrators_list.title', procedure_id: @procedure.id, procedure_libelle: @procedure.libelle) %ul diff --git a/app/views/instructeurs/procedures/email_notifications.html.haml b/app/views/instructeurs/procedures/email_notifications.html.haml index 28a60e696..87300c39d 100644 --- a/app/views/instructeurs/procedures/email_notifications.html.haml +++ b/app/views/instructeurs/procedures/email_notifications.html.haml @@ -10,7 +10,7 @@ .fr-container - %h1.fr-h3 + %h1.fr-h4 = t('.title') = form_for @assign_to, url: update_email_notifications_instructeur_procedure_path(@procedure), html: { class: 'form' } do |form| diff --git a/app/views/instructeurs/procedures/email_usagers.html.haml b/app/views/instructeurs/procedures/email_usagers.html.haml index dbf621dae..937dbdce5 100644 --- a/app/views/instructeurs/procedures/email_usagers.html.haml +++ b/app/views/instructeurs/procedures/email_usagers.html.haml @@ -9,7 +9,7 @@ locals: { procedure: @procedure } .messagerie.fr-container - %h1= t('instructeurs.dossiers.header.banner.contact_users') + %h1.fr-h4= t('instructeurs.dossiers.header.banner.contact_users') %p.fr-highlight = t('.hint', count: @dossiers_without_groupe_count).html_safe diff --git a/app/views/instructeurs/procedures/exports.html.haml b/app/views/instructeurs/procedures/exports.html.haml index f06d2d760..f22aecc25 100644 --- a/app/views/instructeurs/procedures/exports.html.haml +++ b/app/views/instructeurs/procedures/exports.html.haml @@ -1,10 +1,6 @@ - title = "Exports · #{@procedure.libelle}" - content_for(:title, title) --# = render partial: 'administrateurs/breadcrumbs', --# locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)], --# [t('.title')]] } - .sub-header .fr-container.flex.column = render partial: 'instructeurs/breadcrumbs', @@ -15,6 +11,7 @@ locals: { procedure: @procedure } .fr-container + %h1.fr-h4= t('.title') .fr-tabs.mb-3 %ul.fr-tabs__list{ role: 'tablist' } %li{ role: 'presentation' } diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index d89c58da1..3496e55b5 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -6,7 +6,8 @@ = render partial: 'instructeurs/breadcrumbs', locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)]] } = render partial: 'header', locals: { procedure: @procedure, statut: @statut } - + %hr.fr-mt-1v + %h1.fr-h3.fr-mb-0= t('.file_tracking') .procedure-actions - if @can_download_dossiers = render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), export_url: method(:download_export_instructeur_procedure_path)) diff --git a/app/views/shared/procedures/_stats.html.haml b/app/views/shared/procedures/_stats.html.haml index fd6fb1c85..671b8024a 100644 --- a/app/views/shared/procedures/_stats.html.haml +++ b/app/views/shared/procedures/_stats.html.haml @@ -1,5 +1,5 @@ .fr-container.fr-my-4w - %h1= title + %h1.fr-h4= title .fr-grid-row.fr-grid-row--gutters - if @usual_traitement_time.present? .fr-col-xs-12 diff --git a/config/locales/views/instructeurs/procedures/en.yml b/config/locales/views/instructeurs/procedures/en.yml index 6f57ac768..68dc01456 100644 --- a/config/locales/views/instructeurs/procedures/en.yml +++ b/config/locales/views/instructeurs/procedures/en.yml @@ -13,6 +13,8 @@ en: dossiers_close_to_expiration: expiring dossiers_supprimes: recently deleted copy_link_button: Copy the procedure link to clipboard + show: + file_tracking: File tracking email_usagers: hint: zero: "There is no user with a draft." diff --git a/config/locales/views/instructeurs/procedures/fr.yml b/config/locales/views/instructeurs/procedures/fr.yml index 3203fa4f3..4f10bf351 100644 --- a/config/locales/views/instructeurs/procedures/fr.yml +++ b/config/locales/views/instructeurs/procedures/fr.yml @@ -13,6 +13,8 @@ fr: dossiers_close_to_expiration: expirant dossiers_supprimes: supprimés copy_link_button: Copier le lien de la démarche dans le presse-papiers + show: + file_tracking: Suivi des dossiers email_usagers: hint: zero: "Aucun usager n'a de dossier en brouillon." @@ -20,4 +22,3 @@ fr: other: "Vous allez envoyer un message à %{count} usagers ayant un dossier en brouillon." administrators_list: title: Administrateurs de la démarche - diff --git a/spec/system/instructeurs/procedure_export_template_tabular_spec.rb b/spec/system/instructeurs/procedure_export_template_tabular_spec.rb index 6ed66c910..bdefa98f6 100644 --- a/spec/system/instructeurs/procedure_export_template_tabular_spec.rb +++ b/spec/system/instructeurs/procedure_export_template_tabular_spec.rb @@ -10,7 +10,9 @@ describe "procedure exports" do Flipper.enable(:export_template, procedure) visit instructeur_procedure_path(procedure) - click_on "Voir les exports et modèles d'export" + find("button", text: "Téléchargements").click + + click_on "Liste des exports" click_on "Modèles d'export" diff --git a/spec/system/instructeurs/procedure_export_template_zip_spec.rb b/spec/system/instructeurs/procedure_export_template_zip_spec.rb index 44eb7b787..90e376751 100644 --- a/spec/system/instructeurs/procedure_export_template_zip_spec.rb +++ b/spec/system/instructeurs/procedure_export_template_zip_spec.rb @@ -9,7 +9,9 @@ describe "procedure exports zip" do scenario "create an export_template zip", chome: true do visit instructeur_procedure_path(procedure) - click_on "Voir les exports et modèles d'export" + find("button", text: "Téléchargements").click + + click_on "Liste des exports" click_on "Modèles d'export"