mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
service motocultrice, traductions
This commit is contained in:
parent
528ebb672a
commit
f5ab0c8205
16 changed files with 427 additions and 128 deletions
|
@ -1,6 +1,6 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello PublicController!{% endblock %}
|
||||
{% block title %}{{ 'display.title'|trans }}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
|
@ -24,13 +24,13 @@
|
|||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{{ path('app_public_index') }}">Accueil</a>
|
||||
<a class="nav-link active" href="{{ path('app_public_index') }}">{{ 'display.home'|trans }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ path('app_public_index') }}">Statistiques</a>
|
||||
<a class="nav-link" href="{{ path('app_public_dashboard') }}">{{ 'display.stats'|trans }}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ path('app_public_index') }}">Contacter un humain</a>
|
||||
<a class="nav-link" href="https://openstreetmap.fr/contact/">{{ 'display.contact_humans'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -43,12 +43,10 @@
|
|||
<div class="col-12">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<h1 class="card-title mb-4">Bienvenue dans les commerces!</h1>
|
||||
<div id="map" style="height: 400px; width: 100%;" class="rounded"></div>
|
||||
<h1 class="card-title mb-4">{{ 'display.welcome'|trans }}</h1>
|
||||
<div id="map" style="height: 400px; width: 100%;" class="rounded"></div>
|
||||
|
||||
{% if commerce is not empty %}
|
||||
|
||||
{# {{dump(commerce)}} #}
|
||||
<div class="row mb-4">
|
||||
<div class="col-12">
|
||||
|
||||
|
@ -57,56 +55,55 @@
|
|||
|
||||
<form action="{{ path('app_public_submit', {'osm_object_id': commerce['@attributes'].id, 'version': commerce['@attributes'].version, 'changesetID': commerce['@attributes'].changeset }) }}" method="post" class="needs-validation">
|
||||
<div class="mb-3">
|
||||
<label for="commerce_id" class="form-label">Modifier votre commerce:
|
||||
<label for="commerce_id" class="form-label">{{ 'display.modify_commerce'|trans }}:
|
||||
<strong>{{ commerce.tags_converted.name }}</strong>
|
||||
</label>
|
||||
<br/>
|
||||
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">{{ 'display.contact_humans' | trans}}</a>
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">{{ 'display.contact_humans'|trans }}</a>
|
||||
</div>
|
||||
|
||||
<h2>Tags</h2>
|
||||
<h2>{{ 'display.tags'|trans }}</h2>
|
||||
<fieldset>
|
||||
{% for attributes in commerce.tag %}
|
||||
{% for kv in attributes %}
|
||||
{% if kv.k is 'opening_hours' %}
|
||||
|
||||
{{ 'display.keys.' ~ kv.k |trans}}
|
||||
|
||||
|
||||
{% if kv.k == 'opening_hours' %}
|
||||
{{ 'display.keys.opening_hours'|trans }}
|
||||
{% else %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control hidden" name="commerce_tag_key__{{ kv.k }}" value="{{ kv.k }}" readonly>
|
||||
<span class="label-translated">{{ 'display.keys.' ~ kv.k |trans}}</span>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control hidden" name="commerce_tag_key__{{ kv.k }}" value="{{ kv.k }}" readonly>
|
||||
<span class="label-translated">{{ ('display.keys.' ~ kv.k)|trans }}</span>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__{{ kv.k }}" value="{{ kv.v }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_value__{{ kv.k }}" value="{{ kv.v }}">
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Envoyer</button>
|
||||
<button type="submit" class="btn btn-primary">{{ 'display.submit'|trans }}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="last-modification">Dernière modification: {{ commerce['@attributes'].timestamp }}</span> par <a href="https://www.openstreetmap.org/user/{{ commerce['@attributes'].user }}" target="_blank">{{ commerce['@attributes'].user }}</a>
|
||||
<div class="lien-OpenStreetMap">
|
||||
<a href="https://www.openstreetmap.org/node/{{ commerce['@attributes'].id }}" target="_blank">Voir sur OpenStreetMap</a>
|
||||
</div>
|
||||
<span class="p-3">
|
||||
<span class="last-modification">{{ 'display.last_modification'|trans }}: {{ commerce['@attributes'].timestamp }}</span>,
|
||||
{{ 'display.days_ago'|trans({'%days%': date(commerce['@attributes'].timestamp).diff(date()).days}) }}
|
||||
{{ 'display.by'|trans }}
|
||||
<a href="https://www.openstreetmap.org/user/{{ commerce['@attributes'].user }}" target="_blank">{{ commerce['@attributes'].user }}</a>
|
||||
<div class="lien-OpenStreetMap">
|
||||
<a href="https://www.openstreetmap.org/node/{{ commerce['@attributes'].id }}" target="_blank">{{ 'display.view_on_osm'|trans }}</a>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
<div class="disclaimer p-3">
|
||||
<p>
|
||||
<strong>Attention:</strong>
|
||||
Ce site est un travail en cours, ceci est une démonstration sur un objet fictif qui utilise les données de l'API OpenStreetMap.
|
||||
<strong>{{ 'display.disclaimer.title'|trans }}:</strong>
|
||||
{{ 'display.disclaimer.text'|trans }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,13 +113,10 @@
|
|||
<nav class="bg-light p-3 rounded shadow-sm">
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ path('app_public_index') }}">Accueil</a>
|
||||
<a class="nav-link" href="{{ path('app_public_index') }}">{{ 'display.home'|trans }}</a>
|
||||
</li>
|
||||
{# <li class="nav-item">
|
||||
<a class="nav-link" href="{{ path('app_public_index') }}">Statistiques</a>
|
||||
</li> #}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://openstreetmap.fr/contact/">Contacter un humain</a>
|
||||
<a class="nav-link" href="https://openstreetmap.fr/contact/">{{ 'display.contact_humans'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue