up pages
This commit is contained in:
parent
dffb21b56e
commit
1ed74c2e2f
9 changed files with 1610 additions and 305 deletions
|
@ -293,20 +293,20 @@
|
|||
<tr>
|
||||
<td>
|
||||
<div class="d-flex align-items-center">
|
||||
{% if page.en_page.description_img_url is defined and page.en_page.description_img_url %}
|
||||
{% if page.en_page is defined and page.en_page.description_img_url is defined and page.en_page.description_img_url %}
|
||||
<div class="me-3">
|
||||
<img src="{{ page.en_page.description_img_url }}"
|
||||
alt="{{ page.key }}"
|
||||
alt="{{ page.title }}"
|
||||
style="max-width: 80px; max-height: 60px; object-fit: contain;">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<strong>{{ page.key }}</strong>
|
||||
<strong>{{ page.title }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ page.reason }}
|
||||
{# {{ page.reason }}#}
|
||||
</td>
|
||||
<td>
|
||||
{% if page.staleness_score is defined %}
|
||||
|
@ -326,26 +326,54 @@
|
|||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{{ page.en_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-primary" title="Version anglaise">
|
||||
<i class="bi bi-translate"></i> EN
|
||||
</a>
|
||||
{% if page.fr_page %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
{% if page.en_page is defined and page.en_page.url is defined %}
|
||||
<a href="{{ page.en_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-primary" title="Version anglaise">
|
||||
<i class="bi bi-translate"></i> EN
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
{% if page.fr_page.url is defined %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-plus-circle"></i> Clé manquante
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -79,8 +79,10 @@ python3 wiki_compare.py</code></pre>
|
|||
<tbody>
|
||||
{% for page in regular_pages|slice(0, 20) %}
|
||||
<tr>
|
||||
<td><strong>{{ page.key }}</strong></td>
|
||||
<td>{{ page.reason }}</td>
|
||||
<td><strong>{{ page.title }}</strong></td>
|
||||
<td>
|
||||
{# {{ page.reason }}#}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if page.word_diff > 0 %}
|
||||
<span class="badge bg-danger">{{ page.word_diff }}</span>
|
||||
|
@ -126,22 +128,52 @@ python3 wiki_compare.py</code></pre>
|
|||
class="btn btn-sm btn-outline-primary" title="Version anglaise">
|
||||
<i class="bi bi-translate"></i> EN
|
||||
</a>
|
||||
{% if page.fr_page %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
{% if page.fr_page.url is defined %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-translate"></i> FR (URL manquante)
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-plus-circle"></i> Clé manquante
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
|
@ -178,17 +210,17 @@ python3 wiki_compare.py</code></pre>
|
|||
{% if page.en_page.description_img_url is defined and page.en_page.description_img_url %}
|
||||
<div class="me-3">
|
||||
<img src="{{ page.en_page.description_img_url }}"
|
||||
alt="{{ page.key }}"
|
||||
alt="{% if page.key is defined %}{{ page.key }}{% elseif page.title is defined %}{{ page.title }}{% else %}Image{% endif %}"
|
||||
style="max-width: 80px; max-height: 60px; object-fit: contain;">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<strong>{{ page.key }}</strong>
|
||||
<strong>{{ page.title }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ page.reason }}
|
||||
{# {{ page.reason }}#}
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress" style="height: 20px;">
|
||||
|
@ -208,22 +240,52 @@ python3 wiki_compare.py</code></pre>
|
|||
class="btn btn-sm btn-outline-primary" title="Version anglaise">
|
||||
<i class="bi bi-translate"></i> EN
|
||||
</a>
|
||||
{% if page.fr_page %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
{% if page.fr_page.url is defined %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-translate"></i> FR (URL manquante)
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-plus-circle"></i> Clé manquante
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
|
@ -251,7 +313,13 @@ python3 wiki_compare.py</code></pre>
|
|||
const colors = [];
|
||||
|
||||
{% for page in regular_pages|slice(0, 20) %}
|
||||
labels.push("{{ page.key }}");
|
||||
{% if page.key is defined %}
|
||||
labels.push("{{ page.key }}");
|
||||
{% elseif page.title is defined %}
|
||||
labels.push("{{ page.title }}");
|
||||
{% else %}
|
||||
labels.push("Page sans clé");
|
||||
{% endif %}
|
||||
scores.push({{ page.staleness_score }});
|
||||
|
||||
// Set color based on score
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h2>{{ page.key }}</h2>
|
||||
<h2>{% if page.key is defined %}{{ page.key }}{% elseif page.title is defined %}{{ page.title }}{% else %}Page sans clé{% endif %}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info">
|
||||
<h3>Raisons d'amélioration</h3>
|
||||
<p>{{ page.reason }}</p>
|
||||
{# <p>{{ page.reason }}</p>#}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@ -55,9 +55,9 @@
|
|||
<div class="card h-100">
|
||||
<div class="card-header bg-info text-white">
|
||||
<h3>Version française</h3>
|
||||
{% if page.fr_page %}
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
<p class="mb-0">
|
||||
<small>Dernière modification: {{ page.fr_page.last_modified }}</small>
|
||||
<small>Dernière modification: {{ page.fr_page.last_modified is defined ? page.fr_page.last_modified : 'Non disponible' }}</small>
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="mb-0">
|
||||
|
@ -66,11 +66,11 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if page.fr_page %}
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
<ul class="list-group mb-3">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
Sections
|
||||
<span class="badge bg-info rounded-pill">{{ page.fr_page.sections }}</span>
|
||||
<span class="badge bg-info rounded-pill">{{ page.fr_page.sections is defined ? page.fr_page.sections : 0 }}</span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
Mots
|
||||
|
@ -82,21 +82,38 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div class="d-grid gap-2">
|
||||
<a href="{{ page.fr_page.url }}" target="_blank" class="btn btn-outline-info">
|
||||
<i class="bi bi-box-arrow-up-right"></i> Voir la page française
|
||||
</a>
|
||||
{% if page.fr_page.url is defined %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank" class="btn btn-outline-info">
|
||||
<i class="bi bi-box-arrow-up-right"></i> Voir la page française
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-outline-secondary" disabled>
|
||||
<i class="bi bi-box-arrow-up-right"></i> URL non disponible
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
<p><i class="bi bi-exclamation-triangle"></i> <strong>La page wiki pour la clé
|
||||
"{{ page.key }}" n'existe pas en français.</strong></p>
|
||||
"{% if page.key is defined %}{{ page.key }}{% elseif page.title is defined %}{{ page.title }}{% else %}Page sans clé{% endif %}" n'existe pas en français.</strong></p>
|
||||
<p>Vous pouvez contribuer en créant cette page sur le wiki OpenStreetMap.</p>
|
||||
</div>
|
||||
<div class="d-grid gap-2">
|
||||
<a href="https://wiki.openstreetmap.org/w/index.php?title=FR:{{ page.key }}&action=edit"
|
||||
target="_blank" class="btn btn-success">
|
||||
<i class="bi bi-plus-circle"></i> Créer la page française
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="https://wiki.openstreetmap.org/w/index.php?title=FR:{{ page.key }}&action=edit"
|
||||
target="_blank" class="btn btn-success">
|
||||
<i class="bi bi-plus-circle"></i> Créer la page française
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="https://wiki.openstreetmap.org/w/index.php?title=FR:{{ page.title }}&action=edit"
|
||||
target="_blank" class="btn btn-success">
|
||||
<i class="bi bi-plus-circle"></i> Créer la page française
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-outline-secondary" disabled>
|
||||
<i class="bi bi-plus-circle"></i> Clé manquante
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -105,9 +122,19 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-4 d-grid gap-2">
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}" class="btn btn-primary">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Voir la comparaison détaillée
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}" class="btn btn-primary">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Voir la comparaison détaillée
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.title}) }}" class="btn btn-primary">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Voir la comparaison détaillée
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-outline-secondary" disabled>
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparaison non disponible
|
||||
</button>
|
||||
{% endif %}
|
||||
<a href="{{ path('app_admin_wiki_random_suggestion') }}" class="btn btn-secondary">
|
||||
<i class="bi bi-shuffle"></i> Autre suggestion aléatoire
|
||||
</a>
|
||||
|
|
|
@ -206,18 +206,18 @@
|
|||
{% if page.en_page.description_img_url is defined and page.en_page.description_img_url %}
|
||||
<div class="me-3">
|
||||
<img src="{{ page.en_page.description_img_url }}"
|
||||
alt="{{ page.key }}"
|
||||
alt="{% if page.key is defined %}{{ page.key }}{% elseif page.title is defined %}{{ page.title }}{% else %}Image{% endif %}"
|
||||
style="max-width: 80px; max-height: 60px; object-fit: contain;">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<strong>{{ page.key }}</strong>
|
||||
<strong>{{ page.title }}</strong>
|
||||
<span class="badge bg-primary">Spécifique</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ page.reason }}
|
||||
{# {{ page.reason }}#}
|
||||
</td>
|
||||
<td>
|
||||
{% if page.staleness_score is defined %}
|
||||
|
@ -241,22 +241,52 @@
|
|||
class="btn btn-sm btn-outline-primary" title="Version anglaise">
|
||||
<i class="bi bi-translate"></i> EN
|
||||
</a>
|
||||
{% if page.fr_page %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
{% if page.fr_page.url is defined %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank"
|
||||
class="btn btn-sm btn-outline-info" title="Version française">
|
||||
<i class="bi bi-translate"></i> FR
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-translate"></i> FR (URL manquante)
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_compare', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-outline-secondary"
|
||||
title="Comparer les versions">
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-arrows-angle-expand"></i> Comparer
|
||||
</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.key}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="{{ path('app_admin_wiki_create_french', {'key': page.title}) }}"
|
||||
class="btn btn-sm btn-success"
|
||||
title="Créer une traduction française">
|
||||
<i class="bi bi-plus-circle"></i> Traduire
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-plus-circle"></i> Clé manquante
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
@ -325,11 +355,19 @@
|
|||
<i class="bi bi-flag-fill"></i> FR
|
||||
</a>
|
||||
{% set en_url = page.url|replace({'FR:': ''}) %}
|
||||
<a href="https://wiki.openstreetmap.org/w/index.php?title={{ page.key }}&action=edit" target="_blank" class="btn btn-sm btn-outline-primary" title="Créer la version anglaise">
|
||||
|
||||
title="Créer une traduction anglaise">
|
||||
<i class="bi bi-translate"></i> créer EN
|
||||
</a>
|
||||
{% if page.key is defined %}
|
||||
<a href="https://wiki.openstreetmap.org/w/index.php?title={{ page.key }}&action=edit" target="_blank" class="btn btn-sm btn-outline-primary" title="Créer une traduction anglaise">
|
||||
<i class="bi bi-translate"></i> créer EN
|
||||
</a>
|
||||
{% elseif page.title is defined %}
|
||||
<a href="https://wiki.openstreetmap.org/w/index.php?title={{ page.title }}&action=edit" target="_blank" class="btn btn-sm btn-outline-primary" title="Créer une traduction anglaise">
|
||||
<i class="bi bi-translate"></i> créer EN
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-sm btn-outline-secondary" disabled>
|
||||
<i class="bi bi-translate"></i> Clé manquante
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="card-body">
|
||||
<div class="alert alert-info">
|
||||
<h3>Raisons d'amélioration</h3>
|
||||
<p>{{ page.reason }}</p>
|
||||
{# <p>{{ page.reason }}</p>#}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@ -55,9 +55,9 @@
|
|||
<div class="card h-100">
|
||||
<div class="card-header bg-info text-white">
|
||||
<h3>Version française</h3>
|
||||
{% if page.fr_page %}
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
<p class="mb-0">
|
||||
<small>Dernière modification: {{ page.fr_page.last_modified }}</small>
|
||||
<small>Dernière modification: {{ page.fr_page.last_modified is defined ? page.fr_page.last_modified : 'Non disponible' }}</small>
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="mb-0">
|
||||
|
@ -66,11 +66,11 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if page.fr_page %}
|
||||
{% if page.fr_page is defined and page.fr_page %}
|
||||
<ul class="list-group mb-3">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
Sections
|
||||
<span class="badge bg-info rounded-pill">{{ page.fr_page.sections }}</span>
|
||||
<span class="badge bg-info rounded-pill">{{ page.fr_page.sections is defined ? page.fr_page.sections : 0 }}</span>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
Mots
|
||||
|
@ -82,9 +82,15 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div class="d-grid gap-2">
|
||||
<a href="{{ page.fr_page.url }}" target="_blank" class="btn btn-outline-info">
|
||||
<i class="bi bi-box-arrow-up-right"></i> Voir la page française
|
||||
</a>
|
||||
{% if page.fr_page.url is defined %}
|
||||
<a href="{{ page.fr_page.url }}" target="_blank" class="btn btn-outline-info">
|
||||
<i class="bi bi-box-arrow-up-right"></i> Voir la page française
|
||||
</a>
|
||||
{% else %}
|
||||
<button class="btn btn-outline-secondary" disabled>
|
||||
<i class="bi bi-box-arrow-up-right"></i> URL non disponible
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue