Procedure champ editor: place the 'Move champ after' selection in the champ's header.

This commit is contained in:
Christian Lautier 2024-04-18 08:58:33 -10:00
parent b93d9fa992
commit 592f040ada
3 changed files with 3 additions and 2 deletions

View file

@ -52,6 +52,7 @@
.head { .head {
select { select {
margin-bottom: 0px; margin-bottom: 0px;
font-size: smaller;
} }
} }

View file

@ -4,6 +4,7 @@
.position.flex.align-center= (@coordinate.position + 1).to_s .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-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) } %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 .flex.right
- if coordinate.used_by_routing_rules? - if coordinate.used_by_routing_rules?
@ -141,4 +142,3 @@
.type-de-champ-add-button{ class: class_names(root: !coordinate.child?, flex: true) } .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::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:)

View file

@ -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| = 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 } = 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 }