From 21f696a6e5d823f09ce58be995c12daa1f3e38af Mon Sep 17 00:00:00 2001 From: Kara Diaby Date: Mon, 4 Nov 2024 11:13:13 +0000 Subject: [PATCH] Ajoute le bouton retour dans l'interface instructeur --- app/assets/stylesheets/buttons.scss | 21 +++++++++++++++++++ .../instructeurs/procedures/_header.html.haml | 11 ++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/buttons.scss b/app/assets/stylesheets/buttons.scss index 1293eb494..ad93cf731 100644 --- a/app/assets/stylesheets/buttons.scss +++ b/app/assets/stylesheets/buttons.scss @@ -393,3 +393,24 @@ 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/views/instructeurs/procedures/_header.html.haml b/app/views/instructeurs/procedures/_header.html.haml index 44868b6f2..66b6fa33a 100644 --- a/app/views/instructeurs/procedures/_header.html.haml +++ b/app/views/instructeurs/procedures/_header.html.haml @@ -1,5 +1,8 @@ .procedure-header - .clipboard-container + .clipboard-container.flex + = link_to "javascript:history.back()", class: "fr-btn btn-back" do + %span.fr-icon-arrow-left-line{ "aria-hidden" => "true", style: "font-size: 14px;" } + %h1.fr-h3 = "#{procedure_libelle procedure} (n°#{procedure.id})" %nav.flex.align-center.fr-translate.fr-nav{ role: "navigation", "aria-label"=> t('instructeurs.dossiers.header.banner.procedure_navigation') } @@ -7,7 +10,7 @@ = link_to instructeur_procedure_path(procedure), class: "account-btn fr-btn fr-btn--tertiary fr-btn--no-border", style: "box-shadow: none; background: none;" do %span.fr-mr-1w= t('instructeurs.dossiers.header.banner.follow_up') .fr-nav__item.relative - %button.account-btn.fr-translate__btn.fr-btn.fr-btn--tertiary.fr-btn--no-border{ "aria-controls" => "procedure-management", "aria-expanded" => "false", style: "box-shadow: none; background: none;" } + %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 %ul.fr-menu__list @@ -23,7 +26,7 @@ = link_to t('views.instructeurs.dossiers.show_deleted_dossiers'), deleted_dossiers_instructeur_procedure_path(@procedure), class: 'fr-nav__link' .fr-nav__item.relative - %button.account-btn.fr-translate__btn.fr-btn.fr-btn--tertiary.fr-btn--no-border{ "aria-controls" => "user-support", "aria-expanded" => "false", style: "box-shadow: none; background: none;" } + %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 %ul.fr-menu__list @@ -36,7 +39,7 @@ = t('instructeurs.dossiers.header.banner.copy_link_button') .fr-nav__item.relative - %button.account-btn.fr-translate__btn.fr-btn.fr-btn--tertiary.fr-btn--no-border{ "aria-controls" => "downloads", "aria-expanded" => "false", style: "box-shadow: none; background: none;" } + %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 %ul.fr-menu__list