## -*- coding: utf_8 -*- <% from fcp import fcpdefs from fcutils import util from fcp import mlitem from fcws.fcweb import webutil from extension import clib import os.path import json sessionObject = client.FindServerObjectByObjID(fcpdefs.SESSIONDATAOBJID) myMLItem = fcp.MyMLItem thisWebID = myMLItem.WebID() readwrite = True if fcp.rights & 0x0020 is 32 else False disabled = "" if readwrite else "disabled" #used for disabling certain html elements on page EISdisabled = "disabled" if (disabled and myMLItem.IsExternalObject()) else "" jsonStr = fcp.MeAsJSON() iconID = myMLItem.IconID() parentID = myMLItem.ParentWebID() threadID = util.binToString(myMLItem.GetField(fcpdefs.dThreadID,''), False)[0] if myMLItem.IsExternalObject(): creatorCID = myMLItem.GetField(fcpdefs.dEISCreatorCID,0) isExternal = 1 else: creatorCID = myMLItem.GetField(fcpdefs.lCreatorCID,0) isExternal = 0 categoryList ="Afspraken;Bijzondere vrije dagen;Conferenties;Contactpersonen;Feestdagen;Lezingen;Opleidingen;Reizen;Samenkomsten;Sport;Trainingen;Vakantie;Verjaardagen;Vrije tijd".split(';') mtgDescription = webutil.stripNone(fcp, fcpdefs.dSubject) windowTitle = mtgDescription if mtgDescription != "" else myMLItem.EscapedName() if myMLItem.EscapedName() != "" else " " mtgDuration = fcp.GetEscapedFormField(fcpdefs.mtgDuration)[1] if mtgDuration is None: mtgDuration = 0 mtgLocation = fcp.GetEscapedFormField(fcpdefs.mtgLocation)[1] mtgAlarm = fcp.GetEscapedFormField(fcpdefs.mtgAlarm)[1] if mtgAlarm is None: mtgAlarm = 0 mtgAlarmTimeBefore = fcp.GetEscapedFormField(fcpdefs.mtgAlarmTimeBefore)[1] if mtgAlarmTimeBefore is None: mtgAlarmTimeBefore = 0 #mtgTimeZone is: 0 on existing event when not set; None on a new event mtgTimeZone = fcp.GetEscapedFormField(fcpdefs.mtgTimeZone)[1] clientTZ = client.clientTZ serverTZ = sessionObject.GetEscapedFormField(fcpdefs.serverTimeZone)[1] if serverTZ is None or serverTZ == 0: serverTZ = mtgTimeZone = clientTZ = 0 else: if clientTZ == 0 or clientTZ is None: clientTZ = serverTZ if mtgTimeZone == 0: mtgTimeZone = serverTZ elif mtgTimeZone is None: mtgTimeZone = clientTZ mtgStartDate = fcp.GetEscapedFormField(fcpdefs.mtgStartDate)[1] if mtgStartDate is not None: mtgStartDate = mtgStartDate & 0xFFFFFFFF if (serverTZ != clientTZ): clientStartTime = clib.ConvertTime(mtgStartDate,serverTZ,clientTZ) else: clientStartTime = mtgStartDate if ( serverTZ != mtgTimeZone ): meetingStartTime = clib.ConvertTime(mtgStartDate,serverTZ,mtgTimeZone) else: meetingStartTime = mtgStartDate else: mtgStartDate = clientStartTime = meetingStartTime = 0 mtgEndTime = fcp.GetEscapedFormField(fcpdefs.mtgEndTime)[1] if mtgEndTime is not None: mtgEndTime = mtgEndTime & 0xFFFFFFFF if (serverTZ != clientTZ): clientEndTime = clib.ConvertTime(mtgEndTime,serverTZ,clientTZ) else: clientEndTime = mtgEndTime if ( serverTZ != mtgTimeZone ): meetingEndTime = clib.ConvertTime(mtgEndTime,serverTZ,mtgTimeZone) else: meetingEndTime = mtgEndTime else: mtgEndTime = clientEndTime = meetingEndTime = mtgStartDate + mtgDuration msgOptions = fcp.GetEscapedFormField(fcpdefs.dMsgOptions)[1] visibility = msgOptions & 0x1C00 priority = msgOptions & 0xE000 msgOptions = msgOptions - visibility - priority visibility = visibility / 0x400 priority = priority / 0x2000 mtgColour = fcp.GetEscapedFormField(fcpdefs.mtgColour)[1] if mtgColour is None or mtgColour == 0: mtgColour = "#FFFFFF"; else: mtgColour = mtgColour & 0xFFFFFFFF mtgColour = "#%06X" % (mtgColour>>8) mtgRepeatCustom1 = fcp.GetEscapedFormField(fcpdefs.mtgRepeatCustom1)[1] if mtgRepeatCustom1 is None: mtgRepeatCustom1 = 1 mtgRepeatCustom2 = fcp.GetEscapedFormField(fcpdefs.mtgRepeatCustom2)[1] if mtgRepeatCustom2 is None: mtgRepeatCustom2 = 0 mtgRepeatType = fcp.GetEscapedFormField(fcpdefs.mtgRepeatType)[1] if mtgRepeatType is None: mtgRepeatType = fcpdefs.mtgRepeatTypeNone elif mtgRepeatType is fcpdefs.mtgRepeatTypeDaily: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomDaily mtgRepeatCustom1 = 1 mtgRepeatCustom2 = 0 elif mtgRepeatType is fcpdefs.mtgRepeatTypeWeekly: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomWeekly mtgRepeatCustom1 = 1 mtgRepeatCustom2 = 0 elif mtgRepeatType is fcpdefs.mtgRepeatTypeMonthly: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomMonthly mtgRepeatCustom1 = 1 mtgRepeatCustom2 = 0 elif mtgRepeatType is fcpdefs.mtgRepeatTypeYearly: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomYearly mtgRepeatCustom1 = 1 mtgRepeatCustom2 = 0 elif mtgRepeatType is fcpdefs.mtgRepeatTypeWeekdays: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomDaily mtgRepeatCustom2 = 1 elif mtgRepeatType is fcpdefs.mtgRepeatTypeWeekends: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomDaily mtgRepeatCustom2 = 2 elif mtgRepeatType is fcpdefs.mtgRepeatTypeBiWeekly: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomWeekly mtgRepeatCustom1 = 2 elif mtgRepeatType is fcpdefs.mtgRepeatTypeBiMonthly: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomMonthly mtgRepeatCustom1 = 2 elif mtgRepeatType is fcpdefs.mtgRepeatTypeQuarterly: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomMonthly mtgRepeatCustom1 = 3 elif mtgRepeatType is fcpdefs.mtgRepeatTypeMonthlySameDay: mtgRepeatType = fcpdefs.mtgRepeatTypeCustomMonthly mtgRepeatCustom2 = 1 mtgRepeatUntil = fcp.GetEscapedFormField(fcpdefs.mtgRepeatUntil)[1] if mtgRepeatUntil is not None: mtgRepeatUntil = mtgRepeatUntil & 0xFFFFFFFF if ( serverTZ != mtgTimeZone ): mtgRepeatUntil = clib.ConvertTime(mtgRepeatUntil,serverTZ,mtgTimeZone) toNames = fcp.GetMsgNameList(fcpdefs.dToName) numParticipants = len(toNames) if toNames else 0 ccNames = fcp.GetMsgNameList(fcpdefs.dCopyName) numCCParticipants = len(ccNames) if ccNames else 0 fromNames = fcp.GetMsgNameList(fcpdefs.dFromName) numFromNames = len(fromNames) if fromNames else 0 fromName = fromNames[0].EscapedName() if fromNames and fromNames[0] is not None else "" fwdNames = fcp.GetMsgNameList(fcpdefs.dFwdNames) numFwdNames = len(fwdNames) if fwdNames else 0 shortInfoStatus = myMLItem.Status() protected = shortInfoStatus & fcpdefs.Protected mtgRSVP = fcp.GetEscapedFormField(fcpdefs.mtgRSVP)[1] if mtgRSVP is None: mtgRSVP = 0 mtgIconID = 'fcfid-' + str(fcpdefs.dbIconID) mtgDescriptionID = 'fcfid-'+str(fcpdefs.dSubject) mtgLocationID ='fcfid-'+str(fcpdefs.mtgLocation) mtgCategoryID = 'fcfid-'+str(fcpdefs.mtgCategory) mtgStartDateID = 'fcfid-'+str(fcpdefs.mtgStartDate) mtgEndTimeID = 'fcfid-'+str(fcpdefs.mtgEndTime) mtgDurationID = 'fcfid-'+str(fcpdefs.mtgDuration) mtgBusyTimeID = 'fcfid-'+str(fcpdefs.mtgBusyTime) mtgColorID = 'fcfid-'+str(fcpdefs.mtgColour) mtgTimeZoneID = 'fcfid-'+str(fcpdefs.mtgTimeZone) mtgRepeatTypeID = 'fcfid-'+str(fcpdefs.mtgRepeatType) mtgRepeatUntilID = 'fcfid-'+str(fcpdefs.mtgRepeatUntil) toNameID = 'fcfid-'+str(fcpdefs.dToName) ccNameID = 'fcfid-'+str(fcpdefs.dCopyName) mtgAlarmID = 'fcfid-'+str(fcpdefs.mtgAlarm) mtgAlarmTimeBeforeID = 'fcfid-'+str(fcpdefs.mtgAlarmTimeBefore) mtgRepeatCustom1ID = 'fcfid-'+str(fcpdefs.mtgRepeatCustom1) mtgRepeatCustom2ID = 'fcfid-'+str(fcpdefs.mtgRepeatCustom2) mtgSchedulerDateID = 'fcfid-'+str(fcpdefs.mtgSchedulerDate) repeat_year_nID = 'fcfid-'+str(fcpdefs.REPEAT_YEAR_N) repeat_month_same_weekdayID = 'fcfid-'+str(fcpdefs.REPEAT_MONTH_SAME_WEEKDAY) repeat_year_same_weekdayID = 'fcfid-'+str(fcpdefs.REPEAT_YEAR_SAME_WEEKDAY) repeat_minute_nID = 'fcfid-'+str(fcpdefs.REPEAT_MINUTE_N) repeat_week_nID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_N) repeat_week_sundayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_SUNDAY) repeat_week_mondayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_MONDAY) repeat_week_tuesdayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_TUESDAY) repeat_week_wednesdayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_WEDNESDAY) repeat_week_thursdayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_THURSDAY) repeat_week_fridayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_FRIDAY) repeat_week_saturdayID = 'fcfid-'+str(fcpdefs.REPEAT_WEEK_SATURDAY) repeat_day_groupID = 'fcfid-'+str(fcpdefs.REPEAT_DAY_GROUP) repeat_month_nID = 'fcfid-'+str(fcpdefs.REPEAT_MONTH_N) repeat_hour_nID = 'fcfid-'+str(fcpdefs.REPEAT_HOUR_N) repeat_day_nID = 'fcfid-'+str(fcpdefs.REPEAT_DAY_N) jsonStrLen = len(jsonStr) jsonStr = jsonStr[0:jsonStrLen-1] if mtgDuration is None: mtgDurationInitVal = "None" else: mtgDurationInitVal = mtgDuration endif if mtgRepeatUntil is None: mtgRepeatUntilInitVal = "None" else: mtgRepeatUntilInitVal = mtgRepeatUntil endif calInitForm = { "clientStartTime":clientStartTime, "mtgStartDate":mtgStartDate, "meetingStartTime":meetingStartTime, "mtgTimeZone":mtgTimeZone, "clientTZ":clientTZ, "serverTZ":serverTZ, "clientEndTime":clientEndTime, "meetingEndTime":meetingEndTime, "mtgDuration":mtgDurationInitVal, "mtgAlarm":mtgAlarm, "mtgAlarmTimeBefore":mtgAlarmTimeBefore, "mtgRepeatType":mtgRepeatType, "mtgRepeatUntil":mtgRepeatUntilInitVal, "msgOptions":msgOptions, "threadID":str(threadID), "iconID":iconID, "fcpRetCode":client.fcpRetCode, "creatorCID":creatorCID, "isExternal":isExternal } calInitFormJsonStr = json.dumps(calInitForm) jsonStr = jsonStr+',"FCCalInitForm":'+calInitFormJsonStr+'}' %>
  %if readwrite: %endif

