demarches-normaliennes/app/views/shared/dossiers/_champs.html.haml

34 lines
1.7 KiB
Text
Raw Normal View History

%table.table.vertical.dossier-champs
2017-07-11 16:50:29 +02:00
%tbody
- champs.reject(&:exclude_from_view?).each do |c|
2017-07-11 16:50:29 +02:00
%tr
2018-12-28 20:35:06 +01:00
- if c.type_champ == TypeDeChamp.type_champs.fetch(:header_section)
%th.header-section{ colspan: 3 }
2017-07-11 16:50:29 +02:00
= c.libelle
- else
%th.libelle
2017-07-11 16:50:29 +02:00
= "#{c.libelle} :"
%td.rich-text
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
2018-12-28 20:35:06 +01:00
- case c.type_champ
2018-12-28 16:36:16 +01:00
- when TypeDeChamp.type_champs.fetch(:carte)
= render partial: "shared/champs/carte/show", locals: { champ: c }
2018-12-28 20:35:06 +01:00
- when TypeDeChamp.type_champs.fetch(:dossier_link)
= render partial: "shared/champs/dossier_link/show", locals: { champ: c }
2018-12-28 16:36:16 +01:00
- when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)
= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: c }
2018-12-28 20:35:06 +01:00
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
= render partial: "shared/champs/piece_justificative/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:siret)
= render partial: "shared/champs/siret/show", locals: { champ: c, profile: profile }
2018-12-28 16:36:16 +01:00
- when TypeDeChamp.type_champs.fetch(:textarea)
2019-01-09 11:49:52 +01:00
= render partial: "shared/champs/textarea/show", locals: { champ: c }
2018-12-28 20:35:06 +01:00
- else
= sanitize(c.to_s)
- if c.type_champ != TypeDeChamp.type_champs.fetch(:header_section)
%td.updated-at
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
modifié le
= c.updated_at.strftime("%d/%m/%Y à %H:%M")