Remove legacy carto
This commit is contained in:
parent
c4c1c971ca
commit
901b6e23a8
17 changed files with 10 additions and 572 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
<%= render_to_element("#{@selector} + .geo-areas",
|
||||
partial: 'shared/champs/carte/geo_areas',
|
||||
locals: { champ: @champ, error: @error }) %>
|
||||
locals: { champ: @champ }) %>
|
||||
|
||||
<% if @update_cadastres %>
|
||||
<%= fire_event('cadastres:update', { featureCollection: @champ.to_feature_collection }.to_json) %>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<%= render_flash(timeout: 5000, fixed: true) %>
|
||||
|
||||
<%= render_to_element("#{@selector} + .geo-areas",
|
||||
partial: 'shared/champs/carte/geo_areas',
|
||||
locals: { champ: @champ, error: @error }) %>
|
||||
|
||||
<%= fire_event('carte:update', { selector: @selector, data: @champ.to_render_data }.to_json) %>
|
|
@ -8,9 +8,7 @@
|
|||
- if champ.quartiers_prioritaires?
|
||||
.areas-title Quartiers prioritaires
|
||||
.areas
|
||||
- if error.present?
|
||||
.error Merci de dessiner une surface plus petite afin de récupérer les quartiers prioritaires.
|
||||
- elsif !champ.geometry?
|
||||
- if !champ.geometry?
|
||||
Aucune zone tracée
|
||||
- elsif champ.quartiers_prioritaires.blank?
|
||||
= t('errors.messages.quartiers_prioritaires_empty', count: champ.selections_utilisateur.size)
|
||||
|
@ -22,9 +20,7 @@
|
|||
- if champ.cadastres?
|
||||
.areas-title Parcelles cadastrales
|
||||
.areas
|
||||
- if error.present?
|
||||
.error Merci de dessiner une surface plus petite afin de récupérer les parcelles cadastrales.
|
||||
- elsif !champ.geometry?
|
||||
- if !champ.geometry?
|
||||
Aucune zone tracée
|
||||
- elsif champ.cadastres.blank?
|
||||
= t('errors.messages.cadastres_empty', count: champ.selections_utilisateur.size)
|
||||
|
@ -36,9 +32,7 @@
|
|||
- if champ.parcelles_agricoles?
|
||||
.areas-title Parcelles agricoles (RPG)
|
||||
.areas
|
||||
- if error.present?
|
||||
.error Merci de dessiner une surface plus petite afin de récupérer les parcelles agricoles.
|
||||
- elsif !champ.geometry?
|
||||
- if !champ.geometry?
|
||||
Aucune zone tracée
|
||||
- elsif champ.parcelles_agricoles.blank?
|
||||
= t('errors.messages.parcelles_agricoles_empty', count: champ.selections_utilisateur.size)
|
||||
|
|
|
@ -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, error: false }
|
||||
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ }
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
- if feature_enabled?(:new_map_editor)
|
||||
- preview = !champ.persisted?
|
||||
= react_component("MapEditor", { featureCollection: champ.to_feature_collection, hasCadastres: champ.has_cadastres?, url: champs_carte_features_path(preview ? 'preview' : champ), preview: preview }, class: "carte-#{champ.id}")
|
||||
- else
|
||||
.toolbar
|
||||
%button.button.primary.new-area Ajouter une zone
|
||||
%select.select2.adresse{ data: { address: true }, placeholder: 'Saisissez une adresse ou positionner la carte' }
|
||||
.carte.edit{ data: { geo: geo_data(champ) }, class: "carte-#{form.index}" }
|
||||
|
||||
= form.hidden_field :value,
|
||||
data: { remote: true, feature_collection_id: champ.stable_id, url: champs_carte_path(form.index), params: champ_carte_params(champ).to_query, method: 'post' }
|
||||
- preview = !champ.persisted?
|
||||
= 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, error: false }
|
||||
= render partial: 'shared/champs/carte/geo_areas', locals: { champ: champ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue