demarches-normaliennes/app/views/users/description/_champs.html.haml
2018-01-12 11:32:43 +01:00

14 lines
752 B
Text

- render_partial_url = private ? 'users/description/champs/header_private_section' : 'users/description/champs/header_section'
- @champs = @champs_private if private
- @headers = @headers_private if private
- if @headers.present?
- if @champs.first.type_champ != 'header_section'
= render partial: render_partial_url, locals: { libelle: 'Dossier', order_place: -1, champs: @champs }
- @headers.each do |header|
.row
%div{ class: "type-champ-#{header.type_champ.gsub('_', '-')}" }
= render partial: render_partial_url, locals: { libelle: header.libelle, order_place: header.order_place, champs: @champs }
- else
.row
= render partial: render_partial_url, locals: { libelle: 'Dossier', order_place: -1, champs: @champs }