1
0
forked from ScoDoc/ScoDoc

Amélioration table billets absences

This commit is contained in:
Emmanuel Viennet 2022-09-22 14:58:46 +02:00
parent 251079675a
commit 8e336b8818
2 changed files with 12 additions and 5 deletions

View File

@ -112,11 +112,14 @@ def table_billets(
billet_dict["etat_str"] = "ok" billet_dict["etat_str"] = "ok"
if not etud: if not etud:
# ajoute info etudiant # ajoute info etudiant
etud = billet.etudiant if not billet.etudiant:
if not etud:
billet_dict["nomprenom"] = "???" # should not occur billet_dict["nomprenom"] = "???" # should not occur
else: else:
billet_dict["nomprenom"] = etud.nomprenom billet_dict["nomprenom"] = billet.etudiant.nomprenom
billet_dict["_nomprenom_disp_order"] = billet.etudiant.sort_key
billet_dict[
"_nomprenom_td_attrs"
] = f'id="{billet.etudiant.id}" class="etudinfo"'
if with_links: if with_links:
billet_dict["_nomprenom_target"] = url_for( billet_dict["_nomprenom_target"] = url_for(
"scolar.ficheEtud", "scolar.ficheEtud",
@ -131,7 +134,6 @@ def table_billets(
if not etud: if not etud:
columns_ids += ["nomprenom"] columns_ids += ["nomprenom"]
columns_ids += ["abs_begin_str", "abs_end_str", "description", "etat_str"] columns_ids += ["abs_begin_str", "abs_end_str", "description", "etat_str"]
tab = GenTable( tab = GenTable(
titles={ titles={
"billet_id": "Numéro", "billet_id": "Numéro",
@ -146,5 +148,6 @@ def table_billets(
preferences=sco_preferences.SemPreferences(), preferences=sco_preferences.SemPreferences(),
rows=rows, rows=rows,
html_sortable=True, html_sortable=True,
html_class="table_leftalign",
) )
return tab return tab

View File

@ -1246,7 +1246,11 @@ def list_billets():
table = sco_abs_billets.table_billets_etud(etat=False) table = sco_abs_billets.table_billets_etud(etat=False)
T = table.html() T = table.html()
H = [ H = [
html_sco_header.sco_header(page_title="Billet d'absence non traités"), html_sco_header.sco_header(
page_title="Billet d'absence non traités",
javascripts=["js/etud_info.js"],
init_qtip=True,
),
f"<h2>Billets d'absence en attente de traitement ({table.get_nb_rows()})</h2>", f"<h2>Billets d'absence en attente de traitement ({table.get_nb_rows()})</h2>",
] ]