Move the display logic directly into the carte champ partial

This commit is contained in:
gregoirenovel 2018-12-28 16:29:47 +01:00
parent dbbe2866d5
commit 5014e3f4c1
2 changed files with 5 additions and 5 deletions

View file

@ -1,3 +1,4 @@
.carte{ data: { geo: geo_data(champ) } }
.geo-areas
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, error: false }
- if champ.to_s.present?
.carte{ data: { geo: geo_data(champ) } }
.geo-areas
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, error: false }

View file

@ -41,8 +41,7 @@
= "#{c.libelle} :"
%td.rich-text
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
- if c.to_s.present?
= render partial: "shared/champs/carte/show", locals: { champ: c }
= render partial: "shared/champs/carte/show", locals: { champ: c }
- else
%th.libelle
= "#{c.libelle} :"