示例#1
0
    def _resetFilters( self, sessionData ):
        """
        Brings the filter data to a consistent state (websession),
        marking everything as "checked"
        """

        regForm = self._conf.getRegistrationForm()
        accommTypes = regForm.getAccommodationForm().getAccommodationTypesList()
        sessionData["accomm"] = map(lambda accom: accom.getId(),
                                    accommTypes)

        lstatuses = []
        for st in regForm.getStatusesList():
            lstatuses.append(st.getCaption() + st.getId() + "-NoValue")
            for stInt in st.getStatusValues():
                lstatuses.append(st.getCaption() + st.getId() + "-" +
                                 st.getStatusValues()[stInt].getCaption())
        sessionData["statuses"] = lstatuses

        sessTypes = regForm.getSessionsForm().getSessionList()
        sessionData["session"] = map(lambda session: session.getId(), sessTypes)

        socialEvents = regForm.getSocialEventForm().getSocialEventList()
        sessionData["event"] = map(lambda event: event.getId(), socialEvents)

        # By default, check '--none--'
        sessionData["accommShowNoValue"] = True
        sessionData["sessionShowNoValue"] = True
        sessionData["eventShowNoValue"] = True

        return sessionData
示例#2
0
    def _resetFilters(self, sessionData):
        """
        Brings the filter data to a consistent state (websession),
        marking everything as "checked"
        """

        regForm = self._conf.getRegistrationForm()
        accommTypes = regForm.getAccommodationForm().getAccommodationTypesList(
        )
        sessionData["accomm"] = map(lambda accom: accom.getId(), accommTypes)

        lstatuses = []
        for st in regForm.getStatusesList():
            lstatuses.append(st.getCaption() + st.getId() + "-NoValue")
            for stInt in st.getStatusValues():
                lstatuses.append(st.getCaption() + st.getId() + "-" +
                                 st.getStatusValues()[stInt].getCaption())
        sessionData["statuses"] = lstatuses

        sessTypes = regForm.getSessionsForm().getSessionList()
        sessionData["session"] = map(lambda session: session.getId(),
                                     sessTypes)

        socialEvents = regForm.getSocialEventForm().getSocialEventList()
        sessionData["event"] = map(lambda event: event.getId(), socialEvents)

        # By default, check '--none--'
        sessionData["accommShowNoValue"] = True
        sessionData["sessionShowNoValue"] = True
        sessionData["eventShowNoValue"] = True

        return sessionData
    def create_filter(conf, params, filterUsed=False):
        filter = {"hide_withdrawn": True}
        ltypes = ltracks = lsessions = []
        if not filterUsed:
            for type in conf.getContribTypeList():
                ltypes.append( type.getId() )
            for track in conf.getTrackList():
                ltracks.append( track.getId() )
            for session in conf.getSessionList():
                lsessions.append( session.getId() )

        filter["type"] = params.get("selTypes", ltypes)
        filter["track"] = params.get("selTracks", ltracks)
        filter["session"] = params.get("selSessions", lsessions)
        return ContributionsFilterCrit(conf,filter)
示例#4
0
    def create_filter(conf, params, filterUsed=False):
        filter = {"hide_withdrawn": True}
        ltypes = ltracks = lsessions = []
        if not filterUsed:
            for type in conf.getContribTypeList():
                ltypes.append( type.getId() )
            for track in conf.getTrackList():
                ltracks.append( track.getId() )
            for session in conf.getSessionList():
                lsessions.append( session.getId() )

        filter["type"] = params.get("selTypes", ltypes)
        filter["track"] = params.get("selTracks", ltracks)
        filter["session"] = params.get("selSessions", lsessions)
        return ContributionsFilterCrit(conf,filter)
示例#5
0
 def _load_session_data(self):
     return [(session.getId(), escape(to_unicode(session.getTitle()))) for session in self._conf.getSessionList()]
示例#6
0
 def _load_session_data(self):
     return [(session.getId(), escape(to_unicode(session.getTitle()))) for session in self._conf.getSessionList()]