コード例 #1
0
ファイル: pages.py プロジェクト: vstitches/indico
    def getVars(self):
        variables = WCSPageTemplateBase.getVars(self)

        variables["EventTitle"] = VidyoTools.defaultRoomName(self._conf)
        variables["EventDescription"] = unescape_html(strip_ml_tags(self._conf.getDescription())).strip()

        return variables
コード例 #2
0
ファイル: pages.py プロジェクト: pferreir/indico-backup
    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
0
ファイル: pages.py プロジェクト: sylvestre/indico
    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
コード例 #4
0
ファイル: pages.py プロジェクト: pferreir/indico-backup
    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
コード例 #5
0
ファイル: pages.py プロジェクト: shirabe/indico
    def getVars(self):
        variables = WCSPageTemplateBase.getVars(self)

        variables["EventTitle"] = VidyoTools.defaultRoomName(self._conf)
        variables["EventDescription"] = unescape_html(
            strip_ml_tags(self._conf.getDescription())).strip()

        return variables
コード例 #6
0
ファイル: pages.py プロジェクト: lukasnellen/indico
    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["MinStartDate"] = formatDateTime(self._conf.getAdjustedStartDate())
        vars["MaxEndDate"] = formatDateTime(self._conf.getAdjustedEndDate())

        return vars
コード例 #7
0
ファイル: pages.py プロジェクト: VishrutMehta/indico
    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() - timedelta(0, 0, 0, 0, getCERNMCUOptionValueByName("defaultMinutesBefore")))
        vars["DefaultEndDate"] = formatDateTime(self._conf.getAdjustedEndDate() + timedelta(0, 0, 0, 0, getCERNMCUOptionValueByName("defaultMinutesAfter")))
        vars["MinStartDate"] = formatDateTime(self._conf.getAdjustedStartDate())
        vars["MaxEndDate"] = formatDateTime(self._conf.getAdjustedEndDate())

        return vars
コード例 #8
0
    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() - timedelta(0, 0, 0, 0, getCERNMCUOptionValueByName("defaultMinutesBefore")))
        vars["DefaultEndDate"] = formatDateTime(self._conf.getAdjustedEndDate() + timedelta(0, 0, 0, 0, getCERNMCUOptionValueByName("defaultMinutesAfter")))
        vars["MinStartDate"] = formatDateTime(self._conf.getAdjustedStartDate())
        vars["MaxEndDate"] = formatDateTime(self._conf.getAdjustedEndDate())

        return vars
コード例 #9
0
ファイル: pages.py プロジェクト: pferreir/indico-backup
    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