From 592f040ada2334ef33dc8b44e9220c3d9b23eb35 Mon Sep 17 00:00:00 2001 From: Christian Lautier <15379878+maatinito@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:58:33 -1000 Subject: [PATCH] Procedure champ editor: place the 'Move champ after' selection in the champ's header. --- app/assets/stylesheets/procedure_champs_editor.scss | 1 + .../champ_component/champ_component.html.haml | 2 +- .../select_champ_position_component.html.haml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/procedure_champs_editor.scss b/app/assets/stylesheets/procedure_champs_editor.scss index 6f1db8ac1..b12f0ef46 100644 --- a/app/assets/stylesheets/procedure_champs_editor.scss +++ b/app/assets/stylesheets/procedure_champs_editor.scss @@ -52,6 +52,7 @@ .head { select { margin-bottom: 0px; + font-size: smaller; } } 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 c7ce05900..26f4c5882 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 @@ -4,6 +4,7 @@ .position.flex.align-center= (@coordinate.position + 1).to_s %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) } + = render TypesDeChampEditor::SelectChampPositionComponent.new(revision:, coordinate:) .flex.right - if coordinate.used_by_routing_rules? @@ -141,4 +142,3 @@ .type-de-champ-add-button{ class: class_names(root: !coordinate.child?, flex: true) } = render TypesDeChampEditor::AddChampButtonComponent.new(revision: coordinate.revision, parent: coordinate&.parent, is_annotation: coordinate.private?, after_stable_id: type_de_champ.stable_id) - = render TypesDeChampEditor::SelectChampPositionComponent.new(revision:, coordinate:) diff --git a/app/components/types_de_champ_editor/select_champ_position_component/select_champ_position_component.html.haml b/app/components/types_de_champ_editor/select_champ_position_component/select_champ_position_component.html.haml index c51b1d287..e997bc45c 100644 --- a/app/components/types_de_champ_editor/select_champ_position_component/select_champ_position_component.html.haml +++ b/app/components/types_de_champ_editor/select_champ_position_component/select_champ_position_component.html.haml @@ -1,3 +1,3 @@ = form_with(url: move_and_morph_admin_procedure_type_de_champ_path(@coordinate.revision.procedure, @coordinate.type_de_champ.stable_id), class: 'fr-ml-3w flex', method: :patch, data: { turbo: true }) do |f| - = label_tag :target_stable_id, "Déplacer le champ après ", for: describedby_id, class: 'flex align-center flex-no-shrink fr-mr-3w' + = label_tag :target_stable_id, "Déplacer le champ après ", for: describedby_id, class: 'flex align-center flex-no-shrink fr-mr-3w fr-hint-text' = select_tag :target_stable_id, options_for_select(options), id: describedby_id, class: 'fr-select', data: { 'select-champ-position-template-target': 'select', selected: @coordinate.stable_id }