Пример #1
0
    def _mapFromParams(self, params):
        self.title = params.get("title", "").strip()
        self._otherFields = {}
        for f in self._afm.getFields():
            fid = f.getId()
            value = params.get("f_%s" % fid, "").strip()
            self._otherFields[fid] = value
        self.type = params.get("type", None)
        self.tracks = normaliseListParam(params.get("tracks", []))

        if self._displayValues:
            # the call comes from modifying an existing abstract, we want to display the current content in the abstract form
            self._prAuthorsListParam = params.get("prAuthors", [])
            self._coAuthorsListParam = params.get("coAuthors", [])
            self._setExistingAuthors()
        else:
            # the call comes from submitting a new abstract or modifying an existing abstract
            from MaKaC.services.interface.rpc import json
            self._prAuthorsListParam = json.decode(params.get("prAuthors", "[]"))
            self._coAuthorsListParam = json.decode(params.get("coAuthors", "[]"))
            self._setNewAuthors()
        self.comments = params.get("comments", "")
        self.origin = params.get("origin", "display")
        self.files = normaliseListParam(params.get("file", []))
        self.existingFiles = normaliseListParam(params.get("existingFile", []))
Пример #2
0
 def _checkParams( self, params ):
     RHConferenceBaseDisplay._checkParams( self, params )
     self._abstractIds = normaliseListParam( params.get("abstracts", []) )
     self._abstracts = []
     abMgr = self._conf.getAbstractMgr()
     for id in self._abstractIds:
         if abMgr.getAbstractById(id).canView(self._aw):
             self._abstracts.append(abMgr.getAbstractById(id))
Пример #3
0
 def _normaliseAuthorParams( self, params ):
     params["auth_id"]  = normaliseListParam( params.get("auth_id", []) )
     params["auth_title"]  = normaliseListParam( params.get("auth_title", []) )
     params["auth_firstName"]  = normaliseListParam( params.get("auth_firstName", []) )
     params["auth_surName"]  = normaliseListParam( params.get("auth_surName", []) )
     params["auth_affiliation"]       = normaliseListParam( params.get("auth_affiliation", []) )
     params["auth_email"]  = normaliseListParam( params.get("auth_email", []) )
     params["auth_phone"]  = normaliseListParam( params.get("auth_phone", []) )
     params["auth_address"]  = normaliseListParam( params.get("auth_address", []) )
     primaries  = normaliseListParam( params.get("auth_primary", []) )
     #params["auth_primary"] = normaliseListParam( params.get("auth_primary", []) )
     speakers = normaliseListParam( params.get("auth_speaker", []) )
     params["auth_primary"] = []
     params["auth_speaker"] = []
     for id in params["auth_id"]:
         params["auth_primary"].append( str(id) in primaries )
         params["auth_speaker"].append( str(id) in speakers)
Пример #4
0
 def _checkParams(self, params):
     RHConferenceBaseDisplay._checkParams(self, params)
     self._abstractIds = normaliseListParam(params.get("abstracts", []))
     self._abstracts = []
     abMgr = self._conf.getAbstractMgr()
     for id in self._abstractIds:
         if abMgr.getAbstractById(id).canView(self._aw):
             self._abstracts.append(abMgr.getAbstractById(id))
Пример #5
0
 def _mapFromParams( self, params ):
     self.title = params.get("title",  "").strip()
     self._otherFields = {}
     for f in self._afm.getFields():
         id = f.getId()
         self._otherFields[id] = params.get("f_%s"%id,"").strip()
     self.type = params.get("type", None)
     self.tracks = normaliseListParam( params.get("tracks", []) )
     self.authors = _AbstractAuthorList( params )
     self.comments = params.get("comments","")
Пример #6
0
 def _mapFromParams(self, params):
     self.title = params.get("title", "").strip()
     self._otherFields = {}
     for f in self._afm.getFields():
         id = f.getId()
         self._otherFields[id] = params.get("f_%s" % id, "").strip()
     self.type = params.get("type", None)
     self.tracks = normaliseListParam(params.get("tracks", []))
     self.authors = _AbstractAuthorList(params)
     self.comments = params.get("comments", "")
Пример #7
0
 def _normaliseAuthorParams(self, params):
     params["auth_id"] = normaliseListParam(params.get("auth_id", []))
     params["auth_title"] = normaliseListParam(params.get("auth_title", []))
     params["auth_firstName"] = normaliseListParam(
         params.get("auth_firstName", []))
     params["auth_surName"] = normaliseListParam(
         params.get("auth_surName", []))
     params["auth_affiliation"] = normaliseListParam(
         params.get("auth_affiliation", []))
     params["auth_email"] = normaliseListParam(params.get("auth_email", []))
     params["auth_phone"] = normaliseListParam(params.get("auth_phone", []))
     params["auth_address"] = normaliseListParam(
         params.get("auth_address", []))
     primaries = normaliseListParam(params.get("auth_primary", []))
     #params["auth_primary"] = normaliseListParam( params.get("auth_primary", []) )
     speakers = normaliseListParam(params.get("auth_speaker", []))
     params["auth_primary"] = []
     params["auth_speaker"] = []
     for id in params["auth_id"]:
         params["auth_primary"].append(str(id) in primaries)
         params["auth_speaker"].append(str(id) in speakers)