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:
commit
6809621eec
4 changed files with 18 additions and 0 deletions
4
app/views/shared/champs/address/_show.html.haml
Normal file
4
app/views/shared/champs/address/_show.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
= format_text_value(champ.to_s)
|
||||
- if champ.data.present?
|
||||
Code INSEE :
|
||||
= champ.data['city_code']
|
4
app/views/shared/champs/communes/_show.html.haml
Normal file
4
app/views/shared/champs/communes/_show.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
= format_text_value(champ.to_s)
|
||||
- if champ.external_id.present?
|
||||
Code INSEE :
|
||||
= champ.external_id
|
4
app/views/shared/champs/regions/_show.html.haml
Normal file
4
app/views/shared/champs/regions/_show.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- if champ.external_id.present?
|
||||
= format_text_value("#{champ.external_id} - #{champ}")
|
||||
- else
|
||||
= format_text_value(champ.to_s)
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue