version 1.23, 2004/03/30 19:12:22
|
version 1.24, 2004/04/02 07:56:26
|
Line 421 def manage_addECHO_externalLink(self,id,
|
Line 421 def manage_addECHO_externalLink(self,id,
|
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
|
|
|
class ECHO_collection(Folder, Persistent, Implicit): |
class ECHO_collection(Folder, Persistent, Implicit): |
"""ECHO Collection""" |
"""ECHO Collection""" |
security=ClassSecurityInfo() |
security=ClassSecurityInfo() |
meta_type='ECHO_collection' |
meta_type='ECHO_collection' |
|
|
|
def addResource(self,id,title,label,description,content_type,responsible,link,metalink,weight,credits=None,coords=None,RESPONSE=None): |
|
"""SSS""" |
|
try: |
|
manage_addECHO_resource(self,id,title,label,description,content_type,responsible,link,metalink,weight,credits=None,coords=None,RESPONSE=None) |
|
return "done" |
|
except: |
|
return None |
|
|
|
def getCollectionTreeXML(self): |
|
"""Tree as XML""" |
|
|
|
def getCollection(object,depth=0): |
|
depth+=1 |
|
collections="" |
|
for entry in object.__dict__.keys(): |
|
element=getattr(object,entry) |
|
try: |
|
if element.meta_type=="ECHO_collection": |
|
collections+="<element name=\""+element.title+"\" url=\""+element.absolute_url()+"\">" |
|
collections+=getCollection(element,depth)+"</element>\n" |
|
except: |
|
"""nothing""" |
|
return collections |
|
|
|
|
|
return "<collection>"+getCollection(self)+"</collection>" |
|
|
def createJavaScript(self): |
def createJavaScript(self): |
"""CreateJava""" |
"""CreateJava""" |
ret=javaScriptMain |
ret=javaScriptMain |
Line 809 class ECHO_root(Folder,Persistent,Implic
|
Line 837 class ECHO_root(Folder,Persistent,Implic
|
ids=[] # no partners |
ids=[] # no partners |
return ids |
return ids |
|
|
|
|
|
|
|
|
def getCollectionTree(self): |
def getCollectionTree(self): |
"""get the collection tree (list of triples (parent,child, depth)""" |
"""get the collection tree (list of triples (parent,child, depth)""" |
|
|