From 79b5b25720e9879caa77afb7c30a9dd27dbc1559 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 24 Oct 2023 11:07:26 +0200 Subject: [PATCH] =?UTF-8?q?correctif(procedure.edit):=20le=20fixed-footer?= =?UTF-8?q?=20venait=20en=20sur-elevation=20des=20options=20avanc=C3=A9es?= =?UTF-8?q?=20la=20ou=20il=20etait=20pr=C3=A9sent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/forms.scss | 14 +++++++++++++ .../procedures/annotations.html.haml | 15 ++++++------- .../procedures/champs.html.haml | 21 ++++++++++--------- .../administrateurs/procedures/edit.html.haml | 19 +++++++++-------- .../administrateurs/procedures/new.html.haml | 19 +++++++++-------- .../administrateurs/services/_form.html.haml | 15 ++++++------- 6 files changed, 61 insertions(+), 42 deletions(-) diff --git a/app/assets/stylesheets/forms.scss b/app/assets/stylesheets/forms.scss index 1bb3be8bc76..11073fb41d4 100644 --- a/app/assets/stylesheets/forms.scss +++ b/app/assets/stylesheets/forms.scss @@ -628,6 +628,20 @@ textarea::placeholder { color: $dark-grey; } +@media (max-width: 62em) { + + .padded-fixed-footer { + padding-top: 120px; + } +} + +@media (min-width: 62em) { + + .padded-fixed-footer { + padding-top: 60px; + } +} + .fixed-footer { border-top: 2px solid $blue-france-500; position: fixed; diff --git a/app/views/administrateurs/procedures/annotations.html.haml b/app/views/administrateurs/procedures/annotations.html.haml index 8f46aecfae2..a1e00c17186 100644 --- a/app/views/administrateurs/procedures/annotations.html.haml +++ b/app/views/administrateurs/procedures/annotations.html.haml @@ -9,11 +9,12 @@ = render NestedForms::FormOwnerComponent.new = render TypesDeChampEditor::EditorComponent.new(revision: @procedure.draft_revision, is_annotation: true) -.fixed-footer - .fr-container - %ul.fr-btns-group.fr-btns-group--inline-md - %li - = link_to t('continue_annotations', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_annotations', scope: [:layouts, :breadcrumb]), class: 'fr-btn' - - if @procedure.draft_revision.revision_types_de_champ_private.count > 0 +.padded-fixed-footer + .fixed-footer + .fr-container + %ul.fr-btns-group.fr-btns-group--inline-md %li - = link_to t('preview_annotations', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure, params: {tab: 'annotations-privees'}), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary' + = link_to t('continue_annotations', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_annotations', scope: [:layouts, :breadcrumb]), class: 'fr-btn' + - if @procedure.draft_revision.revision_types_de_champ_private.count > 0 + %li + = link_to t('preview_annotations', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure, params: {tab: 'annotations-privees'}), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary' diff --git a/app/views/administrateurs/procedures/champs.html.haml b/app/views/administrateurs/procedures/champs.html.haml index 5a204c22dfd..45551bab656 100644 --- a/app/views/administrateurs/procedures/champs.html.haml +++ b/app/views/administrateurs/procedures/champs.html.haml @@ -8,14 +8,15 @@ = render NestedForms::FormOwnerComponent.new = render TypesDeChampEditor::EditorComponent.new(revision: @procedure.draft_revision) -.fixed-footer - .fr-container - .flex - %ul.fr-btns-group.fr-btns-group--inline-md - %li - = link_to t('continue', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_title', scope: [:layouts, :breadcrumb]), class: 'fr-btn' - - if @procedure.draft_revision.revision_types_de_champ_public.count > 0 +.padded-fixed-footer + .fixed-footer + .fr-container + .flex + %ul.fr-btns-group.fr-btns-group--inline-md %li - = link_to t('preview', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary' - .fr-ml-auto - = render TypesDeChampEditor::EstimatedFillDurationComponent.new(revision: @procedure.draft_revision, is_annotation: false) + = link_to t('continue', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_title', scope: [:layouts, :breadcrumb]), class: 'fr-btn' + - if @procedure.draft_revision.revision_types_de_champ_public.count > 0 + %li + = link_to t('preview', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary' + .fr-ml-auto + = render TypesDeChampEditor::EstimatedFillDurationComponent.new(revision: @procedure.draft_revision, is_annotation: false) diff --git a/app/views/administrateurs/procedures/edit.html.haml b/app/views/administrateurs/procedures/edit.html.haml index 8413f602d31..137932e3a88 100644 --- a/app/views/administrateurs/procedures/edit.html.haml +++ b/app/views/administrateurs/procedures/edit.html.haml @@ -16,12 +16,13 @@ = render partial: 'administrateurs/procedures/informations', locals: { f: f } - .fixed-footer - .fr-container - .fr-grid-row - .fr-col-12.fr-col-offset-md-2.fr-col-md-8 - %ul.fr-btns-group.fr-btns-group--inline-md - %li - = f.button 'Enregistrer', class: 'fr-btn' - %li - = link_to 'Annuler', admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--secondary', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'} + .padded-fixed-footer + .fixed-footer + .fr-container + .fr-grid-row + .fr-col-12.fr-col-offset-md-2.fr-col-md-8 + %ul.fr-btns-group.fr-btns-group--inline-md + %li + = f.button 'Enregistrer', class: 'fr-btn' + %li + = link_to 'Annuler', admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--secondary', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'} diff --git a/app/views/administrateurs/procedures/new.html.haml b/app/views/administrateurs/procedures/new.html.haml index 9203efa2770..12d62d0765d 100644 --- a/app/views/administrateurs/procedures/new.html.haml +++ b/app/views/administrateurs/procedures/new.html.haml @@ -15,12 +15,13 @@ = render partial: 'administrateurs/procedures/informations', locals: { f: f } - .fixed-footer - .fr-container - .fr-grid-row - .fr-col-12.fr-col-offset-md-2.fr-col-md-8 - %ul.fr-btns-group.fr-btns-group--inline-md - %li - = f.button 'Créer la démarche', class: 'fr-btn' - %li - = link_to 'Annuler', admin_procedures_path, class: 'fr-btn fr-btn--secondary', data: { confirm: 'Êtes-vous sûr de vouloir annuler la création de cette démarche ?'} + .padded-fixed-footer + .fixed-footer + .fr-container + .fr-grid-row + .fr-col-12.fr-col-offset-md-2.fr-col-md-8 + %ul.fr-btns-group.fr-btns-group--inline-md + %li + = f.button 'Créer la démarche', class: 'fr-btn' + %li + = link_to 'Annuler', admin_procedures_path, class: 'fr-btn fr-btn--secondary', data: { confirm: 'Êtes-vous sûr de vouloir annuler la création de cette démarche ?'} diff --git a/app/views/administrateurs/services/_form.html.haml b/app/views/administrateurs/services/_form.html.haml index 870fdb109c5..e56fb7222a7 100644 --- a/app/views/administrateurs/services/_form.html.haml +++ b/app/views/administrateurs/services/_form.html.haml @@ -34,10 +34,11 @@ - if procedure_id.present? = hidden_field_tag :procedure_id, procedure_id - .fixed-footer - .fr-container - %ul.fr-btns-group.fr-btns-group--inline-md - %li - = f.submit "Enregistrer", class: "fr-btn" - %li - = link_to "Annuler et revenir à la page de suivi", admin_procedure_path(id: @procedure.id), class: "fr-btn fr-btn--secondary" + .padded-fixed-footer + .fixed-footer + .fr-container + %ul.fr-btns-group.fr-btns-group--inline-md + %li + = f.submit "Enregistrer", class: "fr-btn" + %li + = link_to "Annuler et revenir à la page de suivi", admin_procedure_path(id: @procedure.id), class: "fr-btn fr-btn--secondary"