EDT: affichage enseignants non reconnus + typo

This commit is contained in:
Emmanuel Viennet 2024-01-06 12:46:22 +01:00
parent bd860295ba
commit f2b6e7f253
4 changed files with 18 additions and 10 deletions

View File

@ -183,7 +183,7 @@ def formsemestre_edt_dict(
except ScoValueError as exc:
return exc.args[0]
# Génération des événements pour le calendrier html
promo_icon = f"""<img height="28px" src="{scu.STATIC_DIR}/icons/promo.svg"
promo_icon = f"""<img height="18px" src="{scu.STATIC_DIR}/icons/promo.svg"
title="promotion complète" alt="promotion"/>"""
abs_icon = f"""<img height="28px" src="{scu.STATIC_DIR}/icons/absences.svg"
title="saisir absences" alt="saisir absences"/>"""
@ -228,14 +228,13 @@ def formsemestre_edt_dict(
case None: # Module edt non trouvé dans ScoDoc
mod_disp = f"""<span class="mod-etd">{
scu.EMO_WARNING} {event['edt_module']}</span>"""
bubble = "code module non trouvé dans ScoDoc. Vérifier configuration."
bubble = "code module non trouvé dans ce semestre ScoDoc. Vérifier configuration."
case _: # module EDT bien retrouvé dans ScoDoc
bubble = f"""{modimpl.module.abbrev or modimpl.module.titre or ''
} ({event['edt_module']})"""
mod_disp = (
f"""<span class="mod-name mod-code">{modimpl.module.code}</span>"""
)
# {event['title_edt']}
span_title = f" <span>{event['title']}</span>" if show_modules_titles else ""
title = f"""<div class = "module-edt" title="{bubble}">
<a class="discretelink" href="{url_abs or ''}">{mod_disp}{span_title}</a>
@ -251,11 +250,17 @@ def formsemestre_edt_dict(
else ""
)
ens_nomprenoms = (
"(" + ", ".join([u.get_nomprenom() for u in event["users"]]) + ")"
if event["users"]
else ""
)
if event["users"]:
# enseignants reconnus dans l'evènement EDT
ens_nomprenoms = f"""<span class="edt-ens">({
", ".join([u.get_nomprenom() for u in event["users"]])
})</span>"""
else:
ens_nomprenoms = f"""<span class="ens-non-reconnu"
title="enseignants edt: {', '.join(event['edt_ens_ids'])
if event["edt_ens_ids"] else '?'
}">(ens. ?)</span>"""
ens_user_names = (
",".join([u.user_name for u in event["users"]]) if event["users"] else ""
)

View File

@ -3,6 +3,9 @@
margin-left: 16px;
}
span.ens-non-reconnu {
color: red;
}
/* Style for the dropdown button */
.dropdown {
position: relative;

View File

@ -241,7 +241,7 @@ document.addEventListener('DOMContentLoaded', function() {
// current calendar date, ISO, without time
const iso_date = calendar.getDateRangeStart().toDate().toISOString().split('T')[0];
updateCurrentDateInUrl(iso_date);
calendar_control_form.current_date = iso_date;
calendar_control_form.current_date.value = iso_date;
}
// View menu
const dropdown = document.querySelector('.dropdown');

View File

@ -1,7 +1,7 @@
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION = "9.6.74"
SCOVERSION = "9.6.75"
SCONAME = "ScoDoc"