Assiduites : réorganisation templates

This commit is contained in:
iziram 2023-06-20 08:33:49 +02:00
parent 54ab56e9bf
commit 93136ee679
18 changed files with 32 additions and 30 deletions

View File

@ -1,4 +1,4 @@
{% include "assiduites/alert.j2" %}
{% include "assiduites/widgets/alert.j2" %}
{% include "assiduites/prompt.j2" %}
{% block app_content %}

View File

@ -0,0 +1,9 @@
<h2>Signalement différé des assiduités {{gr |safe}}</h2>
<h3>{{sem | safe }}</h3>
{{diff | safe}}
{% include "assiduites/widgets/alert.j2" %}
{% include "assiduites/widgets/prompt.j2" %}
{% include "assiduites/widgets/conflict.j2" %}
{% include "assiduites/widgets/toast.j2" %}

View File

@ -1,8 +1,8 @@
{# -*- mode: jinja-html -*- #}
{% include "assiduites/toast.j2" %}
{% include "assiduites/alert.j2" %}
{% include "assiduites/prompt.j2" %}
{% include "assiduites/conflict.j2" %}
{% include "assiduites/widgets/toast.j2" %}
{% include "assiduites/widgets/alert.j2" %}
{% include "assiduites/widgets/prompt.j2" %}
{% include "assiduites/widgets/conflict.j2" %}
<div id="page-assiduite-content">
{% block content %}
<h2>Signalement de l'assiduité de <span class="rouge">{{sco.etud.nomprenom}}</span></h2>

View File

@ -1,4 +1,4 @@
{% include "assiduites/toast.j2" %}
{% include "assiduites/widgets/toast.j2" %}
<section id="content">
<div class="no-display">
@ -62,9 +62,9 @@
<div class="loader"></div>
</div>
{% include "assiduites/alert.j2" %}
{% include "assiduites/prompt.j2" %}
{% include "assiduites/conflict.j2" %}
{% include "assiduites/widgets/alert.j2" %}
{% include "assiduites/widgets/prompt.j2" %}
{% include "assiduites/widgets/conflict.j2" %}
<script>

View File

@ -1,9 +0,0 @@
<h2>Signalement différé des assiduités {{gr |safe}}</h2>
<h3>{{sem | safe }}</h3>
{{diff | safe}}
{% include "assiduites/alert.j2" %}
{% include "assiduites/prompt.j2" %}
{% include "assiduites/conflict.j2" %}
{% include "assiduites/toast.j2" %}

View File

@ -207,7 +207,7 @@ def signal_assiduites_etud():
header,
_mini_timeline(),
render_template(
"assiduites/signal_assiduites_etud.j2",
"assiduites/pages/signal_assiduites_etud.j2",
sco=ScoData(etud),
date=datetime.date.today().isoformat(),
morning=morning,
@ -262,7 +262,7 @@ def liste_assiduites_etud():
return HTMLBuilder(
header,
render_template(
"assiduites/liste_assiduites.j2",
"assiduites/pages/liste_assiduites.j2",
sco=ScoData(etud),
date=datetime.date.today().isoformat(),
),
@ -394,7 +394,7 @@ def signal_assiduites_group():
header,
_mini_timeline(),
render_template(
"assiduites/signal_assiduites_group.j2",
"assiduites/pages/signal_assiduites_group.j2",
gr_tit=gr_tit,
sem=sem["titre_num"],
date=date,
@ -480,7 +480,9 @@ def get_etat_abs_date():
return HTMLBuilder(
header,
render_template(
"assiduites/etat_absence_date.j2", etudiants=etudiants, eval=evaluation
"assiduites/pages/etat_absence_date.j2",
etudiants=etudiants,
eval=evaluation,
),
html_sco_header.sco_footer(),
).build()
@ -568,7 +570,7 @@ def signal_assiduites_diff():
return HTMLBuilder(
header,
render_template(
"assiduites/signal_assiduites_diff.j2",
"assiduites/pages/signal_assiduites_diff.j2",
diff=_differee(
etudiants=etudiants,
moduleimpl_select=_module_selector(formsemestre),
@ -604,7 +606,7 @@ def _differee(
)
return render_template(
"assiduites/differee.j2",
"assiduites/widgets/differee.j2",
etudiants=etudiants,
etat_def=etat_def,
forcer_module=forcer_module,
@ -647,17 +649,17 @@ def _module_selector(
modules.append({"moduleimpl_id": modimpl["moduleimpl_id"], "name": modname})
return render_template(
"assiduites/moduleimpl_selector.j2", selected=selected, modules=modules
"assiduites/widgets/moduleimpl_selector.j2", selected=selected, modules=modules
)
def _dynamic_module_selector():
return render_template("assiduites/moduleimpl_dynamic_selector.j2")
return render_template("assiduites/widgets/moduleimpl_dynamic_selector.j2")
def _timeline(formsemestre_id=None) -> HTMLElement:
return render_template(
"assiduites/timeline.j2",
"assiduites/widgets/timeline.j2",
t_start=get_time("assi_morning_time", "08:00:00"),
t_end=get_time("assi_afternoon_time", "18:00:00"),
tick_time=ScoDocSiteConfig.get("assi_tick_time", 15),
@ -669,7 +671,7 @@ def _timeline(formsemestre_id=None) -> HTMLElement:
def _mini_timeline() -> HTMLElement:
return render_template(
"assiduites/minitimeline.j2",
"assiduites/widgets/minitimeline.j2",
t_start=get_time("assi_morning_time", "08:00:00"),
t_end=get_time("assi_afternoon_time", "18:00:00"),
)

View File

@ -1,7 +1,7 @@
"""modèles assiduites justificatifs
Revision ID: dbcf2175e87f
Revises: d84bc592584e
Revises: c701224fa255
Create Date: 2023-02-01 14:21:06.989190
"""
@ -11,7 +11,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "dbcf2175e87f"
down_revision = "d84bc592584e"
down_revision = "c701224fa255"
branch_labels = None
depends_on = None