From 103e39159b10b2f6bb30d87177476e596f66bf7a Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 8 Jan 2024 18:13:33 +0100 Subject: [PATCH] style(admin): fix alignement in editor with type de champ used by routing --- app/assets/stylesheets/procedure_champs_editor.scss | 3 ++- .../champ_component/champ_component.html.haml | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/procedure_champs_editor.scss b/app/assets/stylesheets/procedure_champs_editor.scss index 4a4a8fbc5..78319ccae 100644 --- a/app/assets/stylesheets/procedure_champs_editor.scss +++ b/app/assets/stylesheets/procedure_champs_editor.scss @@ -33,10 +33,11 @@ } } - .delete { + .right { flex-grow: 1; display: flex; justify-content: flex-end; + align-items: center; } &.first .move-up { diff --git a/app/components/types_de_champ_editor/champ_component/champ_component.html.haml b/app/components/types_de_champ_editor/champ_component/champ_component.html.haml index 2e2ac0f4c..1dfd97125 100644 --- a/app/components/types_de_champ_editor/champ_component/champ_component.html.haml +++ b/app/components/types_de_champ_editor/champ_component/champ_component.html.haml @@ -5,13 +5,12 @@ %button.fr-btn.fr-btn--tertiary-no-outline.fr-icon-arrow-up-line.move-up{ move_button_options(:up) } %button.fr-btn.fr-btn--tertiary-no-outline.fr-icon-arrow-down-line.move-down{ move_button_options(:down) } - - if coordinate.used_by_routing_rules? - .flex.align-center + .flex.right + - if coordinate.used_by_routing_rules? %span utilisé pour = link_to('le routage', admin_procedure_groupe_instructeurs_path(revision.procedure_id, anchor: 'routing-rules')) - - else - .flex.justify-start.delete + - else = button_to type_de_champ_path, class: 'fr-btn fr-btn--tertiary-no-outline fr-icon-delete-line', title: "Supprimer le champ", method: :delete, form: { data: { turbo_confirm: 'Êtes vous sûr de vouloir supprimer ce champ ?' } } do %span.sr-only Supprimer