Add editing flag to geo areas list

This commit is contained in:
Paul Chavard 2020-06-09 17:19:59 +02:00
parent d099314e56
commit 83baa58aa6
3 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
<%= render_to_element("#{@selector} + .geo-areas",
partial: 'shared/champs/carte/geo_areas',
locals: { champ: @champ }) %>
locals: { champ: @champ, editing: true }) %>
<% if @update_cadastres %>
<%= fire_event('cadastres:update', { featureCollection: @champ.to_feature_collection }.to_json) %>

View file

@ -1,4 +1,4 @@
- if champ.geometry?
= react_component("MapReader", { featureCollection: champ.to_feature_collection } )
.geo-areas
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ }
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, editing: false }

View file

@ -2,4 +2,4 @@
= react_component("MapEditor", { featureCollection: champ.to_feature_collection, url: champs_carte_features_path(preview ? 'preview' : champ), preview: preview, hasCadastres: !!champ.cadastres? }, class: "carte-#{champ.id}")
.geo-areas
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ }
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ, editing: true }