Merge pull request #1795 from betagouv/carto-empty-state

Add an empty state for carto
This commit is contained in:
gregoirenovel 2018-04-04 16:45:55 +02:00 committed by GitHub
commit 62b9eb3bc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,19 +1,22 @@
#map - if dossier.json_latlngs.nil?
%h2.empty-text Non renseigné
- else
#map
- if dossier.quartier_prioritaires.any? - if dossier.quartier_prioritaires.any?
.card-title Quartiers prioritaires .card-title Quartiers prioritaires
%ul %ul
- dossier.quartier_prioritaires.each do |q| - dossier.quartier_prioritaires.each do |q|
%li= q.nom %li= q.nom
- if dossier.cadastres.any? - if dossier.cadastres.any?
.card-title Parcelles cadastrales .card-title Parcelles cadastrales
%ul %ul
- dossier.cadastres.each do |p| - dossier.cadastres.each do |p|
%li %li
= "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}" = "Parcelle n° #{p.numero} - Feuille #{p.code_arr} #{p.section} #{p.feuille}"
:javascript :javascript
var getPositionUrl = "#{position_gestionnaire_dossier_path(dossier.procedure, dossier)}"; var getPositionUrl = "#{position_gestionnaire_dossier_path(dossier.procedure, dossier)}";
var dossierJsonLatLngs = #{raw(ensure_safe_json(dossier.json_latlngs))}; var dossierJsonLatLngs = #{raw(ensure_safe_json(dossier.json_latlngs))};
var dossierCadastres = #{raw(ensure_safe_json(dossier.cadastres.to_json))}; var dossierCadastres = #{raw(ensure_safe_json(dossier.cadastres.to_json))};