demarches-normaliennes/app/views/users/description/_champs.html.haml

15 lines
739 B
Text
Raw Normal View History

- 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
2016-12-07 15:53:26 +01:00
- unless @headers.blank?
- if @champs.first.type_champ != 'header_section'
2017-04-06 19:10:25 +02:00
= render partial: render_partial_url, locals: { libelle: 'Dossier', order_place: -1, champs: @champs }
- @headers.each do |header|
.row
2017-04-06 19:10:25 +02:00
%div{ class: "type_champ-#{header.type_champ}" }
= render partial: render_partial_url, locals: { libelle: header.libelle, order_place: header.order_place, champs: @champs }
- else
.row
2017-04-06 19:10:25 +02:00
= render partial: render_partial_url, locals: { libelle: 'Dossier', order_place: -1, champs: @champs }