| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  | {% extends 'base.html.twig' %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-28 16:24:34 +02:00
										 |  |  | {% block title %}{{ 'display.title'|trans }} {{ commerce_overpass.tags_converted.name }}{% endblock %}
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | {% block stylesheets %}
 | 
					
						
							|  |  |  |     {{ parent() }}
 | 
					
						
							|  |  |  |     <style>
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  |         .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; }
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |         @media (max-width: 768px) {
 | 
					
						
							|  |  |  |             .form-label { margin-bottom: 0.5rem; }
 | 
					
						
							|  |  |  |             .mb-3 { margin-bottom: 1rem !important; }
 | 
					
						
							|  |  |  |         }
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  |     </style>
 | 
					
						
							|  |  |  | {% endblock %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block body %}
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  | <div class="container-fluid mt-4">
 | 
					
						
							|  |  |  |     <div class="row justify-content-center">
 | 
					
						
							|  |  |  |         <div class="col-12 col-lg-10 col-xl-8">
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  |             <div class="card shadow-sm">
 | 
					
						
							|  |  |  |                 <div class="card-body">
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                     <h1 class="card-title h2 mb-4">{{ 'display.welcome'|trans }} {{ commerce_overpass.tags_converted.name }}</h1>
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |                     <div id="map" style="height: 400px; width: 100%;" class="rounded mb-4"></div> 
 | 
					
						
							|  |  |  |                     {% include 'public/edit/address.html.twig' %}
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-26 23:51:46 +02:00
										 |  |  |                     {% if commerce_overpass is not empty %}
 | 
					
						
							|  |  |  |                         <form action="{{ path('app_public_submit', {'osm_object_id': commerce_overpass['@attributes'].id, 'version': commerce_overpass['@attributes'].version, 'changesetID': commerce_overpass['@attributes'].changeset }) }}" method="post" class="needs-validation">
 | 
					
						
							| 
									
										
										
										
											2025-05-26 16:22:01 +02:00
										 |  |  |                             <input type="hidden" name="osm_kind" value="{{ osm_kind }}">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                              {# nom #}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                             <div class="row g-3 mb-4"> 
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                                 <div class="col-12 col-md-4">
 | 
					
						
							|  |  |  |                                     <label for="commerce_tag_value__name" class="form-label">{{'display.keys.name'|trans}}</label>
 | 
					
						
							| 
									
										
										
										
											2025-05-26 16:22:01 +02:00
										 |  |  |                                 </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                                 <div class="col-12 col-md-8">
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  |                                     <input type="text" class="form-control" name="commerce_tag_value__name" value="{% if commerce_overpass.tags_converted.name is defined %}{{ commerce_overpass.tags_converted.name }}{% elseif commerce_overpass['@attributes'].name is defined %}{{ commerce_overpass['@attributes'].name }}{% endif %}">
 | 
					
						
							|  |  |  |                                 </div>
 | 
					
						
							|  |  |  |                             </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |                                 
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                             {% if commerce_overpass.tags_converted.image is defined %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                             <div id="images" class="d-none">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                                 <img class="img-fluid img-thumbnail mb-3" src="{{ commerce_overpass.tags_converted.image }}" />
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                                 url d'image de la facade : {{ commerce_overpass.tags_converted.image }}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                                 <input type="text" class="form-control" name="commerce_tag_value__image" value="{{ commerce_overpass.tags_converted.image }}">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                                 url d'image sur Panoramax : {{ commerce_overpass.tags_converted.panoramax is defined ? commerce_overpass.tags_converted.panoramax : '' }}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                                 <input type="text" class="form-control" name="commerce_tag_value__panoramax" value="{{ commerce_overpass.tags_converted.panoramax is defined ? commerce_overpass.tags_converted.panoramax : '' }}">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                             </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' %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |                             
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-28 16:24:34 +02:00
										 |  |  |                             {% if hide_filled_inputs and  (commerce_overpass.tags_converted.opening_hours) is defined and commerce_overpass.tags_converted.opening_hours is empty %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                                 <span class="deja-rempli d-none">
 | 
					
						
							|  |  |  |                                    opening_hours {{ 'display.already_filled'|trans }}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:24:50 +02:00
										 |  |  |                                 </span>
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  |                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:24:50 +02:00
										 |  |  |                                 {% include 'public/edit/opening_hours.html.twig' %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                                 {% include 'public/edit/clim.html.twig' %}
 | 
					
						
							| 
									
										
										
										
											2025-05-28 16:24:34 +02:00
										 |  |  |                             {% if hide_filled_inputs and (commerce_overpass.tags_converted.wheelchair) is defined and commerce_overpass.tags_converted.wheelchair is empty %} 
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                                 <span class="deja-rempli d-none">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:24:50 +02:00
										 |  |  |                                     {{ 'display.already_filled'|trans }}
 | 
					
						
							|  |  |  |                                 </span>
 | 
					
						
							|  |  |  |                             
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  |                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:24:50 +02:00
										 |  |  |                                 {% include 'public/edit/wheelchair.html.twig' %}
 | 
					
						
							|  |  |  |                             
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  |                             {% if hide_filled_inputs and (commerce_overpass.tags_converted.ask_angela) is defined and commerce_overpass.tags_converted.ask_angela is not empty %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                                 <span class="deja-rempli d-none ">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:24:50 +02:00
										 |  |  |                                     {{ 'display.already_filled'|trans }}
 | 
					
						
							|  |  |  |                                 </span>
 | 
					
						
							| 
									
										
										
										
											2025-05-27 19:13:35 +02:00
										 |  |  |                             {% endif %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:24:50 +02:00
										 |  |  |                                 {% include 'public/edit/ask_angela.html.twig' %}
 | 
					
						
							| 
									
										
										
										
											2025-05-26 16:22:01 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                             <div id="advanced_tags" class="d-none">
 | 
					
						
							| 
									
										
										
										
											2025-05-26 23:51:46 +02:00
										 |  |  |                             {% include 'public/edit/tags.html.twig' %}
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                             </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  |                             
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                             <div id="validation_messages" class="alert alert-danger d-none"></div>
 | 
					
						
							|  |  |  |                             <div class="d-grid gap-2 d-md-flex justify-content-md-end mt-4">
 | 
					
						
							|  |  |  |                                 <button type="submit" class="btn btn-primary  col-12 col-md-5">
 | 
					
						
							|  |  |  |                                     <i class="bi bi-send"></i>
 | 
					
						
							|  |  |  |                                     {{ 'display.submit'|trans }}
 | 
					
						
							|  |  |  |                                 </button>
 | 
					
						
							|  |  |  |                             </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:15:47 +02:00
										 |  |  |                             <hr>
 | 
					
						
							|  |  |  |                             
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  |                         </form>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:15:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:30:18 +02:00
										 |  |  |                         
 | 
					
						
							|  |  |  |                     {% endif %}
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         <div class="row">
 | 
					
						
							|  |  |  |             <div class="col-12 mt-4">
 | 
					
						
							|  |  |  |                 <div class="actions-modification">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                  
 | 
					
						
							| 
									
										
										
										
											2025-06-04 00:16:56 +02:00
										 |  |  |                     <a class="btn btn-info" href="{{ path('app_public_index') }}">
 | 
					
						
							|  |  |  |                         <i class="bi bi-people"></i> 
 | 
					
						
							|  |  |  |                         {{ 'display.contact_humans'|trans }}
 | 
					
						
							|  |  |  |                     </a>
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |                                  
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:30:18 +02:00
										 |  |  |                     <button id="showAllFields" class="btn btn-secondary mx-4">
 | 
					
						
							|  |  |  |                         <i class="bi bi-eye"></i>
 | 
					
						
							|  |  |  |                         Voir aussi les champs déjà remplis
 | 
					
						
							| 
									
										
										
										
											2025-06-04 00:16:56 +02:00
										 |  |  |                     </button>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:15:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-04 00:16:56 +02:00
										 |  |  |                     <button id="closedCommerce" class="btn btn-danger mx-4 mt-4">
 | 
					
						
							|  |  |  |                         <i class="bi bi-x-circle"></i>
 | 
					
						
							| 
									
										
										
										
											2025-05-29 13:30:18 +02:00
										 |  |  |                         Je souhaite signaler que ce commerce est fermé
 | 
					
						
							|  |  |  |                     </button>
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-27 12:17:46 +02:00
										 |  |  |     </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |     <div class="row justify-content-center mt-4">
 | 
					
						
							|  |  |  |         <div class="col-12 col-lg-10 col-xl-8">
 | 
					
						
							|  |  |  |             <div class="card">
 | 
					
						
							|  |  |  |                 <div class="card-body">
 | 
					
						
							|  |  |  |                     <div class="d-flex flex-column flex-md-row align-items-md-center justify-content-between">
 | 
					
						
							|  |  |  |                         <div class="mb-3 mb-md-0">
 | 
					
						
							|  |  |  |                             <span class="last-modification">{{ 'display.last_modification'|trans }}: {{ commerce_overpass['@attributes'].timestamp }}</span>, 
 | 
					
						
							|  |  |  |                             <strong>{{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }}</strong>
 | 
					
						
							|  |  |  |                             {{ 'display.by'|trans }} 
 | 
					
						
							|  |  |  |                             <a href="https://www.openstreetmap.org/user/{{ commerce_overpass['@attributes'].user }}" target="_blank">{{ commerce_overpass['@attributes'].user }}</a>
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |                         </div> 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                         <div class="lien-OpenStreetMap">
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |                             <a href="https://www.openstreetmap.org/{{commerce.osmKind}}/{{ commerce_overpass['@attributes'].id }}" target="_blank" class="btn btn-outline-secondary">
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                                 {{ 'display.view_on_osm'|trans }}
 | 
					
						
							|  |  |  |                             </a>
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |                             <button onclick="openInJOSM('{{commerce.osmKind}}', '{{ commerce_overpass['@attributes'].id }}')" class="btn btn-outline-secondary ms-2">
 | 
					
						
							|  |  |  |                                 <i class="bi bi-pencil"></i> Éditer dans JOSM
 | 
					
						
							|  |  |  |                             </button>
 | 
					
						
							|  |  |  |                             <button onclick="openInPanoramax()" class="btn btn-outline-secondary ms-2">
 | 
					
						
							|  |  |  |                                 <i class="bi bi-camera"></i> Voir dans Panoramax
 | 
					
						
							|  |  |  |                             </button>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                         </div>
 | 
					
						
							| 
									
										
										
										
											2025-06-01 23:35:15 +02:00
										 |  |  |                         <a href="{{ path('app_admin_stats', {'zip_code':  zone ?? '-1'}) }}" class="btn btn-outline-secondary">
 | 
					
						
							| 
									
										
										
										
											2025-05-29 17:49:35 +02:00
										 |  |  |                         <i class="bi bi-bar-chart"></i>
 | 
					
						
							|  |  |  |                             {{ 'display.view_stats'|trans }}
 | 
					
						
							|  |  |  |                         </a>
 | 
					
						
							| 
									
										
										
										
											2025-05-28 17:05:34 +02:00
										 |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="disclaimer mt-3 p-3 bg-light rounded">
 | 
					
						
							|  |  |  |                         <p class="mb-0">
 | 
					
						
							|  |  |  |                             <strong>{{ 'display.disclaimer.title'|trans }}:</strong>
 | 
					
						
							|  |  |  |                             {{ 'display.disclaimer.text'|trans }}
 | 
					
						
							|  |  |  |                         </p>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-27 12:17:46 +02:00
										 |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  |         </div>
 | 
					
						
							|  |  |  |     </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-29 16:50:25 +02:00
										 |  |  |     <div id="completion_progress" class="">
 | 
					
						
							|  |  |  |             <div class="container">
 | 
					
						
							|  |  |  |                 <div id="completion_display" class="mb-2"></div>
 | 
					
						
							|  |  |  |                 <div class="progress" role="progressbar" aria-label="Progression de complétion" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
 | 
					
						
							|  |  |  |                     <div class="progress-bar" style="width: 0%"></div>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							|  |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  | </div>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-05 15:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-05-26 12:57:10 +02:00
										 |  |  | {% endblock %}
 | 
					
						
							| 
									
										
										
										
											2025-06-05 15:09:28 +02:00
										 |  |  |     {% block javascripts %}
 | 
					
						
							|  |  |  |         {{ parent() }}
 | 
					
						
							|  |  |  |         <script src={{asset('js/mapbox/mapbox-gl.js')}}></script>
 | 
					
						
							|  |  |  |         <script>
 | 
					
						
							| 
									
										
										
										
											2025-06-06 11:50:37 +02:00
										 |  |  |             function openInJOSM(type, id) {
 | 
					
						
							|  |  |  |                 const josmUrl = `http://localhost:8111/load_object?objects=${type}${id}`;
 | 
					
						
							|  |  |  |                 window.open(josmUrl, '_blank');
 | 
					
						
							|  |  |  |             }
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             function openInPanoramax() {
 | 
					
						
							|  |  |  |                 const center = map.getCenter();
 | 
					
						
							|  |  |  |                 const zoom = map.getZoom();
 | 
					
						
							|  |  |  |                 const panoramaxUrl = `https://api.panoramax.xyz/?focus=map&map=${zoom}/${center.lat}/${center.lng}`;
 | 
					
						
							|  |  |  |                 window.open(panoramaxUrl, '_blank');
 | 
					
						
							|  |  |  |             }
 | 
					
						
							| 
									
										
										
										
											2025-06-05 15:09:28 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |             {% 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({
 | 
					
						
							|  |  |  |                     container: 'map',
 | 
					
						
							|  |  |  |                     style: 'https://api.maptiler.com/maps/basic-v2/style.json?key={{ maptiler_token }}',
 | 
					
						
							|  |  |  |                     center: [{{ commerce_overpass['@attributes'].lon }}, {{ commerce_overpass['@attributes'].lat }}], 
 | 
					
						
							|  |  |  |                     zoom: 17
 | 
					
						
							|  |  |  |                 }); 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 new mapboxgl.Marker()
 | 
					
						
							|  |  |  |                     .setLngLat([{{ commerce_overpass['@attributes'].lon }}, {{ commerce_overpass['@attributes'].lat }}])
 | 
					
						
							|  |  |  |                     .setPopup(new mapboxgl.Popup({ offset: 25 }).setHTML('<h1>{{ commerce_overpass.tags_converted.name }}</h1>'))
 | 
					
						
							|  |  |  |                     .addTo(map);
 | 
					
						
							|  |  |  |             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         </script> 
 | 
					
						
							|  |  |  |     {% endblock %}
 |