2023-07-04 11:22:57 +02:00
|
|
|
= tag.div(class: class_names(reset_tag_for_depth => true, "fr-my-2w" => !first_level?), 'data-controller': 'expand') do
|
2023-04-28 10:33:01 +02:00
|
|
|
- if header_section
|
2023-07-04 11:22:57 +02:00
|
|
|
%div{ class: class_names(flex: true, "top-bordered" => first_level?) }
|
|
|
|
= render EditableChamp::HeaderSectionComponent.new(champ: header_section, html_class: {' fr-m-0 fr-text--md fr-px-4v flex-grow' => true, "fr-text-action-high--blue-france" => header_section.level == 1, 'fr-py-2w' => first_level?, 'fr-py-1v' => !first_level?})
|
|
|
|
- if ![champs, sections].map(&:empty?).all? && first_level?
|
2023-04-28 10:33:01 +02:00
|
|
|
%button{ type: "button", aria: { controls: section_id, "expanded": "true", label: t('.toggle_section', section: header_section.libelle) }, href: section_id, 'data-action': 'click->expand#toggle', class: "fr-btn fr-btn--tertiary-no-outline" }
|
|
|
|
%i.fr-icon-arrow-up-s-line{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
|
|
|
|
|
|
|
%div{ id: section_id, 'data-expand-target': 'content' }
|
|
|
|
- if !champs.empty?
|
2023-07-03 22:41:46 +02:00
|
|
|
= render Dossiers::ChampsRowsShowComponent.new(champs: champs, seen_at: @demande_seen_at, profile: @profile)
|
2023-04-28 10:33:01 +02:00
|
|
|
|
|
|
|
- sections.each do |section|
|
|
|
|
= render section
|