From 25deaaae7f702d23b41e792fac018d53d3eb9ef9 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 28 Dec 2021 16:17:07 +0100 Subject: [PATCH] Add modeline to all jinja2 templates --- app/templates/about.html | 1 + app/templates/auth/change_password.html | 1 + app/templates/auth/login.html | 1 + app/templates/auth/register.html | 1 + app/templates/auth/reset_password.html | 3 +- .../auth/reset_password_request.html | 1 + app/templates/auth/toogle_active_user.html | 1 + app/templates/auth/user_info_page.html | 53 ++++++++++--------- app/templates/base.html | 1 + app/templates/but/bulletin.html | 1 + app/templates/but/refcomp_assoc.html | 1 + app/templates/but/refcomp_load.html | 1 + app/templates/but/refcomp_show.html | 1 + app/templates/but/refcomp_table.html | 1 + app/templates/config_dept.html | 1 + app/templates/configuration.html | 1 + app/templates/create_dept.html | 1 + app/templates/error_500.html | 6 ++- app/templates/error_access_denied.html | 1 + app/templates/formsemestre_header.html | 1 + app/templates/main/index.html | 1 + app/templates/pn/form_descr.html | 1 + app/templates/pn/form_mods.html | 1 + app/templates/pn/form_modules_ue_coefs.html | 1 + app/templates/pn/form_ues.html | 1 + app/templates/pn/ue_infos.html | 1 + app/templates/sco_page.html | 1 + app/templates/sco_value_error.html | 1 + app/templates/scodoc.html | 3 +- app/templates/scolar/affect_groups.html | 2 +- app/templates/scolar/photos_import_files.html | 1 + app/templates/scolar/photos_import_files.txt | 2 +- app/templates/sidebar.html | 19 +++---- app/templates/sidebar_dept.html | 1 + 34 files changed, 74 insertions(+), 41 deletions(-) diff --git a/app/templates/about.html b/app/templates/about.html index 2dc50691..0b2eed38 100644 --- a/app/templates/about.html +++ b/app/templates/about.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/auth/change_password.html b/app/templates/auth/change_password.html index 2bec7762..57db80c7 100644 --- a/app/templates/auth/change_password.html +++ b/app/templates/auth/change_password.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/auth/login.html b/app/templates/auth/login.html index d636e053..1764e2d2 100644 --- a/app/templates/auth/login.html +++ b/app/templates/auth/login.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/auth/register.html b/app/templates/auth/register.html index 35e6a2ab..3c720079 100644 --- a/app/templates/auth/register.html +++ b/app/templates/auth/register.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/auth/reset_password.html b/app/templates/auth/reset_password.html index 261e37db..fdf1215a 100644 --- a/app/templates/auth/reset_password.html +++ b/app/templates/auth/reset_password.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} @@ -5,7 +6,7 @@

Changez votre mot de passe ScoDoc

-
Votre identifiant: {{user.user_name}}
+
Votre identifiant: {{user.user_name}}
diff --git a/app/templates/auth/reset_password_request.html b/app/templates/auth/reset_password_request.html index 99a37fb2..a5b66155 100644 --- a/app/templates/auth/reset_password_request.html +++ b/app/templates/auth/reset_password_request.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/auth/toogle_active_user.html b/app/templates/auth/toogle_active_user.html index d5ec678d..38153100 100644 --- a/app/templates/auth/toogle_active_user.html +++ b/app/templates/auth/toogle_active_user.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/auth/user_info_page.html b/app/templates/auth/user_info_page.html index 69592999..8a287c01 100644 --- a/app/templates/auth/user_info_page.html +++ b/app/templates/auth/user_info_page.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} @@ -5,16 +6,16 @@

Utilisateur: {{user.user_name}} ({{'actif' if user.active else 'fermé'}})

-Login : {{user.user_name}}
-Nom : {{user.nom or ""}}
-Prénom : {{user.prenom or ""}}
-Mail : {{user.email}}
-Roles : {{user.get_roles_string()}}
-Dept : {{user.dept or ""}}
-Dernière modif mot de passe: -{{user.date_modif_passwd.isoformat() if user.date_modif_passwd else ""}}
-Date d'expiration: -{{user.date_expiration.isoformat() if user.date_expiration else "(sans limite)"}} + Login : {{user.user_name}}
+ Nom : {{user.nom or ""}}
+ Prénom : {{user.prenom or ""}}
+ Mail : {{user.email}}
+ Roles : {{user.get_roles_string()}}
+ Dept : {{user.dept or ""}}
+ Dernière modif mot de passe: + {{user.date_modif_passwd.isoformat() if user.date_modif_passwd else ""}}
+ Date d'expiration: + {{user.date_expiration.isoformat() if user.date_expiration else "(sans limite)"}}

{% if current_user.id == user.id %} -

Se déconnecter: -logout -

+

Se déconnecter: + logout +

{% endif %} {# Liste des permissions #}
-

Permissions de cet utilisateur dans le département {dept}:

-
    -{% for p in Permission.description %} -
  • {{Permission.description[p]}} : - {{ - "oui" if user.has_permission(Permission.get_by_name(p), dept) else "non" - }} -
  • -{% endfor %} -
+

Permissions de cet utilisateur dans le département {dept}:

+
    + {% for p in Permission.description %} +
  • {{Permission.description[p]}} : + {{ + "oui" if user.has_permission(Permission.get_by_name(p), dept) else "non" + }} +
  • + {% endfor %} +
{% if current_user.has_permission(Permission.ScoUsersAdmin, dept) %} diff --git a/app/templates/base.html b/app/templates/base.html index 815ba7b7..adf70171 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'bootstrap/base.html' %} {% block styles %} diff --git a/app/templates/but/bulletin.html b/app/templates/but/bulletin.html index 27146ed4..ff0682fc 100644 --- a/app/templates/but/bulletin.html +++ b/app/templates/but/bulletin.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "sco_page.html" %} {% block styles %} diff --git a/app/templates/but/refcomp_assoc.html b/app/templates/but/refcomp_assoc.html index 1b30d463..9f8335be 100644 --- a/app/templates/but/refcomp_assoc.html +++ b/app/templates/but/refcomp_assoc.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/but/refcomp_load.html b/app/templates/but/refcomp_load.html index caac1a5e..9bf70470 100644 --- a/app/templates/but/refcomp_load.html +++ b/app/templates/but/refcomp_load.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/but/refcomp_show.html b/app/templates/but/refcomp_show.html index 07e45543..fb7357d2 100644 --- a/app/templates/but/refcomp_show.html +++ b/app/templates/but/refcomp_show.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "sco_page.html" %} {% block app_content %} diff --git a/app/templates/but/refcomp_table.html b/app/templates/but/refcomp_table.html index 2095dc9f..6c7b05f0 100644 --- a/app/templates/but/refcomp_table.html +++ b/app/templates/but/refcomp_table.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "sco_page.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/config_dept.html b/app/templates/config_dept.html index c602c5f3..bb5ed80c 100644 --- a/app/templates/config_dept.html +++ b/app/templates/config_dept.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% macro render_field(field) %}
{{ field.label }} : diff --git a/app/templates/configuration.html b/app/templates/configuration.html index b874d48d..d4df6ed4 100644 --- a/app/templates/configuration.html +++ b/app/templates/configuration.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/create_dept.html b/app/templates/create_dept.html index 4e3f8a46..7745af7a 100644 --- a/app/templates/create_dept.html +++ b/app/templates/create_dept.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends "base.html" %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/error_500.html b/app/templates/error_500.html index d986a00d..23a5c609 100644 --- a/app/templates/error_500.html +++ b/app/templates/error_500.html @@ -1,11 +1,13 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} {% block title %}Une erreur est survenue !{% endblock %} {% block body %}

Une erreur est survenue !

-

Oups... ScoDoc version {{SCOVERSION}} a - un problème, désolé.

+

Oups... ScoDoc version + {{SCOVERSION}} + a un problème, désolé.

{{date}}

Si le problème persiste, contacter l'administrateur de votre site, diff --git a/app/templates/error_access_denied.html b/app/templates/error_access_denied.html index 5a765b76..516361d5 100644 --- a/app/templates/error_access_denied.html +++ b/app/templates/error_access_denied.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/formsemestre_header.html b/app/templates/formsemestre_header.html index 441a3287..aa8464ef 100644 --- a/app/templates/formsemestre_header.html +++ b/app/templates/formsemestre_header.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {# Description un semestre (barre de menu et infos) #}

