menu latéral ville
This commit is contained in:
parent
f4c5e048ff
commit
2e459122b5
11 changed files with 1008 additions and 236 deletions
33
templates/public/rss/city_demandes.xml.twig
Normal file
33
templates/public/rss/city_demandes.xml.twig
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Mon Commerce OSM - Demandes pour {{ city.name }}</title>
|
||||
<link>https://{{ base_url }}</link>
|
||||
<description>Flux RSS des demandes de modification de commerces sur OpenStreetMap pour la ville de {{ city.name }}</description>
|
||||
<language>fr-fr</language>
|
||||
<pubDate>{{ "now"|date("D, d M Y H:i:s O") }}</pubDate>
|
||||
<atom:link href="https://{{ base_url }}{{ path('app_public_rss_city_demandes', {'insee_code': city.zone}) }}" rel="self" type="application/rss+xml" />
|
||||
|
||||
{% for demande in demandes %}
|
||||
<item>
|
||||
<title>{{ demande.query }}</title>
|
||||
<link>https://{{ base_url }}{{ path('app_admin_demande_edit', {'id': demande.id}) }}</link>
|
||||
<guid>https://{{ base_url }}{{ path('app_admin_demande_edit', {'id': demande.id}) }}</guid>
|
||||
<pubDate>{{ demande.createdAt|date("D, d M Y H:i:s O") }}</pubDate>
|
||||
<description>
|
||||
<![CDATA[
|
||||
<p><strong>Nom du commerce:</strong> {{ demande.query }}</p>
|
||||
{% if demande.email %}
|
||||
<p><strong>Email:</strong> {{ demande.email }}</p>
|
||||
{% endif %}
|
||||
<p><strong>Statut:</strong> {{ demande.status }}</p>
|
||||
<p><strong>Ville:</strong> {{ city.name }} ({{ city.zone }})</p>
|
||||
{% if demande.lastContactAttempt %}
|
||||
<p><strong>Dernière tentative de contact:</strong> {{ demande.lastContactAttempt|date("d/m/Y H:i:s") }}</p>
|
||||
{% endif %}
|
||||
]]>
|
||||
</description>
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
45
templates/public/rss/city_themes.xml.twig
Normal file
45
templates/public/rss/city_themes.xml.twig
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Mon Commerce OSM - Changements thématiques pour {{ city.name }}</title>
|
||||
<link>https://{{ base_url }}</link>
|
||||
<description>Flux RSS des changements thématiques sur OpenStreetMap pour la ville de {{ city.name }}</description>
|
||||
<language>fr-fr</language>
|
||||
<pubDate>{{ "now"|date("D, d M Y H:i:s O") }}</pubDate>
|
||||
<atom:link href="https://{{ base_url }}{{ path('app_public_rss_city_themes', {'insee_code': city.zone}) }}" rel="self" type="application/rss+xml" />
|
||||
|
||||
{% for theme, changes in themeChanges %}
|
||||
{% if changes|length > 0 %}
|
||||
{% set latestChange = changes[0] %}
|
||||
<item>
|
||||
<title>{{ followup_labels[theme]|default(theme|capitalize) }} - {{ latestChange.measure }} objets</title>
|
||||
<link>https://{{ base_url }}{{ path('admin_followup_theme_graph', {'insee_code': city.zone, 'theme': theme}) }}</link>
|
||||
<guid>https://{{ base_url }}{{ path('admin_followup_theme_graph', {'insee_code': city.zone, 'theme': theme}) }}/{{ latestChange.date|date('Y-m-d') }}</guid>
|
||||
<pubDate>{{ latestChange.date|date("D, d M Y H:i:s O") }}</pubDate>
|
||||
<description>
|
||||
<![CDATA[
|
||||
<p><strong>Thème:</strong> {{ followup_labels[theme]|default(theme|capitalize) }}</p>
|
||||
<p><strong>Nombre d'objets:</strong> {{ latestChange.measure }}</p>
|
||||
<p><strong>Date de mesure:</strong> {{ latestChange.date|date("d/m/Y H:i:s") }}</p>
|
||||
<p><strong>Ville:</strong> {{ city.name }} ({{ city.zone }})</p>
|
||||
{% if changes|length > 1 %}
|
||||
<p><strong>Évolution:</strong>
|
||||
{% set previousChange = changes[1] %}
|
||||
{% set diff = latestChange.measure - previousChange.measure %}
|
||||
{% if diff > 0 %}
|
||||
<span style="color: green;">+{{ diff }} objets</span>
|
||||
{% elseif diff < 0 %}
|
||||
<span style="color: red;">{{ diff }} objets</span>
|
||||
{% else %}
|
||||
<span>Pas de changement</span>
|
||||
{% endif %}
|
||||
depuis le {{ previousChange.date|date("d/m/Y") }}
|
||||
</p>
|
||||
{% endif %}
|
||||
]]>
|
||||
</description>
|
||||
</item>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
Loading…
Add table
Add a link
Reference in a new issue