--- ECHO_content/ECHO_collection.py 2004/05/07 14:51:02 1.65 +++ ECHO_content/ECHO_collection.py 2004/05/07 16:52:04 1.69 @@ -598,9 +598,15 @@ class ECHO_collection(Folder, Persistent """ECHO Collection""" security=ClassSecurityInfo() meta_type='ECHO_collection' - + viewClassificationList=viewClassificationListMaster displayTypes=displayTypes - + + def getViewClassification(self): + if hasattr(self,'viewClassification'): + return self.viewClassification + else: + return "" + def getTitle(self): """title""" return self.title.encode('utf-8') @@ -837,13 +843,14 @@ class ECHO_collection(Folder, Persistent else: return "#dddddd" - def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour=""): + def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",viewClassification=None): """Änderung der Properties""" self.secondaryLink=secondaryLink self.secondaryLinkTitle=secondaryLinkTitle self.imageTag=imageTag self.bgcolour=bgcolour + self.viewClassification=viewClassification if coords: coordsnew=[ string.split(x,",") for x in coords] @@ -920,26 +927,22 @@ class ECHO_collection(Folder, Persistent def getGraphicCoords(self): """Give list of coordinates""" - subColTypes=['ECHO_collection','ECHO_externalLink','ECHO_resource'] + subColTypes=['ECHO_collection','ECHO_resource'] ids=[] - for entry in self.__dict__.keys(): - object=getattr(self,entry) - try: - if object.meta_type in subColTypes: - for coordtemp in object.coords: - if len(coordtemp)>3: - coord=coordtemp[0:4] - label="" - if hasattr(object,'label') and not object.label=="": - label=object.label - elif hasattr(object,'title') and not object.title=="": - label=object.title - else: - label=object.getId() - ids.append([string.join(coord,", "),object.getId(),label,object,coordtemp,object.getViewClassification()]) - except: - """nothing""" - + for entrySearch in self.ZopeFind(self,obj_metatypes=subColTypes): + object=entrySearch[1] + if hasattr(object,'coords'): + for coordtemp in object.coords: + if len(coordtemp)>3: + coord=coordtemp[0:4] + label="" + if hasattr(object,'label') and not object.label=="": + label=object.label + elif hasattr(object,'title') and not object.title=="": + label=object.title + else: + label=object.getId() + ids.append([string.join(coord,", "),object.getId(),label,object,coordtemp,object.viewClassification]) return ids