From 432e7695b3e6a4dba7cf54fb2bfa1170d50f1676 Mon Sep 17 00:00:00 2001 From: ZdenekSrotyr Date: Tue, 21 Apr 2026 20:51:55 +0200 Subject: [PATCH] feat(ui): version badge as shared partial, injected into every full-page template The earlier base.html edit only affected templates that extend base.html (login.html via base_login.html). Most pages (dashboard, catalog, admin_tables, admin_permissions, activity_center, corporate_memory, ...) are standalone templates with their own , so the badge never showed. Fix: extracted the badge + fetch script into _version_badge.html partial, included it before in every full-page template. Consistent across login, dashboard, admin, catalog, etc. --- app/web/templates/_version_badge.html | 26 +++++++++++++++++++ app/web/templates/activity_center.html | 1 + app/web/templates/admin_permissions.html | 4 +-- app/web/templates/admin_tables.html | 4 +-- app/web/templates/base.html | 25 +----------------- app/web/templates/base_login.html | 1 + app/web/templates/catalog.html | 4 +-- app/web/templates/corporate_memory.html | 1 + app/web/templates/corporate_memory_admin.html | 1 + app/web/templates/dashboard.html | 4 +-- 10 files changed, 39 insertions(+), 32 deletions(-) create mode 100644 app/web/templates/_version_badge.html diff --git a/app/web/templates/_version_badge.html b/app/web/templates/_version_badge.html new file mode 100644 index 0000000..ff330b3 --- /dev/null +++ b/app/web/templates/_version_badge.html @@ -0,0 +1,26 @@ +
+ Loading… +
+ diff --git a/app/web/templates/activity_center.html b/app/web/templates/activity_center.html index 72425d7..f0a2c25 100644 --- a/app/web/templates/activity_center.html +++ b/app/web/templates/activity_center.html @@ -2567,5 +2567,6 @@ // Expose mermaid globally for lazy rendering window.mermaid = mermaid; + {% include "_version_badge.html" %} diff --git a/app/web/templates/admin_permissions.html b/app/web/templates/admin_permissions.html index 1832d4f..9ebb119 100644 --- a/app/web/templates/admin_permissions.html +++ b/app/web/templates/admin_permissions.html @@ -860,8 +860,7 @@ - + + {% include "_version_badge.html" %} diff --git a/app/web/templates/admin_tables.html b/app/web/templates/admin_tables.html index d82603f..97f19c2 100644 --- a/app/web/templates/admin_tables.html +++ b/app/web/templates/admin_tables.html @@ -941,8 +941,7 @@ - + + {% include "_version_badge.html" %} diff --git a/app/web/templates/base.html b/app/web/templates/base.html index 6fce72f..f6962c9 100644 --- a/app/web/templates/base.html +++ b/app/web/templates/base.html @@ -46,31 +46,8 @@ - + {% include "_version_badge.html" %} diff --git a/app/web/templates/base_login.html b/app/web/templates/base_login.html index 7946638..4775469 100644 --- a/app/web/templates/base_login.html +++ b/app/web/templates/base_login.html @@ -22,5 +22,6 @@ {% endwith %} {% block content %}{% endblock %} + {% include "_version_badge.html" %} diff --git a/app/web/templates/catalog.html b/app/web/templates/catalog.html index ce6d888..894abac 100644 --- a/app/web/templates/catalog.html +++ b/app/web/templates/catalog.html @@ -1748,8 +1748,7 @@ - + + {% include "_version_badge.html" %} diff --git a/app/web/templates/corporate_memory.html b/app/web/templates/corporate_memory.html index e534194..f91cc33 100644 --- a/app/web/templates/corporate_memory.html +++ b/app/web/templates/corporate_memory.html @@ -861,5 +861,6 @@ return div.innerHTML; } + {% include "_version_badge.html" %} diff --git a/app/web/templates/corporate_memory_admin.html b/app/web/templates/corporate_memory_admin.html index ef9673d..d8b0a28 100644 --- a/app/web/templates/corporate_memory_admin.html +++ b/app/web/templates/corporate_memory_admin.html @@ -1552,5 +1552,6 @@ loadReviewQueue(0); + {% include "_version_badge.html" %} diff --git a/app/web/templates/dashboard.html b/app/web/templates/dashboard.html index 0cf17b7..bbb0190 100644 --- a/app/web/templates/dashboard.html +++ b/app/web/templates/dashboard.html @@ -2378,8 +2378,7 @@ - + + {% include "_version_badge.html" %}