From 6f7861073c1694714990b28d6db23b37d4de2e26 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 28 Jan 2022 10:30:39 +0100 Subject: [PATCH] misc: use contextual variables for all user-info links (#61191) It uses the new variables from the new hobo's user_urls context processor, introduced in #61192. --- templates/includes/user-info.html | 10 +++++----- templates/portal-agent/combo/page_template.html | 2 +- templates/variants/arles-2020/authentic2/accounts.html | 2 +- .../variants/bouches-du-rhone/authentic2/accounts.html | 2 +- .../variants/dordogne-cd24/authentic2/accounts.html | 2 +- .../variants/grand-chambery/authentic2/accounts.html | 2 +- .../variants/grandlyon-glc/includes/user-info.html | 2 +- .../grandlyon-glc/registration/registration_form.html | 2 +- .../haute-garonne-cd31/authentic2/accounts.html | 2 +- .../hautes-pyrenees-cd65/authentic2/accounts.html | 2 +- templates/variants/lille/authentic2/accounts.html | 2 +- .../metz-metropole-2019/includes/user-info.html | 8 ++++---- .../variants/nancy-en-direct/authentic2/accounts.html | 2 +- .../pre-saint-gervais/combo/page_template.html | 4 ++-- templates/variants/quimper/authentic2/accounts.html | 2 +- .../roannais-icitoyen/authentic2/accounts.html | 2 +- .../variants/sables-d-olonne-2022/includes/nav.html | 7 +++---- .../variants/strasbourg-2018/combo/page_template.html | 6 +++--- templates/variants/toodego/includes/nav.html | 2 +- templates/variants/toodego/wcs/base.html | 4 ++-- .../variants/toulouse-metropole/includes/nav.html | 10 +++++----- .../variants/villeneuve-dascq/includes/user-info.html | 9 ++++----- templates/variants/villeurbanne-2018/user_info.html | 8 ++++---- 23 files changed, 46 insertions(+), 48 deletions(-) diff --git a/templates/includes/user-info.html b/templates/includes/user-info.html index 026bbfd0..83185bd4 100644 --- a/templates/includes/user-info.html +++ b/templates/includes/user-info.html @@ -6,13 +6,12 @@ {% skeleton_extra_placeholder user-info %} {% if user.is_authenticated %} - {% if idp_account_url %}{% endif %} - {% block user-info-logout-label %}Déconnexion{% endblock %} + {% if account_url %}{% endif %} + {% block user-info-logout-label %}Déconnexion{% endblock %} {% else %} - {% firstof registration_url idp_registration_url as registration_url %} - @@ -20,6 +19,7 @@ {% block user-info-registration-label %}Inscription{% endblock %}{% endif %} {% endif %} + {% endwith %} {% end_skeleton_extra_placeholder %} {% endblock %} diff --git a/templates/portal-agent/combo/page_template.html b/templates/portal-agent/combo/page_template.html index 0394c586..05c6fb95 100644 --- a/templates/portal-agent/combo/page_template.html +++ b/templates/portal-agent/combo/page_template.html @@ -20,7 +20,7 @@ {% block page-title %}{% firstof site_title "Publik" %} - {{ page.title }}{% endblock %} {% block site-title %}{% firstof site_title "Publik" %}{% endblock %} {% block footer %}Combo — Copyright © Entr’ouvert{% endblock %} -{% block logout-url %}{% url 'auth_logout' %}{% endblock %} +{% block logout-url %}{{ logout_url }}{% endblock %} {% block bodyargs %} data-api-root="{{ site_base }}/api/" {% if check_badges %}data-check-badges="true"{% endif %} diff --git a/templates/variants/arles-2020/authentic2/accounts.html b/templates/variants/arles-2020/authentic2/accounts.html index 31b30def..40d52de3 100644 --- a/templates/variants/arles-2020/authentic2/accounts.html +++ b/templates/variants/arles-2020/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Se déconnecter
  • +
  • Se déconnecter
  • {% endblock %} diff --git a/templates/variants/bouches-du-rhone/authentic2/accounts.html b/templates/variants/bouches-du-rhone/authentic2/accounts.html index 889c25b5..234bcb62 100644 --- a/templates/variants/bouches-du-rhone/authentic2/accounts.html +++ b/templates/variants/bouches-du-rhone/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Déconnecter
  • +
  • Déconnecter
  • {% endblock %} diff --git a/templates/variants/dordogne-cd24/authentic2/accounts.html b/templates/variants/dordogne-cd24/authentic2/accounts.html index 32d1147f..60ed0eef 100644 --- a/templates/variants/dordogne-cd24/authentic2/accounts.html +++ b/templates/variants/dordogne-cd24/authentic2/accounts.html @@ -1,6 +1,6 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Se déconnecter
  • +
  • Se déconnecter
  • {% endblock %} diff --git a/templates/variants/grand-chambery/authentic2/accounts.html b/templates/variants/grand-chambery/authentic2/accounts.html index 31b30def..40d52de3 100644 --- a/templates/variants/grand-chambery/authentic2/accounts.html +++ b/templates/variants/grand-chambery/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Se déconnecter
  • +
  • Se déconnecter
  • {% endblock %} diff --git a/templates/variants/grandlyon-glc/includes/user-info.html b/templates/variants/grandlyon-glc/includes/user-info.html index c7c85a64..dbbd4edf 100644 --- a/templates/variants/grandlyon-glc/includes/user-info.html +++ b/templates/variants/grandlyon-glc/includes/user-info.html @@ -5,7 +5,7 @@ {% if user.is_authenticated %} {{user.first_name}} {{user.last_name}} - Déconnexion + Déconnexion {% endif %} {% end_skeleton_extra_placeholder %} diff --git a/templates/variants/grandlyon-glc/registration/registration_form.html b/templates/variants/grandlyon-glc/registration/registration_form.html index 7179358e..91ad6ff7 100644 --- a/templates/variants/grandlyon-glc/registration/registration_form.html +++ b/templates/variants/grandlyon-glc/registration/registration_form.html @@ -20,7 +20,7 @@ {% block registration-post %} {% endblock %} diff --git a/templates/variants/haute-garonne-cd31/authentic2/accounts.html b/templates/variants/haute-garonne-cd31/authentic2/accounts.html index 889c25b5..234bcb62 100644 --- a/templates/variants/haute-garonne-cd31/authentic2/accounts.html +++ b/templates/variants/haute-garonne-cd31/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Déconnecter
  • +
  • Déconnecter
  • {% endblock %} diff --git a/templates/variants/hautes-pyrenees-cd65/authentic2/accounts.html b/templates/variants/hautes-pyrenees-cd65/authentic2/accounts.html index 31b30def..40d52de3 100644 --- a/templates/variants/hautes-pyrenees-cd65/authentic2/accounts.html +++ b/templates/variants/hautes-pyrenees-cd65/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Se déconnecter
  • +
  • Se déconnecter
  • {% endblock %} diff --git a/templates/variants/lille/authentic2/accounts.html b/templates/variants/lille/authentic2/accounts.html index 889c25b5..234bcb62 100644 --- a/templates/variants/lille/authentic2/accounts.html +++ b/templates/variants/lille/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Déconnecter
  • +
  • Déconnecter
  • {% endblock %} diff --git a/templates/variants/metz-metropole-2019/includes/user-info.html b/templates/variants/metz-metropole-2019/includes/user-info.html index 698af43c..12cd60aa 100644 --- a/templates/variants/metz-metropole-2019/includes/user-info.html +++ b/templates/variants/metz-metropole-2019/includes/user-info.html @@ -3,12 +3,12 @@ {% block user-info %} {% skeleton_extra_placeholder user-info %} {% if user.is_authenticated %} - Bonjour {{ user.first_name }} - - Déconnexion + Bonjour {{ user.first_name }} - + Déconnexion {% else %} - Connexion + Connexion - - Inscription + Inscription {% endif %} Accueil {% end_skeleton_extra_placeholder %} diff --git a/templates/variants/nancy-en-direct/authentic2/accounts.html b/templates/variants/nancy-en-direct/authentic2/accounts.html index 889c25b5..234bcb62 100644 --- a/templates/variants/nancy-en-direct/authentic2/accounts.html +++ b/templates/variants/nancy-en-direct/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Déconnecter
  • +
  • Déconnecter
  • {% endblock %} diff --git a/templates/variants/pre-saint-gervais/combo/page_template.html b/templates/variants/pre-saint-gervais/combo/page_template.html index a10e0341..6d18b0bf 100644 --- a/templates/variants/pre-saint-gervais/combo/page_template.html +++ b/templates/variants/pre-saint-gervais/combo/page_template.html @@ -4,9 +4,9 @@ {% block psg-mon-espace %} {% skeleton_extra_placeholder psg-user-info %} {% if user.is_authenticated %} - Accéder à mon espaceMe déconnecter + Accéder à mon espaceMe déconnecter {% else %} - Connexion à mon espace + Connexion à mon espace {% endif %} {% end_skeleton_extra_placeholder %} {% endblock %} diff --git a/templates/variants/quimper/authentic2/accounts.html b/templates/variants/quimper/authentic2/accounts.html index 889c25b5..234bcb62 100644 --- a/templates/variants/quimper/authentic2/accounts.html +++ b/templates/variants/quimper/authentic2/accounts.html @@ -1,5 +1,5 @@ {% extends "authentic2/accounts.html" %} {% block account-management-bottom-actions %} -
  • Déconnecter
  • +
  • Déconnecter
  • {% endblock %} diff --git a/templates/variants/roannais-icitoyen/authentic2/accounts.html b/templates/variants/roannais-icitoyen/authentic2/accounts.html index bc472e9f..da7dff93 100644 --- a/templates/variants/roannais-icitoyen/authentic2/accounts.html +++ b/templates/variants/roannais-icitoyen/authentic2/accounts.html @@ -6,5 +6,5 @@ {% block account-management-bottom-actions %} -
  • Se déconnecter
  • +
  • Se déconnecter
  • {% endblock %} diff --git a/templates/variants/sables-d-olonne-2022/includes/nav.html b/templates/variants/sables-d-olonne-2022/includes/nav.html index ec9fa80f..a82693fd 100644 --- a/templates/variants/sables-d-olonne-2022/includes/nav.html +++ b/templates/variants/sables-d-olonne-2022/includes/nav.html @@ -5,11 +5,10 @@ {{ block.super }} {% skeleton_extra_placeholder user-info %} {% if user.is_authenticated %} -
  • -
  • Déconnexion
  • +
  • +
  • Déconnexion
  • {% else %} -{% firstof registration_url idp_registration_url as registration_url %} -
  • +
  • {% if registration_url and include_registration_link != False %}
  • Créer un compte
  • {% endif %} diff --git a/templates/variants/strasbourg-2018/combo/page_template.html b/templates/variants/strasbourg-2018/combo/page_template.html index 4f284a45..6318671c 100644 --- a/templates/variants/strasbourg-2018/combo/page_template.html +++ b/templates/variants/strasbourg-2018/combo/page_template.html @@ -37,20 +37,20 @@ if ($('#user-files').length) { {% block account %} {% skeleton_extra_placeholder account %} {% if user.is_authenticated %} - + {{user.first_name}} {{user.last_name|slice:":1"}}. - {% endif %} {% if not user.is_authenticated %} - + Connexion diff --git a/templates/variants/toodego/includes/nav.html b/templates/variants/toodego/includes/nav.html index 63b418d6..787f377d 100644 --- a/templates/variants/toodego/includes/nav.html +++ b/templates/variants/toodego/includes/nav.html @@ -15,7 +15,7 @@ {% skeleton_extra_placeholder "user-nav-link" %}{% if user.is_authenticated %}{{user.first_name}} {% else %}Se connecter{% endif %}{% end_skeleton_extra_placeholder %}{% endif %} {% endif %} diff --git a/templates/variants/toodego/wcs/base.html b/templates/variants/toodego/wcs/base.html index b775b34d..916d1a24 100644 --- a/templates/variants/toodego/wcs/base.html +++ b/templates/variants/toodego/wcs/base.html @@ -17,8 +17,8 @@ {% block user-info %} {% if session_user %} - {% if idp_account_url %}{% endif %} - {{session_user_display_name}}{% if idp_account_url %}{% endif %} + {% if account_url %}{% endif %} + {{session_user_display_name}}{% if account_url %}{% endif %} Déconnexion {% else %} diff --git a/templates/variants/toulouse-metropole/includes/nav.html b/templates/variants/toulouse-metropole/includes/nav.html index f4728ad5..b8626503 100644 --- a/templates/variants/toulouse-metropole/includes/nav.html +++ b/templates/variants/toulouse-metropole/includes/nav.html @@ -6,13 +6,13 @@ {% skeleton_extra_placeholder user-info %} {% if user.is_authenticated %} - {% if idp_account_url %}{% endif %} - {{user.first_name}} {{user.last_name}}{% if idp_account_url %}{% endif %} - Déconnexion + {% if account_url %}{% endif %} + {{user.first_name}} {{user.last_name}}{% if account_url %}{% endif %} + Déconnexion {% else %} - Connexion - Pas de compte ? S'inscrire + Connexion + Pas de compte ? S'inscrire {% endif %} {% end_skeleton_extra_placeholder %} diff --git a/templates/variants/villeneuve-dascq/includes/user-info.html b/templates/variants/villeneuve-dascq/includes/user-info.html index 85ae5c5f..27e629c9 100644 --- a/templates/variants/villeneuve-dascq/includes/user-info.html +++ b/templates/variants/villeneuve-dascq/includes/user-info.html @@ -8,13 +8,12 @@ {% skeleton_extra_placeholder user-info %} {% if user.is_authenticated %} - {% if idp_account_url %}{% endif %} - {% block user-info-logout-label %}Déconnexion{% endblock %} + {% if account_url %}{% endif %} + {% block user-info-logout-label %}Déconnexion{% endblock %} {% else %} - {% firstof registration_url idp_registration_url as registration_url %} - {% endif %} / diff --git a/templates/variants/villeurbanne-2018/user_info.html b/templates/variants/villeurbanne-2018/user_info.html index 7dfcc4ff..8ea12d09 100644 --- a/templates/variants/villeurbanne-2018/user_info.html +++ b/templates/variants/villeurbanne-2018/user_info.html @@ -1,10 +1,10 @@ {% if user.is_authenticated %} - {% if idp_account_url %}{% endif %} - + {% if account_url %}{% endif %} + Se déconnecter {% else %} - Se connecter + Se connecter {% endif %} -- 2.34.1