def eventDetails(cls, conf): return """ Event details: <table style="border-spacing: 10px 10px;"> <tr> <td style="vertical-align: top; white-space : nowrap;"> <strong>Event name:</strong> </td> <td> <a href="%s">%s</a> </td </tr> <tr> <td style="vertical-align: top; white-space : nowrap;"> <strong>Event dates:</strong> </td> <td> %s </td </tr> <tr> <td style="vertical-align: top; white-space : nowrap;"> <strong>Event id</strong> </td> <td> %s </td </tr> %s </table> """ % ( urlHandlers.UHConferenceDisplay.getURL(conf), conf.getTitle(), formatTwoDates(conf.getStartDate(), conf.getEndDate(), tz=conf.getTimezone(), showWeek=True), conf.getId(), MailTools.eventRoomDetails(conf), )
def eventDetails(cls, conf): return """ Event details: <table style="border-spacing: 10px 10px;"> <tr> <td style="vertical-align: top; white-space : nowrap;"> <strong>Event name:</strong> </td> <td> <a href="%s">%s</a> </td </tr> <tr> <td style="vertical-align: top; white-space : nowrap;"> <strong>Event dates:</strong> </td> <td> %s </td </tr> <tr> <td style="vertical-align: top; white-space : nowrap;"> <strong>Event id</strong> </td> <td> %s </td </tr> %s </table> """ % (urlHandlers.UHConferenceDisplay.getURL(conf), conf.getTitle(), formatTwoDates( conf.getStartDate(), conf.getEndDate(), tz=conf.getTimezone(), showWeek=True), conf.getId(), MailTools.eventRoomDetails(conf))
def getVars(self): vars = wcomponents.WTemplated.getVars(self) agreement_name = CollaborationTools.getOptionValue("RecordingRequest", "AgreementName") manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId()) for sw in manager.getSpeakerWrapperList(): if sw.getUniqueIdHash() == self.authKey: self.spkWrapper = sw if self.spkWrapper: speaker = self.spkWrapper.getObject() vars['speaker'] = speaker vars['conf'] = self._conf if self.spkWrapper.getStatus() in [SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE, SpeakerStatusEnum.REFUSED]: vars['error'] = 'Already Submitted' if self.spkWrapper.getStatus() == SpeakerStatusEnum.SIGNED: dtagree = self.spkWrapper.getDateAgreementSigned() vars['outcomeText'] = _("You have already submitted your electronic agreement, it appears that you accepted it on <strong>%s</strong>.") % format_datetime(dtagree) elif self.spkWrapper.getStatus() == SpeakerStatusEnum.REFUSED: vars['outcomeText'] = _("You have already submitted your electronic agreement, it appears that you refused it.") else: vars['outcomeText'] = _("The organizer has already uploaded a scanned copy of {0}. No electronic signature is needed.").format( CollaborationTools.getOptionValue("RecordingRequest", "AgreementName")) else: vars['error'] = None vars['authKey'] = self.authKey if self._conf.getType() == 'simple_event': # if it's a lecture we consider the _conf object as the normal # contribution and trigger a flag, in order to not print # contributions detail... showContributionInfo = False cont = self._conf else: showContributionInfo = True cont = self._conf.getContributionById(self.spkWrapper.getContId()) vars['cont'] = cont vars['showContributionInfo'] = self.authKey location = cont.getLocation() room = cont.getRoom() if location and location.getName() and location.getName().strip(): locationText = location.getName().strip() if room and room.getName() and room.getName().strip(): locationText += ". " + _("Room: %s" % room.getName().strip()) else: locationText += " " + _("(room not defined)") else: locationText = _("location/room not defined") vars['locationText'] = locationText tz = self._conf.getTimezone() vars['confDate'] = "%s (%s)" % (formatTwoDates(self._conf.getStartDate(), self._conf.getEndDate(), tz = tz, showWeek = True), tz) vars['contDate'] = "%s (%s)"%(formatTwoDates(cont.getStartDate(), cont.getEndDate(), tz = tz, showWeek = True), tz) vars['linkToEvent'] = urlHandlers.UHConferenceDisplay.getURL(self._conf) vars['agreementName'] = agreement_name else: vars['error'] = 'Error' return vars
def getVars(self): vars = wcomponents.WTemplated.getVars(self) manager = self._conf.getCSBookingManager() for sw in manager.getSpeakerWrapperList(): if sw.getUniqueIdHash() == self.authKey: self.spkWrapper = sw if self.spkWrapper: speaker = self.spkWrapper.getObject() vars['speaker'] = speaker vars['conf'] = self._conf if self.spkWrapper.getStatus() in [ SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE, SpeakerStatusEnum.REFUSED ]: vars['error'] = 'Already Submitted' if self.spkWrapper.getStatus() == SpeakerStatusEnum.SIGNED: dtagree = self.spkWrapper.getDateAgreementSigned() vars['outcomeText'] = _( "You have already submitted your electronic agreement, it appears that you accepted it on <strong>%s</strong>." ) % format_datetime(dtagree) else: vars['outcomeText'] = _( "You have already submitted your electronic agreement, it appears that you refused it." ) else: vars['error'] = None vars['authKey'] = self.authKey if self._conf.getType() == 'simple_event': # if it's a lecture we consider the _conf object as the normal # contribution and trigger a flag, in order to not print # contributions detail... showContributionInfo = False cont = self._conf else: showContributionInfo = True cont = self._conf.getContributionById( self.spkWrapper.getContId()) vars['cont'] = cont vars['showContributionInfo'] = self.authKey location = cont.getLocation() room = cont.getRoom() if location and location.getName() and location.getName( ).strip(): locationText = location.getName().strip() if room and room.getName() and room.getName().strip(): locationText += ". " + _( "Room: %s" % room.getName().strip()) else: locationText += " " + _("(room not defined)") else: locationText = _("location/room not defined") vars['locationText'] = locationText tz = self._conf.getTimezone() vars['confDate'] = "%s (%s)" % (formatTwoDates( self._conf.getStartDate(), self._conf.getEndDate(), tz=tz, showWeek=True), tz) vars['contDate'] = "%s (%s)" % (formatTwoDates( cont.getStartDate(), cont.getEndDate(), tz=tz, showWeek=True), tz) vars['linkToEvent'] = urlHandlers.UHConferenceDisplay.getURL( self._conf) vars['agreementName'] = CollaborationTools.getOptionValue( "RecordingRequest", "AgreementName") else: vars['error'] = 'Error' return vars