Exposer plus d’informations dans l’interface pour certains champs

This commit is contained in:
Paul Chavard 2021-03-17 11:51:45 +01:00
parent de5c2d3032
commit d59867c73b
4 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,4 @@
= format_text_value(champ.to_s)
- if champ.data.present?
Code INSEE :
= champ.data['city_code']

View file

@ -0,0 +1,4 @@
= format_text_value(champ.to_s)
- if champ.external_id.present?
Code INSEE :
= champ.external_id

View file

@ -0,0 +1,4 @@
- if champ.external_id.present?
= format_text_value("#{champ.external_id} - #{champ}")
- else
= format_text_value(champ.to_s)

View file

@ -36,6 +36,12 @@
= 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(: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(:date)
= c.to_s
- when TypeDeChamp.type_champs.fetch(:datetime)