diff --git a/app/assets/stylesheets/forms.scss b/app/assets/stylesheets/forms.scss index 1bb3be8bc..11073fb41 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 8f46aecfa..a1e00c171 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 5a204c22d..45551bab6 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 8413f602d..137932e3a 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 9203efa27..12d62d076 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 870fdb109..e56fb7222 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"