From b831daf93817c92362c5be2d22b6cbbe4aea25ce Mon Sep 17 00:00:00 2001 From: viennet Date: Thu, 31 Dec 2020 18:58:51 +0100 Subject: [PATCH] Bulles aide sur formulaire saise absences (contrib. DS) --- ZAbsences.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/ZAbsences.py b/ZAbsences.py index 9d0d7275..08e429d2 100644 --- a/ZAbsences.py +++ b/ZAbsences.py @@ -1331,17 +1331,26 @@ class ZAbsences( checked = "checked" else: checked = "" + # bulle lors du passage souris + coljour = DAYNAMES[ + (calendar.weekday(int(date[:4]), int(date[5:7]), int(date[8:]))) + ] + datecol = coljour + " " + date[8:] + "/" + date[5:7] + "/" + date[:4] + bulle_am = '"' + etud["nomprenom"] + " - " + datecol + ' (matin)"' + bulle_pm = '"' + etud["nomprenom"] + " - " + datecol + ' (ap.midi)"' + H.append( - '' + '' % ( td_matin_class, + bulle_am, etudid + ":" + date + ":" + "am", checked, etudid, date + ":am", ) ) - # apres midi + # après-midi if self.CountAbs( etudid, date, date, False, moduleimpl_id=moduleimpl_id ): @@ -1349,8 +1358,14 @@ class ZAbsences( else: checked = "" H.append( - '' - % (etudid + ":" + date + ":" + "pm", checked, etudid, date + ":pm") + '' + % ( + bulle_pm, + etudid + ":" + date + ":" + "pm", + checked, + etudid, + date + ":pm", + ) ) H.append("") H.append("")