demarches-normaliennes/app/views/administrateurs/procedures/_champs_summary.html.haml
2024-01-16 11:23:17 +01:00

11 lines
741 B
Text

#summary{ class: @procedure.header_sections.present? ? 'fr-col-12 fr-col-md-3' : '' }
- if @procedure.header_sections.present?
%nav.fr-sidemenu.sticky.fr-hidden.fr-unhidden-md{ "aria-labelledby" => "fr-summary-title", role: "navigation" }
%ul.fr-sidemenu__list
- @procedure.header_sections.each do |header|
%li.fr-sidemenu__item
- level = header.type_de_champ.header_section_level_value.to_i
- if level == 1
%a.fr-sidemenu__link{ href: "##{dom_id(header, :type_de_champ_editor)}" }= header.libelle
- else
%a.fr-sidemenu__link{ class: level >= 3 ? 'custom-link-grey': '', href: "##{dom_id(header, :type_de_champ_editor)}" }= "-- #{header.libelle}"