sections en premier comparaison wiki

This commit is contained in:
Tykayn 2025-09-01 15:51:27 +02:00 committed by tykayn
parent f96d94a414
commit b7caf96929

View file

@ -153,7 +153,80 @@
{# suggestions de grammalecte #}
{% if fr_page is defined and fr_page is not null %}
{% if detailed_comparison is defined and detailed_comparison is not null and detailed_comparison.section_comparison is defined and detailed_comparison.section_comparison is not null %}
<div class="card mb-4">
<div class="card-header">
<h2>Comparaison des sections</h2>
</div>
<div class="card-body comparaison-sections">
<div class="row">
<div class="col-md-6">
<div class="card h-100">
<div class="card-header bg-primary text-white">
<h3>Sections en anglais</h3>
<span class="badge bg-light text-dark">
{% if detailed_comparison.adjusted_en_section_count is defined %}
{{ detailed_comparison.adjusted_en_section_count }} sections ({{ en_page.sections|default(0) }} avec "Contents")
{% else %}
{{ en_page.sections|default(0) }} sections
{% endif %}
</span>
</div>
<div class="card-body">
<ul class="list-group mb-3">
{% if detailed_comparison['section_comparison']['en_only'] is defined and detailed_comparison['section_comparison']['en_only'] is iterable %}
{% for section in detailed_comparison['section_comparison']['en_only'] %}
<li class="list-group-item title-level-{{ section.level|default(1) }}">
<span class="badge bg-secondary pull-right">h{{ section.level|default(1) }}</span>
{% if section.title is defined and section.title is not empty %}
{{ section.title }}
{% endif %}
</li>
{% endfor %}
{% endif %}
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card h-100">
<div class="card-header bg-info text-white">
<h3>Sections en français</h3>
<span class="badge bg-light text-dark">
{% if detailed_comparison.adjusted_fr_section_count is defined %}
{{ detailed_comparison.adjusted_fr_section_count }} sections ({{ fr_page.sections|default(0) }} avec "Sommaire")
{% else %}
{{ fr_page.sections|default(0) }} sections
{% endif %}
</span>
</div>
<div class="card-body">
<ul class="list-group mb-3">
{% if detailed_comparison['section_comparison']['fr_only'] is defined and detailed_comparison['section_comparison']['fr_only'] is iterable %}
{% for section in detailed_comparison['section_comparison']['fr_only'] %}
<li class="list-group-item title-level-{{ section.level|default(1) }}">
<span class="badge bg-secondary pull-right">h{{ section.level|default(1) }}</span>
{% if section.title is defined and section.title is not empty %}
{{ section.title }}
{% endif %}
</li>
{% endfor %}
{% endif %}
</ul>
</div>
</div>
</div>
</div>
<div class="text-center mt-3">
{% if detailed_comparison is defined and detailed_comparison is not null and detailed_comparison.section_comparison is defined and detailed_comparison.section_comparison is not null %}
<button class="btn btn-outline-secondary copy-btn" data-content="different-sections">
<i class="bi bi-clipboard"></i> Copier les titres de sections différentes
</button>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if fr_page is defined and fr_page is not null and detailed_comparison['grammar_suggestions'] is defined and detailed_comparison['grammar_suggestions'] is not null and detailed_comparison['grammar_suggestions']|length > 0 %}
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
@ -308,6 +381,8 @@
{% endif %}
{# fin des suggestions de grammalecte #}
{% if fr_page is defined and fr_page is not null and fr_page.categories is defined and (fr_page.categories|length == 0) and en_page is defined and en_page.categories is defined and (en_page.categories|length > 0) %}
<div class="card mb-4">
<div class="card-header bg-warning text-dark">
@ -372,81 +447,6 @@
</div>
{% endif %}
{% if detailed_comparison is defined and detailed_comparison is not null and detailed_comparison.section_comparison is defined and detailed_comparison.section_comparison is not null %}
<div class="card mb-4">
<div class="card-header">
<h2>Comparaison des sections</h2>
</div>
<div class="card-body comparaison-sections">
<div class="row">
<div class="col-md-6">
<div class="card h-100">
<div class="card-header bg-primary text-white">
<h3>Sections en anglais</h3>
<span class="badge bg-light text-dark">
{% if detailed_comparison.adjusted_en_section_count is defined %}
{{ detailed_comparison.adjusted_en_section_count }} sections ({{ en_page.sections|default(0) }} avec "Contents")
{% else %}
{{ en_page.sections|default(0) }} sections
{% endif %}
</span>
</div>
<div class="card-body">
<ul class="list-group mb-3">
{% if detailed_comparison['section_comparison']['en_only'] is defined and detailed_comparison['section_comparison']['en_only'] is iterable %}
{% for section in detailed_comparison['section_comparison']['en_only'] %}
<li class="list-group-item title-level-{{ section.level|default(1) }}">
<span class="badge bg-secondary pull-right">h{{ section.level|default(1) }}</span>
{% if section.title is defined and section.title is not empty %}
{{ section.title }}
{% endif %}
</li>
{% endfor %}
{% endif %}
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card h-100">
<div class="card-header bg-info text-white">
<h3>Sections en français</h3>
<span class="badge bg-light text-dark">
{% if detailed_comparison.adjusted_fr_section_count is defined %}
{{ detailed_comparison.adjusted_fr_section_count }} sections ({{ fr_page.sections|default(0) }} avec "Sommaire")
{% else %}
{{ fr_page.sections|default(0) }} sections
{% endif %}
</span>
</div>
<div class="card-body">
<ul class="list-group mb-3">
{% if detailed_comparison['section_comparison']['fr_only'] is defined and detailed_comparison['section_comparison']['fr_only'] is iterable %}
{% for section in detailed_comparison['section_comparison']['fr_only'] %}
<li class="list-group-item title-level-{{ section.level|default(1) }}">
<span class="badge bg-secondary pull-right">h{{ section.level|default(1) }}</span>
{% if section.title is defined and section.title is not empty %}
{{ section.title }}
{% endif %}
</li>
{% endfor %}
{% endif %}
</ul>
</div>
</div>
</div>
</div>
<div class="text-center mt-3">
{% if detailed_comparison is defined and detailed_comparison is not null and detailed_comparison.section_comparison is defined and detailed_comparison.section_comparison is not null %}
<button class="btn btn-outline-secondary copy-btn" data-content="different-sections">
<i class="bi bi-clipboard"></i> Copier les titres de sections différentes
</button>
{% endif %}
</div>
</div>
</div>
{% endif %}
{% if detailed_comparison and detailed_comparison.media_comparison %}
<div class="card mb-4">
<div class="card-header">