osm-commerces/templates/admin/labourage_results.html.twig

88 lines
2 KiB
Twig
Raw Normal View History

{% extends 'base.html.twig' %}
{% block title %}Hello AdminController!{% endblock %}
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Labourage fait sur la zone "{{ zone }}" ✅</h1>
<p>
lieux trouvés en plus: {{ results|length }}
</p>
{# {{ dump(results) }} #}
<hr>
<p>
commerces existants disposant d'un moyen de contact mail: {{ commerces|length }}
</p>
{# {{ dump(commerces[0]) }} #}
<table class="table table-striped">
<thead>
<tr>
<th>Nom</th>
<th>Adresse</th>
<th>Email</th>
<th>Site web</th>
<th>Horaires</th>
<th>Note</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for commerce in commerces %}
<tr>
<td>
{# {{ dump(commerce) }} #}
<a href="{{ path('app_admin_commerce',
{
'id': commerce.id
}
) }}">
{% if commerce.name is not null and commerce.name != '' %}
{{ commerce.name }},
{% else %}
(un lieu sans nom)
{% endif %}
</a>
</td>
<td>
{{ commerce.address }}
</td>
<td>
{{ commerce.email }}
</td>
<td>
{{ commerce.website }}
</td>
<td>
{# {{ commerce.opening_hours }} #}
</td>
<td>
{{ commerce.note }}
</td>
<td>
<a href="https://www.openstreetmap.org/{{ commerce.getOsmKind() }}/{{ commerce.getOsmId() }}" target="_blank">
<i class="bi bi-eye"></i>
voir sur osm</a>
<a href="{{ path('app_admin_delete', {'id': commerce.id}) }}">
<i class="bi bi-trash"></i>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}