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
Exemple #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)
    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)
Exemple #5
0
 def _load_session_data(self):
     return [(session.getId(), escape(to_unicode(session.getTitle()))) for session in self._conf.getSessionList()]
Exemple #6
0
 def _load_session_data(self):
     return [(session.getId(), escape(to_unicode(session.getTitle()))) for session in self._conf.getSessionList()]