Merge pull request #5993 from tchak/expose-rich-address-information

Instructeur : affichage de plus d’informations sur les champs Adresse, Commune et Région (#5993)
This commit is contained in:
Pierre de La Morinerie 2021-03-18 08:30:49 +01:00 committed by GitHub
commit 6809621eec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)