Bulles aide sur formulaire saise absences (contrib. DS)

This commit is contained in:
viennet 2020-12-31 18:58:51 +01:00
parent 206b01a5a8
commit b831daf938

View File

@ -1331,17 +1331,26 @@ class ZAbsences(
checked = "checked" checked = "checked"
else: else:
checked = "" 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( H.append(
'<td class="%s"><input type="checkbox" name="abslist:list" value="%s" %s onclick="on_toggled(this, \'%s\', \'%s\')"/></td>' '<td class="%s"><a title=%s><input type="checkbox" name="abslist:list" value="%s" %s onclick="on_toggled(this, \'%s\', \'%s\')"/></a></td>'
% ( % (
td_matin_class, td_matin_class,
bulle_am,
etudid + ":" + date + ":" + "am", etudid + ":" + date + ":" + "am",
checked, checked,
etudid, etudid,
date + ":am", date + ":am",
) )
) )
# apres midi # après-midi
if self.CountAbs( if self.CountAbs(
etudid, date, date, False, moduleimpl_id=moduleimpl_id etudid, date, date, False, moduleimpl_id=moduleimpl_id
): ):
@ -1349,8 +1358,14 @@ class ZAbsences(
else: else:
checked = "" checked = ""
H.append( H.append(
'<td><input type="checkbox" name="abslist:list" value="%s" %s onclick="on_toggled(this, \'%s\', \'%s\')"/></td>' '<td><a title=%s><input type="checkbox" name="abslist:list" value="%s" %s onclick="on_toggled(this, \'%s\', \'%s\')"/></a></td>'
% (etudid + ":" + date + ":" + "pm", checked, etudid, date + ":pm") % (
bulle_pm,
etudid + ":" + date + ":" + "pm",
checked,
etudid,
date + ":pm",
)
) )
H.append("</tr>") H.append("</tr>")
H.append("</table>") H.append("</table>")