mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
add db and fixtures
This commit is contained in:
parent
03f53f4688
commit
528ebb672a
20 changed files with 1655 additions and 116 deletions
|
@ -18,6 +18,30 @@
|
|||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<header class="main-header">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ path('app_public_index') }}">
|
||||
<h1>OpenStreetMap Mon Commerce</h1>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="body-landing">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<footer class="main-footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p>OpenStreetMap Mon Commerce</p>
|
||||
<p>Licence AGPLv3+, fait par CipherBliss, membre de la fédération des professionels d'OpenStreetMap, Sources des données : <a href="https://www.openstreetmap.org/">OpenStreetMap</a>.
|
||||
<br> <a href="https://www.openstreetmap.org/copyright">OpenStreetMap France</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
72
templates/public/dashboard.html.twig
Normal file
72
templates/public/dashboard.html.twig
Normal file
|
@ -0,0 +1,72 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello PublicController!{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link href='https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css' rel='stylesheet' />
|
||||
<style>
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Dashboard</h1>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<h2>Statistiques : {{ stats|length }} commerces</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zone</th>
|
||||
<th>Nombre de commerces</th>
|
||||
<th>Complétude %</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for stat in stats %}
|
||||
<tr>
|
||||
<td>{{ stat.zone }}</td>
|
||||
<td>{{ stat.placesCount }}</td>
|
||||
<td style="background : rgba(0 , 255, 0, {{stat.completionPercent / 100 }} )">{{ stat.completionPercent }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Lieux</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Email</th>
|
||||
<th>Date de modification</th>
|
||||
<th>Date de dernier contact</th>
|
||||
<th>Date de dernière modification</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for place in places %}
|
||||
<tr>
|
||||
<td>{{ place.name }}</td>
|
||||
<td>{{ place.email }}</td>
|
||||
<td>{{ place.modifiedDate | date('Y-m-d H:i:s') }}</td>
|
||||
<td>{{ place.lastContactAttemptDate | date('Y-m-d H:i:s') }}</td>
|
||||
<td>{{ place.modifiedDate | date('Y-m-d H:i:s') }}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -5,6 +5,11 @@
|
|||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link href='https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css' rel='stylesheet' />
|
||||
<style>
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
@ -57,21 +62,29 @@
|
|||
</label>
|
||||
<br/>
|
||||
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">? Contacter des humains d'OSM France pour m'aider</a>
|
||||
<a class="btn btn-info" href="{{ path('app_public_index') }}">{{ 'display.contact_humans' | trans}}</a>
|
||||
</div>
|
||||
|
||||
<h2>Tags</h2>
|
||||
<fieldset>
|
||||
{% for attributes in commerce.tag %}
|
||||
{% for kv in attributes %}
|
||||
{% if kv.k is 'opening_hours' %}
|
||||
|
||||
{{ 'display.keys.' ~ kv.k |trans}}
|
||||
|
||||
|
||||
{% else %}
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="commerce_tag_key__{{ kv.k }}" value="{{ kv.k }}" readonly>
|
||||
<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>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue