-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11237 from demarches-simplifiees/etq-administrate…
…ur-ordonner-labels ETQ admin : je peux ordonner les labels
- Loading branch information
Showing
12 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rs/move_procedures_position_controller.ts → ...rollers/move_cards_position_controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
app/views/administrateurs/labels/order_positions.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.fr-container.fr-mt-6w.fr-mb-15w | ||
= link_to " Liste des labels", admin_procedure_labels_path, class: 'fr-link fr-icon-arrow-left-line fr-link--icon--left fr-icon--sm' | ||
%h3.fr-my-3w | ||
Personnaliser l'ordre des #{@labels.size} labels | ||
%p Déplacez les labels dans la liste pour définir leur ordre d'affichage pour les instructeurs : | ||
|
||
%fr-container{ data: { controller: 'move-cards-position' } } | ||
= form_tag update_order_positions_admin_procedure_labels_path, method: :patch, id: 'order-admin-procedure-labels-form' do | ||
- @labels.each do |label| | ||
.fr-card.fr-mb-1w.fr-py-1w.fr-px-2w | ||
.flex.align-center | ||
%button.fr-btn.fr-btn--sm.fr-icon-arrow-up-line.fr-btn--secondary.fr-col-1{ data: { action: "move-cards-position#moveUp" } } | ||
%button.fr-btn.fr-btn--sm.fr-icon-arrow-down-line.fr-btn--secondary.fr-col-1.fr-ml-2w.fr-mr-4w{ data: { action: "move-cards-position#moveDown" } } | ||
= tag_label(label.name, label.color) | ||
= hidden_field_tag "ordered_label_ids[]", label.id | ||
|
||
.fixed-footer.fr-py-1w | ||
.fr-btns-group.fr-btns-group--center.fr-btns-group--inline.fr-btns-group--inline-lg | ||
= link_to "Annuler", admin_procedure_labels_path, class: 'fr-btn fr-btn--secondary fr-my-1w' | ||
%button.fr-btn.fr-my-1w{ type: "submit", form: 'order-admin-procedure-labels-form' } Valider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class AddPositionToLabels < ActiveRecord::Migration[7.0] | ||
def change | ||
add_column :labels, :position, :integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters