Add modeline to all jinja2 templates

This commit is contained in:
Emmanuel Viennet 2021-12-28 16:17:07 +01:00
parent 0fe5cdb409
commit 25deaaae7f
34 changed files with 74 additions and 41 deletions

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}
@ -5,7 +6,7 @@
<h1>Changez votre mot de passe ScoDoc</h1>
<div class="row" style="margin-top: 30px;">
<div class="col-md-4">Votre identifiant: <b>{{user.user_name}}</b></div>
<div class="col-md-4">Votre identifiant: <b>{{user.user_name}}</b></div>
</div>
<div class="row" style="margin-top: 30px;">

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}
@ -5,16 +6,16 @@
<h2>Utilisateur: {{user.user_name}} ({{'actif' if user.active else 'fermé'}})</h2>
<p>
<b>Login :</b> {{user.user_name}}<br/>
<b>Nom :</b> {{user.nom or ""}}<br/>
<b>Prénom :</b> {{user.prenom or ""}}<br/>
<b>Mail :</b> {{user.email}}<br/>
<b>Roles :</b> {{user.get_roles_string()}}<br/>
<b>Dept :</b> {{user.dept or ""}}<br/>
<b>Dernière modif mot de passe:</b>
{{user.date_modif_passwd.isoformat() if user.date_modif_passwd else ""}}<br/>
<b>Date d'expiration:</b>
{{user.date_expiration.isoformat() if user.date_expiration else "(sans limite)"}}
<b>Login :</b> {{user.user_name}}<br>
<b>Nom :</b> {{user.nom or ""}}<br>
<b>Prénom :</b> {{user.prenom or ""}}<br>
<b>Mail :</b> {{user.email}}<br>
<b>Roles :</b> {{user.get_roles_string()}}<br>
<b>Dept :</b> {{user.dept or ""}}<br>
<b>Dernière modif mot de passe:</b>
{{user.date_modif_passwd.isoformat() if user.date_modif_passwd else ""}}<br>
<b>Date d'expiration:</b>
{{user.date_expiration.isoformat() if user.date_expiration else "(sans limite)"}}
<p>
<ul>
<li><a class="stdlink" href="{{
@ -27,33 +28,33 @@
url_for('users.create_user_form', scodoc_dept=g.scodoc_dept,
user_name=user.user_name, edit=1)
}}">modifier ce compte</a>
</li>
<li><a class="stdlink" href="{{
</li>
<li><a class="stdlink" href="{{
url_for('users.toggle_active_user', scodoc_dept=g.scodoc_dept,
user_name=user.user_name)
}}">{{"désactiver" if user.active else "activer"}} ce compte</a>
</li>
</li>
{% endif %}
</ul>
{% if current_user.id == user.id %}
<p><b>Se déconnecter:
<a class="stdlink" href="{{url_for('auth.logout')}}">logout</a>
</b></p>
<p><b>Se déconnecter:
<a class="stdlink" href="{{url_for('auth.logout')}}">logout</a>
</b></p>
{% endif %}
{# Liste des permissions #}
<div class="permissions">
<p>Permissions de cet utilisateur dans le département {dept}:</p>
<ul>
{% for p in Permission.description %}
<li>{{Permission.description[p]}} :
{{
"oui" if user.has_permission(Permission.get_by_name(p), dept) else "non"
}}
</li>
{% endfor %}
</ul>
<p>Permissions de cet utilisateur dans le département {dept}:</p>
<ul>
{% for p in Permission.description %}
<li>{{Permission.description[p]}} :
{{
"oui" if user.has_permission(Permission.get_by_name(p), dept) else "non"
}}
</li>
{% endfor %}
</ul>
</div>
{% if current_user.has_permission(Permission.ScoUsersAdmin, dept) %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'bootstrap/base.html' %}
{% block styles %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% block styles %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% block app_content %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "sco_page.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% macro render_field(field) %}
<div>
<span class="wtf-field">{{ field.label }} :</span>

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -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 %}
<h1>Une erreur est survenue !</h1>
<p>Oups...</tt> <span style="color:red;"><b>ScoDoc version <span style="font-size: 120%;">{{SCOVERSION}}</span></b></span> a
un problème, désolé.</p>
<p>Oups...</tt> <span style="color:red;"><b>ScoDoc version
<span style="font-size: 120%;">{{SCOVERSION}}</span></b></span>
a un problème, désolé.</p>
<p><tt style="font-size:60%">{{date}}</tt></p>
<p> Si le problème persiste, contacter l'administrateur de votre site,

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{# Description un semestre (barre de menu et infos) #}
<!-- formsemestre_header -->
<div class="formsemestre_page_title">

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{# Chapeau description d'une formation #}
<div class="formation_descr">

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{# Édition liste modules APC (SAÉ ou ressources) #}
<div class="formation_list_modules formation_list_modules_{{module_type.name}}">

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
<h2>Édition des coefficients des modules vers les UEs</h2>
<div class="help">
Double-cliquer pour changer une valeur.

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{# Édition liste UEs APC #}
<div class="formation_list_ues">
<div class="formation_list_ues_titre">Unités d'Enseignement (UEs)</div>

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{# Informations sur une UE #}
{% extends "sco_page.html" %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'bootstrap/base.html' %}
{% block styles %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% import 'bootstrap/wtf.html' as wtf %}
@ -23,7 +24,7 @@
</li>
{% endfor %}
{% if current_user.is_administrator() %}
<li><a href="{{ url_for('scodoc.create_dept') }}">créer un nouveau département</a></li>
<li><a href="{{ url_for('scodoc.create_dept') }}">créer un nouveau département</a></li>
{% endif %}
</ul>

View File

@ -1,4 +1,4 @@
{# -*- mode: jinja-html -*- #}
{{ sco_header|safe }}
<h2 class="formsemestre">Affectation aux groupes de {{ partition["partition_name"] }}</h2>

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
{% extends 'base.html' %}
{% block app_content %}

View File

@ -1,4 +1,4 @@
{# -*- mode: jinja-raw -*- #}
Importation des photo effectuée
{% if ignored_zipfiles %}

View File

@ -1,13 +1,14 @@
{# Barre marge gauche ScoDoc #}
{# -*- mode: jinja-html -*- #}
<!-- sidebar -->
<div class="sidebar">
{# sidebar_common #}
<a class="scodoc_title" href="{{
url_for("scodoc.index", scodoc_dept=g.scodoc_dept) }}">ScoDoc 9.2a</a>
url_for(" scodoc.index", scodoc_dept=g.scodoc_dept) }}">ScoDoc 9.2a</a>
<div id="authuser"><a id="authuserlink" href="{{
url_for("users.user_info_page", scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
url_for(" users.user_info_page", scodoc_dept=g.scodoc_dept, user_name=current_user.user_name)
}}">{{current_user.user_name}}</a>
<br /><a id="deconnectlink" href="{{url_for("auth.logout")}}">déconnexion</a>
<br /><a id="deconnectlink" href="{{url_for(" auth.logout")}}">déconnexion</a>
</div>
{% block sidebar_dept %}
@ -21,18 +22,18 @@
{% endblock %}
<h2 class="insidebar">Scolarité</h2>
<a href="{{url_for("scolar.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Semestres</a> <br>
<a href="{{url_for("notes.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Programmes</a> <br>
<a href="{{url_for("absences.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Absences</a> <br>
<a href="{{url_for(" scolar.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Semestres</a> <br>
<a href="{{url_for(" notes.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Programmes</a> <br>
<a href="{{url_for(" absences.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Absences</a> <br>
{% if current_user.has_permission(sco.Permission.ScoUsersAdmin)
or current_user.has_permission(sco.Permission.ScoUsersView)
%}
<a href="{{url_for("users.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Utilisateurs</a> <br />
<a href="{{url_for(" users.index_html", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Utilisateurs</a> <br />
{% endif %}
{% if current_user.has_permission(sco.Permission.ScoChangePreferences) %}
<a href="{{url_for("scolar.edit_preferences", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Paramétrage</a> <br>
<a href="{{url_for(" scolar.edit_preferences", scodoc_dept=g.scodoc_dept)}}" class="sidebar">Paramétrage</a> <br>
{% endif %}
{# /sidebar_common #}
@ -48,7 +49,7 @@
<div class="etud-insidebar">
{% if sco.etud %}
<h2 id="insidebar-etud"><a href="{{url_for(
"scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=sco.etud.id )}}" class="sidebar">
" scolar.ficheEtud", scodoc_dept=g.scodoc_dept, etudid=sco.etud.id )}}" class="sidebar">
<span class="fontred">{{sco.etud.nomprenom}}</span></a>
</h2>
<b>Absences</b>

View File

@ -1,3 +1,4 @@
{# -*- mode: jinja-html -*- #}
<h2 class="insidebar"><a href="{{
url_for('scolar.index_html', scodoc_dept=g.scodoc_dept)
}}">Dépt. {{ prefs["DeptName"] }}</a>