demarches-normaliennes/app/views/shared/dossiers/_champ_row.html.haml
2022-09-22 17:14:05 +02:00

68 lines
3.9 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- champs.reject(&:exclude_from_view?).filter(&:visible?).each do |c|
- if c.type_champ == TypeDeChamp.type_champs.fetch(:repetition)
%tr
%td.libelle.repetition{ colspan: 3 }
= "#{c.libelle} :"
- c.rows.each do |champs|
= render partial: "shared/dossiers/champ_row", locals: { champs: champs, demande_seen_at: demande_seen_at, profile: profile, repetition: true }
%tr
%td.libelle{ colspan: 4 }
- else
%tr
- if c.type_champ == TypeDeChamp.type_champs.fetch(:header_section)
%th.header-section{ colspan: 3 }
= c.libelle
- else
%td.libelle{ class: repetition ? 'padded' : '' }
= "#{c.libelle} :"
%td.rich-text
%div{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
- case c.type_champ
- when TypeDeChamp.type_champs.fetch(:carte)
= render partial: "shared/champs/carte/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:dossier_link)
= render partial: "shared/champs/dossier_link/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)
= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
= render partial: "shared/champs/piece_justificative/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:titre_identite)
= 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 }
- when TypeDeChamp.type_champs.fetch(:iban)
= render partial: "shared/champs/iban/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:textarea)
= render partial: "shared/champs/textarea/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:annuaire_education)
= render partial: "shared/champs/annuaire_education/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:cnaf)
= render partial: "shared/champs/cnaf/show", locals: { champ: c, profile: profile }
- when TypeDeChamp.type_champs.fetch(:dgfip)
= render partial: "shared/champs/dgfip/show", locals: { champ: c, profile: profile }
- when TypeDeChamp.type_champs.fetch(:pole_emploi)
= render partial: "shared/champs/pole_emploi/show", locals: { champ: c, profile: profile }
- when TypeDeChamp.type_champs.fetch(:mesri)
= render partial: "shared/champs/mesri/show", locals: { champ: c, profile: profile }
- when TypeDeChamp.type_champs.fetch(:address)
= render partial: "shared/champs/address/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:communes)
= render partial: "shared/champs/communes/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:regions)
= render partial: "shared/champs/regions/show", locals: { champ: c }
- when TypeDeChamp.type_champs.fetch(:rna)
= render partial: "shared/champs/rna/show", locals: { champ: c, profile: profile }
- when TypeDeChamp.type_champs.fetch(:date)
= c.to_s
- when TypeDeChamp.type_champs.fetch(:datetime)
= c.to_s
- when TypeDeChamp.type_champs.fetch(:number)
= number_with_html_delimiter(c.to_s)
- else
= format_text_value(c.to_s) unless c.blank?
- 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
= try_format_datetime(c.updated_at)