diff --git a/app/scodoc/sco_edt_cal.py b/app/scodoc/sco_edt_cal.py index cd4601408..ee50e2dd7 100644 --- a/app/scodoc/sco_edt_cal.py +++ b/app/scodoc/sco_edt_cal.py @@ -33,7 +33,7 @@ XXX usage uniquement experimental pour tests implémentations import re import icalendar -from flask import flash +from flask import flash, g, url_for from app import log from app.models import FormSemestre, GroupDescr, ModuleImpl, ScoDocSiteConfig import app.scodoc.sco_utils as scu @@ -126,15 +126,30 @@ def formsemestre_edt_dict(formsemestre: FormSemestre) -> list[dict]: edt_module = extract_event_module(event) modimpl: ModuleImpl = edt2modimpl.get(edt_module, None) mod_disp = ( - f"""
{modimpl.module.code} -
""" + f"""
{ + modimpl.module.code}
""" if modimpl - else f"""
{scu.EMO_WARNING} {edt_module}
""" + else f"""
{ + scu.EMO_WARNING} {edt_module}
""" + ) + # --- Lien saisie abs + link_abs = ( + f"""""" + if modimpl and group + else "" ) d = { # Champs utilisés par tui.calendar "calendarId": "cal1", - "title": extract_event_title(event) + group_disp + mod_disp, + "title": extract_event_title(event) + group_disp + mod_disp + link_abs, "start": event.decoded("dtstart").isoformat(), "end": event.decoded("dtend").isoformat(), "backgroundColor": background_color,