Add configurable report language
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<html lang="{{ html_lang }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ title }}</title>
|
||||
<style>{{ css|safe }}</style>
|
||||
<style>
|
||||
@page {
|
||||
@top-left {
|
||||
content: "{{ title }}";
|
||||
}
|
||||
@bottom-left {
|
||||
border-top: 0.5pt solid #dce6f1;
|
||||
color: #5b6770;
|
||||
content: "Document automatique de suivi et d'audit";
|
||||
content: "{{ footer_document }}";
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 7.5pt;
|
||||
padding-top: 1.5mm;
|
||||
@@ -26,7 +29,7 @@
|
||||
@bottom-right {
|
||||
border-top: 0.5pt solid #dce6f1;
|
||||
color: #5b6770;
|
||||
content: "Version : {{ version }}";
|
||||
content: "{{ version_label }} : {{ version }}";
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 7.5pt;
|
||||
padding-top: 1.5mm;
|
||||
@@ -52,12 +55,12 @@
|
||||
{# ── Cell status class macro ─────────────────────────────────────── #}
|
||||
{%- macro cell_class(cell) -%}
|
||||
{%- set s = cell|string -%}
|
||||
{%- if s == "Active" or s == "Active sur PVE" -%}status-active
|
||||
{%- elif s == "Non-active" or s == "Non-active sur PVE" -%}status-inactive
|
||||
{%- elif s.startswith("Succes") -%}status-success
|
||||
{%- elif s.startswith("Echec") -%}status-error
|
||||
{%- elif s.startswith("Indetermine") -%}status-indeterminate
|
||||
{%- elif s == "non renseigne" -%}muted
|
||||
{%- if s == "Active" or s == "Active sur PVE" or s == "Active on PVE" -%}status-active
|
||||
{%- elif s == "Non-active" or s == "Inactive" or s == "Non-active sur PVE" or s == "Not active on PVE" -%}status-inactive
|
||||
{%- elif s.startswith("Succes") or s.startswith("Success") -%}status-success
|
||||
{%- elif s.startswith("Echec") or s.startswith("Failure") -%}status-error
|
||||
{%- elif s.startswith("Indetermine") or s.startswith("Undetermined") -%}status-indeterminate
|
||||
{%- elif s == "non renseigne" or s == "not specified" -%}muted
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
@@ -87,18 +90,18 @@
|
||||
<div class="cover-spacer"></div>
|
||||
<div class="cover-meta-bar">
|
||||
<div class="cover-meta-item">
|
||||
<span class="cover-meta-label">Génération</span>
|
||||
<span class="cover-meta-label">{{ generation_label }}</span>
|
||||
<span class="cover-meta-value">{{ generated_at }}</span>
|
||||
</div>
|
||||
<div class="cover-meta-item">
|
||||
<span class="cover-meta-label">Version</span>
|
||||
<span class="cover-meta-label">{{ version_label }}</span>
|
||||
<span class="cover-meta-value">{{ version }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<nav class="toc">
|
||||
<h2>Table des matieres</h2>
|
||||
<h2>{{ toc_label }}</h2>
|
||||
<ol>
|
||||
{% for section in sections %}
|
||||
<li class="toc-item toc-l{{ section.level }}">
|
||||
@@ -126,7 +129,6 @@
|
||||
<p class="warning">{{ section.warning }}</p>
|
||||
{% endif %}
|
||||
{% if section.section_id == "resume" and section.rows %}
|
||||
{%- set alert_labels = ["Non sauvegardees", "Anomalies"] -%}
|
||||
<div class="kpi-grid">
|
||||
{% for row in section.rows %}
|
||||
{%- set is_alert = row[0] in alert_labels and row[1]|int > 0 -%}
|
||||
|
||||
Reference in New Issue
Block a user