From 1ee9d7dd522c4a464aa188043c5c350472c04d4a Mon Sep 17 00:00:00 2001 From: David Larlet Date: Tue, 6 Feb 2024 12:45:40 -0500 Subject: [PATCH] feat: allow to inject a header.html template Useful to add scripts integration like Sentry --- umap/templates/base.html | 1 + umap/templates/registration/login.html | 1 + umap/templates/umap/content.html | 1 + umap/templates/umap/header.html | 0 umap/templates/umap/map_detail.html | 1 + 5 files changed, 4 insertions(+) create mode 100644 umap/templates/umap/header.html diff --git a/umap/templates/base.html b/umap/templates/base.html index 50e83fac..35be9099 100644 --- a/umap/templates/base.html +++ b/umap/templates/base.html @@ -12,6 +12,7 @@ content="{% trans "uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site." %}"> {% block extra_head %} + {% include "umap/header.html" %} {% endblock extra_head %} diff --git a/umap/templates/registration/login.html b/umap/templates/registration/login.html index d88bffe6..a5b850b8 100644 --- a/umap/templates/registration/login.html +++ b/umap/templates/registration/login.html @@ -2,6 +2,7 @@ {% load umap_tags i18n %} {% block extra_head %} {% umap_css %} + {{ block.super }} {% endblock extra_head %} {% block body_class %} login diff --git a/umap/templates/umap/content.html b/umap/templates/umap/content.html index ecabe18c..bf414571 100644 --- a/umap/templates/umap/content.html +++ b/umap/templates/umap/content.html @@ -5,6 +5,7 @@ {% endblock body_class %} {% block extra_head %} {% umap_css %} + {{ block.super }} {% umap_js %} {% endblock extra_head %} {% block header %} diff --git a/umap/templates/umap/header.html b/umap/templates/umap/header.html new file mode 100644 index 00000000..e69de29b diff --git a/umap/templates/umap/map_detail.html b/umap/templates/umap/map_detail.html index 7685e584..22f272c5 100644 --- a/umap/templates/umap/map_detail.html +++ b/umap/templates/umap/map_detail.html @@ -13,6 +13,7 @@ {% endfor %} {% endif %} {% umap_css %} + {{ block.super }} {% umap_js locale=locale %} {% if object.share_status != object.PUBLIC %}{% endif %}