Gebeurtenis
U bent uitgenodigd voor deze gebeurtenis door: %if numFromNames > 0: %for i in range(len(fromNames)): %if fromNames[i].DirAttributes() & 0x00008000: %else: %endif >16)}.png"/> ${fromNames[i].EscapedName()} %endfor %endif %if numFwdNames > 0: %for i in range(len(fwdNames)): %if fwdNames[i].DirAttributes() & 0x00008000: %else: %endif >16)}.png"/> ${fwdNames[i].EscapedName()} %endfor %endif
%if readwrite: %else: ${mtgDescription} %endif
%if readwrite or (mtgLocation is not None and mtgLocation != ''):
%if readwrite: %else: ${webutil.stripNone(fcp, fcpdefs.mtgLocation)} %endif
%endif
%if serverTZ != 0:
%else: %endif
Mijn herinneringen:
Geen
Tijd voor gebeurtenis:    
%if not readwrite and not protected:
%if not EISdisabled:
%endif
%endif
Deelnemers/Planning

%for i in range(9,13): %endfor %for i in range(1,7): %endfor %for i in range(22): %endfor
${i}${i}
Personen:
${fromName}
%for i in range(22): %endfor
Deelnemers toevoegen:
%if numParticipants >0: %for i in range(len(toNames)): %endfor %endif %if not disabled: %endif
>16)}.png"/> ${toNames[i].EscapedName()} %if not disabled: X %endif
%for j in range(22): %endfor


Bronnen:

    %if numCCParticipants >0: %for i in range(len(ccNames)):
  • >16)}.png"/> ${ccNames[i].EscapedName()} %if not disabled: X %endif
    %for j in range(22): %endfor
  • %endfor %endif %if not disabled:
  • %endif


Gebeurtenis
Bezig
Afweging
Kan niet uitnodigen
Conflict
Kan geen bezette tijden zien
Notities
%if readwrite:
%else:
%endif
Bijlagen

%if readwrite:
%else:
%endif
    Herhaal