From ab8307b272a9fc4bff75ea670d31ffd4c852bd84 Mon Sep 17 00:00:00 2001 From: mrtoine Date: Mon, 15 Dec 2025 23:02:43 +0100 Subject: [PATCH] Ajout du template `stats_dashboard.html` pour afficher le tableau de bord des statistiques, avec styles, graphiques `Chart.js`, tableaux dynamiques et gestion du contexte. --- templates/home/stats_dashboard.html | 135 ++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 templates/home/stats_dashboard.html diff --git a/templates/home/stats_dashboard.html b/templates/home/stats_dashboard.html new file mode 100644 index 0000000..e5daaed --- /dev/null +++ b/templates/home/stats_dashboard.html @@ -0,0 +1,135 @@ +{% extends "layout.html" %} +{% load static %} + +{% block title %}- Tableau de bord{% endblock %} + +{% block extra_head %} + + +{% endblock %} + +{% block content %} +
+

Tableau de bord statistiques

+ +
+
+ + + Du {{ start_date }} au {{ end_date }} +
+
Mise en cache 15 minutes
+
+ +
+
+

Utilisateurs (total)

+
{{ kpi.total_users }}
+
+
+

Nouveaux utilisateurs (période)

+
{{ kpi.new_users_period }}
+
+
+

Utilisateurs actifs (période)

+
{{ kpi.active_users_period }}
+
+
+

Cours (publiés / total)

+
{{ kpi.courses_enabled }} / {{ kpi.total_courses }}
+
+
+

Leçons (total)

+
{{ kpi.total_lessons }}
+
+
+

Articles de blog (total)

+
{{ kpi.total_posts }}
+
+
+

Revenus

+ {% if revenus_disponibles %} +
+ {% else %} +
N/A
+ {% endif %} +
+
+

Technique

+ {% if technique_disponible %} +
+ {% else %} +
N/A
+ {% endif %} +
+
+ +
+
+

Évolution quotidienne

+ +
+
+ +
+
+

Nouveaux utilisateurs par jour

+ + + + {% for row in new_users_table %} + + {% endfor %} + +
JourNb
{{ row.0 }}{{ row.1 }}
+
+
+

Nouveaux cours par jour

+ + + + {% for row in new_courses_table %} + + {% endfor %} + +
JourNb
{{ row.0 }}{{ row.1 }}
+
+
+
+ + +{% endblock %}