本文整理汇总了Python中MaKaC.plugins.Collaboration.base.WCSPageTemplateBase类的典型用法代码示例。如果您正苦于以下问题:Python WCSPageTemplateBase类的具体用法?Python WCSPageTemplateBase怎么用?Python WCSPageTemplateBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WCSPageTemplateBase类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, maxDate, previousTotal, newTotal, error=False, attainedDate=None):
WCSPageTemplateBase.__init__(self, None, "Vidyo", None)
self._maxDate = maxDate
self._previousTotal = previousTotal
self._newTotal = newTotal
self._error = error
self._attainedDate = attainedDate
示例2: getVars
def getVars(self):
vars = WCSPageTemplateBase.getVars(self)
vars["EventTitle"] = self._conf.getTitle()
vars["EventDescription"] = unescape_html(strip_ml_tags(self._conf.getDescription())).strip()
defaultStartDate = self._conf.getAdjustedStartDate() - timedelta(
0, 0, 0, 0, self._EVOOptions["defaultMinutesBefore"].getValue()
)
nowStartDate = getAdjustedDate(
nowutc() - timedelta(0, 0, 0, 0, self._EVOOptions["allowedPastMinutes"].getValue() / 2), self._conf
)
vars["DefaultStartDate"] = formatDateTime(max(defaultStartDate, nowStartDate))
defaultEndDate = self._conf.getAdjustedEndDate() + timedelta(
0, 0, 0, 0, self._EVOOptions["defaultMinutesAfter"].getValue()
)
nowEndDate = nowStartDate + timedelta(0, 0, 0, 0, self._EVOOptions["extraMinutesAfter"].getValue())
vars["DefaultEndDate"] = formatDateTime(max(defaultEndDate, nowEndDate))
communities = self._EVOOptions["communityList"].getValue() # a dict communityId : communityName
communityItems = communities.items() # a list of tuples (communityId, communityName)
communityItems.sort(key=lambda t: t[1]) # we sort by the second member of the tuple (the name)
vars["Communities"] = communityItems
return vars
示例3: getVars
def getVars(self):
vars = WCSPageTemplateBase.getVars( self )
resultGetOrphans = getOrphans()
if resultGetOrphans["success"] == True:
orphans = resultGetOrphans["result"]
else:
raise RecordingManagerException(resultGetOrphans["result"])
vars["Orphans"] = orphans
talks = getTalks(self._conf, sort = True)
vars["Talks"] = talks
vars["Conference"] = self._conf
previewURL = CollaborationTools.getOptionValue("RecordingManager", "micalaPreviewURL")
if self._rh.use_https():
previewURL = previewURL.replace("http","https")
vars["PreviewURL"] = previewURL
langPrimary = CollaborationTools.getOptionValue("RecordingManager", "languageCodePrimary")
langSecondary = CollaborationTools.getOptionValue("RecordingManager", "languageCodeSecondary")
langDict = CollaborationTools.getOptionValue("RecordingManager", "languageDictionary")
(vars["FlagLanguageDataOK"], vars["LanguageErrorMessages"]) = \
self._checkLanguageData(langPrimary, langSecondary, langDict)
vars["LanguageCodePrimary"] = langPrimary
vars["LanguageCodeSecondary"] = langSecondary
vars["LanguageDictionary"] = langDict
vars["LanguageCodes"] = sorted(CollaborationTools.getOptionValue("RecordingManager", "languageDictionary").keys())
return vars
示例4: getVars
def getVars(self):
variables = WCSPageTemplateBase.getVars(self)
variables["Booking"] = self._booking
variables["PhoneNumbers"] = getVidyoOptionValue("phoneNumbers")
return variables
示例5: getVars
def getVars(self):
variables = WCSPageTemplateBase.getVars(self)
bookingClass = CollaborationTools.getCSBookingClass(self._pluginId)
variables["CanBeNotified"] = bookingClass._canBeNotifiedOfEventDateChanges
return variables
示例6: getVars
def getVars(self):
vars = WCSPageTemplateBase.getVars( self )
vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginId)._allowMultiple
vars["Conference"] = self._conf
isLecture = self._conf.getType() == 'simple_event'
vars["IsLecture"] = isLecture
underTheLimit = self._conf.getNumberOfContributions() <= self._RecordingRequestOptions["contributionLoadLimit"].getValue()
manager = self._conf.getCSBookingManager()
user = self._rh._getUser()
isManager = user.isAdmin() or RCCollaborationAdmin.hasRights(user=user) or RCCollaborationPluginAdmin.hasRights(user=user, plugins=['RecordingRequest'])
booking = manager.getSingleBooking('RecordingRequest')
initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose'
initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose)
vars["InitialChoose"] = initialChoose
vars["DisplayTalks"] = initialDisplay
vars["isManager"] = isManager
talks, rRoomFullNames, rRoomNames, recordingAbleTalks, recordingUnableTalks = getCommonTalkInformation(self._conf)
nRecordingCapable = len(recordingAbleTalks)
vars["HasRecordingCapableTalks"] = nRecordingCapable > 0
vars["NTalks"] = len(talks)
# list of "locationName:roomName" strings
vars["RecordingCapableRooms"] = rRoomFullNames
vars["NRecordingCapableContributions"] = nRecordingCapable
# we check if the event itself is recoring capable (depends on event's room)
confLocation = self._conf.getLocation()
confRoom = self._conf.getRoom()
if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in rRoomNames):
topLevelRecordingCapable = True
else:
topLevelRecordingCapable = False
# Finally, this event is recoring capable if the event itself
# or one of its talks are capable or user is admin, collaboration
# manager or recording plugin manager
vars["RecordingCapable"] = topLevelRecordingCapable or nRecordingCapable > 0 or isManager
recordingAbleTalks.sort(key = Contribution.contributionStartDateForSort)
talks.sort(key = Contribution.contributionStartDateForSort)
fossil_args = dict(tz=self._conf.getTimezone(),
units='(hours)_minutes',
truncate=True)
vars["Contributions"] = fossilize(talks, IContributionRRFossil, **fossil_args)
vars["ContributionsAble"] = fossilize(recordingAbleTalks, IContributionRRFossil, **fossil_args)
vars["ContributionsUnable"] = fossilize(recordingUnableTalks, IContributionRRFossil, **fossil_args)
vars["PostingUrgency"] = postingUrgency
vars["linkToEA"] = collaborationUrlHandlers.UHCollaborationElectronicAgreement.getURL(self._conf)
vars["agreementName"] = CollaborationTools.getOptionValue("RecordingRequest", "AgreementName")
return vars
示例7: getVars
def getVars(self):
vars = WCSPageTemplateBase.getVars( self )
vars["Booking"] = self._booking
vars["ListOfPhoneBridgeNumbersURL"] = getEVOOptionValueByName("phoneBridgeNumberList")
return vars
示例8: getVars
def getVars(self):
vars=WCSPageTemplateBase.getVars( self )
vars["Conference"] = self._conf
vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginName)._allowMultiple
isLecture = self._conf.getType() == 'simple_event'
vars["IsLecture"] = isLecture
underTheLimit = self._conf.getNumberOfContributions() <= self._WebcastRequestOptions["contributionLoadLimit"].getValue()
booking = self._conf.getCSBookingManager().getSingleBooking('WebcastRequest')
initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose'
initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose)
vars["DisplayTalks"] = initialDisplay
vars["InitialChoose"] = initialChoose
talks, webcastCapableRooms, webcastAbleTalks = getCommonTalkInformation(self._conf)
nTalks = len(talks)
nWebcastCapable = len(webcastAbleTalks)
vars["HasWebcastCapableTalks"] = nWebcastCapable > 0
vars["NTalks"] = nTalks
#list of "locationName:roomName" strings
vars["WebcastCapableRooms"] = webcastCapableRooms
vars["NWebcastCapableContributions"] = nWebcastCapable
#we see if the event itself is webcast capable (depends on event's room)
confLocation = self._conf.getLocation()
confRoom = self._conf.getRoom()
if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in webcastCapableRooms):
topLevelWebcastCapable = True
else:
topLevelWebcastCapable = False
#Finally, this event is webcast capable if the event itself or one of its talks are
vars["WebcastCapable"] = topLevelWebcastCapable or nWebcastCapable > 0
if initialDisplay:
webcastAbleTalks.sort(key = Contribution.contributionStartDateForSort)
vars["Contributions"] = fossilize(webcastAbleTalks, IContributionWithSpeakersFossil,
tz = self._conf.getTimezone(),
units = '(hours)_minutes',
truncate = True)
else:
vars["Contributions"] = []
vars["LectureOptions"] = lectureOptions
vars["TypesOfEvents"] = typeOfEvents
vars["PostingUrgency"] = postingUrgency
vars["WebcastPurpose"] = webcastPurpose
vars["IntendedAudience"] = intendedAudience
vars["SubjectMatter"] = subjectMatter
vars["ConsentFormURL"] = self._WebcastRequestOptions["ConsentFormURL"].getValue()
return vars
示例9: getVars
def getVars(self):
vars = WCSPageTemplateBase.getVars(self)
vars["EventTitle"] = self._conf.getTitle()
vars["EventDescription"] = unescape_html(strip_ml_tags(self._conf.getDescription())).strip()
vars["DefaultStartDate"] = formatDateTime(self._conf.getAdjustedStartDate())
vars["DefaultEndDate"] = formatDateTime(self._conf.getAdjustedEndDate())
vars["DefaultWebExUser"] = ""
vars["DefaultWebExPass"] = ""
vars["TimeZone"] = self._conf.getTimezone()
sessions = "<select name='session' id='session' onchange='updateSessionTimes()'><option value=''>None</option>"
count = 0
sessionList = self._conf.getSessionList()
for session in sessionList:
count = count + 1
sessions = sessions + "<option value='%s'>%s</option>" % (str(session.getId()), session.getTitle())
sessions += "</select>"
vars["SessionList"] = sessions
return vars
示例10: __init__
def __init__(self, booking, displayTz):
WCSPageTemplateBase.__init__(self, booking.getConference(), 'WebEx', None)
self._booking = booking
self._displayTz = displayTz
示例11: getVars
def getVars(self):
vars = WCSPageTemplateBase.getVars(self)
vars["Conference"] = self._conf
vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginId)._allowMultiple
isLecture = self._conf.getType() == "simple_event"
vars["IsLecture"] = isLecture
underTheLimit = (
self._conf.getNumberOfContributions() <= self._WebcastRequestOptions["contributionLoadLimit"].getValue()
)
manager = self._conf.getCSBookingManager()
user = self._rh._getUser()
isManager = (
user.isAdmin()
or RCCollaborationAdmin.hasRights(user=user)
or RCCollaborationPluginAdmin.hasRights(user=user, plugins=["WebcastRequest"])
)
booking = manager.getSingleBooking("WebcastRequest")
initialChoose = booking is not None and booking._bookingParams["talks"] == "choose"
initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (
booking is not None and initialChoose
)
vars["DisplayTalks"] = initialDisplay
vars["InitialChoose"] = initialChoose
vars["isManager"] = isManager
talks, wcRoomFullNames, wcRoomNames, webcastAbleTalks, webcastUnableTalks = getCommonTalkInformation(self._conf)
nWebcastCapable = len(webcastAbleTalks)
vars["HasWebcastCapableTalks"] = nWebcastCapable > 0
vars["NTalks"] = len(talks)
# list of "locationName:roomName" strings
vars["WebcastCapableRooms"] = wcRoomFullNames
vars["NWebcastCapableContributions"] = nWebcastCapable
# we see if the event itself is webcast capable (depends on event's room)
confLocation = self._conf.getLocation()
confRoom = self._conf.getRoom()
if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in wcRoomNames):
topLevelWebcastCapable = True
else:
topLevelWebcastCapable = False
# Finally, this event is webcast capable if the event itself or
# or one of its talks are capable or user is admin, collaboration
# manager or webcast plugin manager
vars["WebcastCapable"] = topLevelWebcastCapable or nWebcastCapable > 0 or isManager
if initialDisplay:
webcastAbleTalks.sort(key=Contribution.contributionStartDateForSort)
fossil_args = dict(tz=self._conf.getTimezone(), units="(hours)_minutes", truncate=True)
vars["Contributions"] = fossilize(talks, IContributionWRFossil, **fossil_args)
vars["ContributionsAble"] = fossilize(webcastAbleTalks, IContributionWRFossil, **fossil_args)
vars["ContributionsUnable"] = fossilize(webcastUnableTalks, IContributionWRFossil, **fossil_args)
else:
vars["Contributions"] = []
vars["ContributionsAble"] = []
vars["ContributionsUnable"] = []
vars["Audiences"] = CollaborationTools.getOptionValue("WebcastRequest", "webcastAudiences")
vars["linkToEA"] = collaborationUrlHandlers.UHCollaborationElectronicAgreement.getURL(self._conf)
vars["agreementName"] = CollaborationTools.getOptionValue("WebcastRequest", "AgreementName")
return vars