Add editing flag to geo areas list
This commit is contained in:
parent
d099314e56
commit
83baa58aa6
3 changed files with 3 additions and 3 deletions
|
@ -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) %>
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue