From 7b335244b7da5c7bb299794b1482f10f55c8d501 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 11 Jul 2018 11:33:43 +0200 Subject: [PATCH] general: move tracking code in separate template (#25193) Update hautes-alpes-2018 main theme template --- templates/includes/tracking.html | 16 ++++++++++++++++ templates/theme.html | 15 +-------------- .../variants/hautes-alpes-2018/theme.html | 19 +++---------------- 3 files changed, 20 insertions(+), 30 deletions(-) create mode 100644 templates/includes/tracking.html diff --git a/templates/includes/tracking.html b/templates/includes/tracking.html new file mode 100644 index 00000000..35b9a5e8 --- /dev/null +++ b/templates/includes/tracking.html @@ -0,0 +1,16 @@ +{% load static %} + +{% if cnil_compliant_visits_tracking_js %} + + {% elif visits_tracking_js %} + + +{% endif %} diff --git a/templates/theme.html b/templates/theme.html index feddfd34..da9a1b86 100644 --- a/templates/theme.html +++ b/templates/theme.html @@ -138,19 +138,6 @@ {% if environment_label %}{{ environment_label }}{% endif %} Retour en haut de page - {% if cnil_compliant_visits_tracking_js %} - - {% elif visits_tracking_js %} - - - {% endif %} + {% include "includes/tracking.html" %} diff --git a/templates/variants/hautes-alpes-2018/theme.html b/templates/variants/hautes-alpes-2018/theme.html index 3a3f1cb0..31844886 100644 --- a/templates/variants/hautes-alpes-2018/theme.html +++ b/templates/variants/hautes-alpes-2018/theme.html @@ -73,20 +73,7 @@ {% endblock %} {% block local-body-bottom %} -{% if environment_label %}{{ environment_label }}{% endif %} -Retour en haut de page -{% if cnil_compliant_visits_tracking_js %} - -{% elif visits_tracking_js %} - - -{% endif %} + {% if environment_label %}{{ environment_label }}{% endif %} + Retour en haut de page + {% include "includes/tracking.html" %} {% endblock %} -- 2.18.0