Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit-MINT committed Jan 22, 2025
1 parent 8babc9e commit cf0566f
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions app/views/instructeurs/dossiers/_header_top.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,33 @@
%p.fr-mb-1w
%small L’usager a supprimé son compte. Vous pouvez archiver puis supprimer le dossier.

- if dossier.procedure.labels.present?
.fr-mb-3w
- if dossier.labels.present?
- dossier.labels.order(:position).each do |label|
= tag_label(label.name, label.color)

= render Dropdown::MenuComponent.new(wrapper: :span, button_options: { class: ['fr-btn--sm fr-btn--tertiary-no-outline fr-pl-1v']}, menu_options: { class: ['dropdown-label left-aligned'] }) do |menu|
- if dossier.labels.empty?
- menu.with_button_inner_html do
Ajouter un label

- menu.with_form do
= form_with(url: dossier_labels_instructeur_dossier_path(dossier_id: dossier.id, procedure_id: dossier.procedure.id), method: :post, class: 'fr-p-3w', data: { controller: 'autosubmit', turbo: 'true' }) do |f|
%fieldset.fr-fieldset.fr-mt-2w.fr-mb-0
= f.collection_check_boxes :label_id, dossier.procedure.labels.order(:position), :id, :name, include_hidden: false do |b|
.fr-fieldset__element
.fr-checkbox-group.fr-checkbox-group--sm.fr-mb-1w
= b.check_box(checked: DossierLabel.find_by(dossier_id: dossier.id, label_id: b.value).present? )
= b.label(class: "fr-label fr-tag fr-tag--sm fr-tag--#{Label.colors.fetch(b.object.color)}") { b.text }

%hr
%p.fr-text--sm.fr-text-mention--grey.fr-mb-0
%b Besoin d'autres labels ?
%br
Contactez les
= link_to 'administrateurs de la démarche', administrateurs_instructeur_procedure_path(dossier.procedure), class: 'fr-link fr-link--sm', **external_link_attributes
.flex
- if dossier.procedure.labels.present?
.fr-mb-3w
- if dossier.labels.present?
- dossier.labels.order(:position).each do |label|
= tag_label(label.name, label.color)

= render Dropdown::MenuComponent.new(wrapper: :span, button_options: { class: ['fr-btn--sm fr-btn--tertiary-no-outline fr-pl-1v']}, menu_options: { class: ['dropdown-label left-aligned'] }) do |menu|
- if dossier.labels.empty?
- menu.with_button_inner_html do
Ajouter un label

- menu.with_form do
= form_with(url: dossier_labels_instructeur_dossier_path(dossier_id: dossier.id, procedure_id: dossier.procedure.id), method: :post, class: 'fr-p-3w', data: { controller: 'autosubmit', turbo: 'true' }) do |f|
%fieldset.fr-fieldset.fr-mt-2w.fr-mb-0
= f.collection_check_boxes :label_id, dossier.procedure.labels.order(:position), :id, :name, include_hidden: false do |b|
.fr-fieldset__element
.fr-checkbox-group.fr-checkbox-group--sm.fr-mb-1w
= b.check_box(checked: DossierLabel.find_by(dossier_id: dossier.id, label_id: b.value).present? )
= b.label(class: "fr-label fr-tag fr-tag--sm fr-tag--#{Label.colors.fetch(b.object.color)}") { b.text }

%hr
%p.fr-text--sm.fr-text-mention--grey.fr-mb-0
%b Besoin d'autres labels ?
%br
Contactez les
= link_to 'administrateurs de la démarche', administrateurs_instructeur_procedure_path(dossier.procedure), class: 'fr-link fr-link--sm', **external_link_attributes

.header-actions.fr-ml-auto
= render partial: 'instructeurs/dossiers/header_actions', locals: { dossier: }

0 comments on commit cf0566f

Please sign in to comment.