--- ECHO_content/ECHO_collection.py 2004/01/21 07:40:52 1.9 +++ ECHO_content/ECHO_collection.py 2004/01/27 13:33:27 1.11 @@ -8,7 +8,6 @@ class ECHO_resource contains information class ECHO_externalLink contains information on externalLinks - """ import string import OFS.Image @@ -116,7 +115,7 @@ def setECHO_CollectionInformation(self,c coords=[] #coordinates of for rectangles -<<<<<<< ECHO_collection.py + #print "cs", coordstrs if coordstrs: for coordstr in coordstrs: @@ -128,15 +127,7 @@ def setECHO_CollectionInformation(self,c #temco.append(angle) coords.append(temco) -======= - for coordstr in coordstrs: - try: - temco=coordstr.split(",") - except: - temco=[] - #temco.append(angle) - coords.append(temco) ->>>>>>> 1.8 + self.coords=coords[0:] @@ -247,11 +238,8 @@ class ECHO_resource(Folder): return pt() -<<<<<<< ECHO_collection.py - def changeECHO_resource(self,metalink,link,context,science,practice,source_type,period,title,label,description,content_type,responsible,weight,credits=None,coords=None,viewClassification=None,RESPONSE=None): -======= def changeECHO_resource(self,metalink,link,context,science,practice,source_type,period,title,label,description,content_type,responsible,credits,weight,viewClassification="",coords="",RESPONSE=None): ->>>>>>> 1.8 + """Änderung der Properties""" @@ -335,11 +323,9 @@ def manage_AddECHO_resourceForm(self): return pt() -<<<<<<< ECHO_collection.py + def manage_AddECHO_resource(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,link,metalink,credits,weight,coords=None,RESPONSE=None): -======= -def manage_AddECHO_resource(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,link,metalink,credits,weight,coords=[],RESPONSE=None): ->>>>>>> 1.8 + """nothing yet""" scientificClassificationObj=scientificClassification(context,science,practice) @@ -497,10 +483,12 @@ class ECHO_collection(Folder, Persistent def getCoords(self): try: - return [string.join(x,",") for x in self.coords] - + + x= [string.join(x,",") for x in self.coords] + return x except: + return [] def __init__(self,id,title,label,description,content_type,responsible,credits,weight,sortfield,coords): @@ -567,11 +555,9 @@ class ECHO_collection(Folder, Persistent security.declarePublic('changeECHO_Collection') -<<<<<<< ECHO_collection.py - def changeECHO_Collection(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,coords=[""],sortfield="weight",RESPONSE=None): -======= + def changeECHO_Collection(self,context,science,practice,source_type,period,id,title,label,description,content_type,responsible,credits,weight,sortfield="weight",coords="",RESPONSE=None): ->>>>>>> 1.8 + """Änderung der Properties""" #print "HI",coords @@ -604,6 +590,12 @@ class ECHO_collection(Folder, Persistent pt.content_type="text/html" return pt() + def getCredits(self): + """Ausgabe der credits""" + if self.credits: + return self.credits + else: + return [] def getGraphicCoords(self): """Give list of coordinates""" @@ -717,6 +709,7 @@ class ECHO_root(Folder,Persistent,Implic except: """nothing""" + return ids def getCollectionTree(self):