diff --git a/app/templates/main/index.html b/app/templates/main/index.html index 6e21ac46..35005c95 100644 --- a/app/templates/main/index.html +++ b/app/templates/main/index.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/pn/form_descr.html b/app/templates/pn/form_descr.html index 34718025..6a0cda4e 100644 --- a/app/templates/pn/form_descr.html +++ b/app/templates/pn/form_descr.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {# Chapeau description d'une formation #}
diff --git a/app/templates/pn/form_mods.html b/app/templates/pn/form_mods.html index 90faee02..cba28347 100644 --- a/app/templates/pn/form_mods.html +++ b/app/templates/pn/form_mods.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {# Édition liste modules APC (SAÉ ou ressources) #}
diff --git a/app/templates/pn/form_modules_ue_coefs.html b/app/templates/pn/form_modules_ue_coefs.html index c94fe60c..186a8e7f 100644 --- a/app/templates/pn/form_modules_ue_coefs.html +++ b/app/templates/pn/form_modules_ue_coefs.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #}

Édition des coefficients des modules vers les UEs

Double-cliquer pour changer une valeur. diff --git a/app/templates/pn/form_ues.html b/app/templates/pn/form_ues.html index 69d69839..cc9812dc 100644 --- a/app/templates/pn/form_ues.html +++ b/app/templates/pn/form_ues.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {# Édition liste UEs APC #}
Unités d'Enseignement (UEs)
diff --git a/app/templates/pn/ue_infos.html b/app/templates/pn/ue_infos.html index f1757c73..b45c0b9b 100644 --- a/app/templates/pn/ue_infos.html +++ b/app/templates/pn/ue_infos.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {# Informations sur une UE #} {% extends "sco_page.html" %} diff --git a/app/templates/sco_page.html b/app/templates/sco_page.html index 249bfb39..e593d9c0 100644 --- a/app/templates/sco_page.html +++ b/app/templates/sco_page.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'bootstrap/base.html' %} {% block styles %} diff --git a/app/templates/sco_value_error.html b/app/templates/sco_value_error.html index 9b7f3b54..36ed8d20 100644 --- a/app/templates/sco_value_error.html +++ b/app/templates/sco_value_error.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} diff --git a/app/templates/scodoc.html b/app/templates/scodoc.html index 2aaf9e22..2b8255e5 100644 --- a/app/templates/scodoc.html +++ b/app/templates/scodoc.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf %} @@ -23,7 +24,7 @@ {% endfor %} {% if current_user.is_administrator() %} -
  • créer un nouveau département
  • +
  • créer un nouveau département
  • {% endif %} diff --git a/app/templates/scolar/affect_groups.html b/app/templates/scolar/affect_groups.html index 56393575..2dc3a1f6 100644 --- a/app/templates/scolar/affect_groups.html +++ b/app/templates/scolar/affect_groups.html @@ -1,4 +1,4 @@ - +{# -*- mode: jinja-html -*- #} {{ sco_header|safe }}

    Affectation aux groupes de {{ partition["partition_name"] }}

    diff --git a/app/templates/scolar/photos_import_files.html b/app/templates/scolar/photos_import_files.html index f4bae574..460d7d7e 100644 --- a/app/templates/scolar/photos_import_files.html +++ b/app/templates/scolar/photos_import_files.html @@ -1,3 +1,4 @@ +{# -*- mode: jinja-html -*- #} {% extends 'base.html' %} {% block app_content %} diff --git a/app/templates/scolar/photos_import_files.txt b/app/templates/scolar/photos_import_files.txt index d9aab53e..cb6777b5 100755 --- a/app/templates/scolar/photos_import_files.txt +++ b/app/templates/scolar/photos_import_files.txt @@ -1,4 +1,4 @@ - +{# -*- mode: jinja-raw -*- #} Importation des photo effectuée {% if ignored_zipfiles %} diff --git a/app/templates/sidebar.html b/app/templates/sidebar.html index 3334dbb6..eb5df4af 100644 --- a/app/templates/sidebar.html +++ b/app/templates/sidebar.html @@ -1,13 +1,14 @@ {# Barre marge gauche ScoDoc #} +{# -*- mode: jinja-html -*- #}