Commit 2a496e39 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Move recommandations block before structure errors

parent c561e788
...@@ -75,6 +75,16 @@ ...@@ -75,6 +75,16 @@
({{ report.table.col_count }} colonnes × {{ report.table.row_count }} lignes) ({{ report.table.col_count }} colonnes × {{ report.table.row_count }} lignes)
</p> </p>
{% if report.warn_count != 0 %}
<p>
{% if report.warn_count == 1 %}
1 recommandation
{% else %}
{{ report.warn_count }} recommandations
{% endif %}
</p>
{% endif %}
{% if report.error_count == 0 %} {% if report.error_count == 0 %}
<p>Aucune erreur détectée</p> <p>Aucune erreur détectée</p>
{% else %} {% else %}
...@@ -89,42 +99,38 @@ ...@@ -89,42 +99,38 @@
{% endif %} {% endif %}
</p> </p>
{% endif %} {% endif %}
{% if report.warn_count != 0 %}
<p>
{% if report.warn_count == 1 %}
1 recommandation
{% else %}
{{ report.warn_count }} recommandations
{% endif %}
</p>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% if report.warn_count != 0 %}
<div class="mx-4">
<h3 class="my-4">Recommandations</h3>
<ul>
{% for warn in report.warnings %}
<li>{{ warn.message | commonmark2html | safe}}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if report.table.errors.structure %}
<div class="mx-4"> <div class="mx-4">
{% if report.table.errors.structure %}
<h3 class="my-4">Erreurs de structure ({{ report.table['error-stats']['structure-errors']['count']}})</h3> <h3 class="my-4">Erreurs de structure ({{ report.table['error-stats']['structure-errors']['count']}})</h3>
<ul> <ul>
{% for err in report.table.errors.structure %} {% for err in report.table.errors.structure %}
<li>{{ err.message | commonmark2html | safe}}</li> <li>{{ err.message | commonmark2html | safe}}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %}
</div> </div>
{% endif %}
{# Display body errors #} {# Display body errors #}
<div class="mx-4"> <div class="mx-4">
{% if report.warn_count != 0 %}
<h3 class="my-4">Recommandations</h3>
<ul>
{% for warn in report.warnings %}
<li>{{ warn.message | commonmark2html | safe}}</li>
{% endfor %}
</ul>
{% endif %}
<h3 class="my-4"> <h3 class="my-4">
{% if report.table.errors.body %} {% if report.table.errors.body %}
{% set value_errors = report.table['error-stats']['body-errors'] %} {% set value_errors = report.table['error-stats']['body-errors'] %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment