ajout propriétés de rue et siret aux lieux, champs en plus après envoi

This commit is contained in:
Tykayn 2025-06-09 00:11:16 +02:00 committed by tykayn
parent b9257d34fd
commit 3ccfd732e7
17 changed files with 361 additions and 56 deletions

View file

@ -2,20 +2,6 @@
{% block title %}{{ 'display.title'|trans }} {{ commerce_overpass.tags_converted.name }}{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
.hidden { display: none; }
input[type="checkbox"] { width: 20px; height: 20px; }
.is-invalid { border: 1px solid red; }
.is-invalid #validation_messages { color: red; }
img { max-width: 100%; max-height: 400px; }
@media (max-width: 768px) {
.form-label { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem !important; }
}
</style>
{% endblock %}
{% block body %}
<div class="container edit-land mt-4">
@ -39,18 +25,22 @@
</div>
{% if commerce_overpass.tags_converted.image is defined %}
<div id="images" class="d-none">
<img class="img-fluid img-thumbnail mb-3" src="{{ commerce_overpass.tags_converted.image }}" />
url d'image de la facade : {{ commerce_overpass.tags_converted.image }}
{% if commerce_overpass.tags_converted.panoramax is defined or commerce_overpass.tags_converted.wikimedia_commons is defined %}
<input type="text" class="form-control" name="commerce_tag_value__image" value="{{ commerce_overpass.tags_converted.image }}">
url d'image sur Panoramax : {{ commerce_overpass.tags_converted.panoramax is defined ? commerce_overpass.tags_converted.panoramax : '' }}
<input type="text" class="form-control" name="commerce_tag_value__panoramax" value="{{ commerce_overpass.tags_converted.panoramax is defined ? commerce_overpass.tags_converted.panoramax : '' }}">
wikimedia_commons:
<input type="text" class="form-control" name="commerce_tag_value__wikimedia_commons" value="{{ commerce_overpass.tags_converted.wikimedia_commons is defined ? commerce_overpass.tags_converted.wikimedia_commons : '' }}">
{% endif %}
</div>
{% endif %}
{% if commerce_overpass.tags_converted.amenity is defined and (commerce_overpass.tags_converted.amenity == 'restaurant' or commerce_overpass.tags_converted.amenity == 'bar' or commerce_overpass.tags_converted.amenity == 'cafe' or commerce_overpass.tags_converted.amenity == 'fast_food') %}
{% include 'public/edit/restaurant.html.twig' %}
@ -187,12 +177,6 @@
{{ parent() }}
<script src={{asset('js/mapbox/mapbox-gl.js')}}></script>
<script>
{# function openInJOSM(type, id) {
const josmUrl = `http://localhost:8111/load_object?objects=${type}${id}`;
window.open(josmUrl);
} #}
{% if commerce is not empty and mapbox_token is not empty and maptiler_token is not empty and commerce_overpass['@attributes'].lon is defined and commerce_overpass['@attributes'].lat is defined %}
mapboxgl.accessToken = '{{ mapbox_token }}';
map = new mapboxgl.Map({