version 1.39, 2004/04/14 23:45:58
|
version 1.42, 2004/04/16 10:12:15
|
Line 34 import xml.dom.minidom
|
Line 34 import xml.dom.minidom
|
import urllib |
import urllib |
import xml.dom.minidom |
import xml.dom.minidom |
from ECHO_graphicalOverview import javaHandler,javaScriptMain |
from ECHO_graphicalOverview import javaHandler,javaScriptMain |
|
import ECHO_helpers |
|
|
#List of different types for the graphical linking viewer |
#List of different types for the graphical linking viewer |
viewClassificationListMaster=['view point','area'] |
viewClassificationListMaster=['view point','area'] |
Line 264 class ECHO_resource(Folder):
|
Line 265 class ECHO_resource(Folder):
|
|
|
viewClassificationList=viewClassificationListMaster |
viewClassificationList=viewClassificationListMaster |
|
|
|
getSubCols = ECHO_helpers.getSubCols |
|
|
def content_html(self): |
def content_html(self): |
"""template fuer content""" |
"""template fuer content""" |
return content_html(self,'resource') |
return content_html(self,'resource') |
Line 560 class ECHO_collection(Folder, Persistent
|
Line 563 class ECHO_collection(Folder, Persistent
|
for entry in object.__dict__.keys(): |
for entry in object.__dict__.keys(): |
element=getattr(object,entry) |
element=getattr(object,entry) |
try: |
try: |
if element.meta_type=="ECHO_collection": |
if element.meta_type in ["ECHO_collection","ECHO_group"]: |
collections+="<element name=\""+element.title+"\" url=\""+element.absolute_url()+"\">" |
collections+="<element name=\""+element.title+"\" url=\""+element.absolute_url()+"\">" |
collections+=getCollection(element,depth)+"</element>\n" |
collections+=getCollection(element,depth)+"</element>\n" |
except: |
except: |
Line 740 class ECHO_collection(Folder, Persistent
|
Line 743 class ECHO_collection(Folder, Persistent
|
|
|
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew) |
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew) |
|
|
|
self.coords=coordsnew[0:] # HACK fehler in setECHO_collection |
|
|
self.sortfield=sortfield |
self.sortfield=sortfield |
|
|
Line 812 class ECHO_collection(Folder, Persistent
|
Line 815 class ECHO_collection(Folder, Persistent
|
|
|
return ids |
return ids |
|
|
def getSubCols(self,sortfield="weight"): |
|
|
|
subColTypes=['ECHO_collection','ECHO_externalLink','ECHO_resource'] |
|
ids=[] |
|
for entry in self.__dict__.keys(): |
|
object=getattr(self,entry) |
|
try: |
|
if object.meta_type in subColTypes: |
|
ids.append(object) |
|
|
|
except: |
|
"""nothing""" |
|
try: |
|
sortfield=self.sortfield |
|
except: |
|
"""nothing""" |
|
|
|
tmplist=[] |
|
for x in ids: |
|
if hasattr(x,sortfield): |
|
try: |
|
x=int(x) |
|
except: |
|
"""nothing""" |
|
tmp=getattr(x,sortfield) |
|
else: |
|
tmp=10000000 |
|
tmplist.append((tmp,x)) |
|
tmplist.sort() |
|
return [x for (key,x) in tmplist] |
|
|
|
|
|
|
getSubCols = ECHO_helpers.getSubCols |
|
|
|
|
|
|
Line 913 class ECHO_group(ECHO_collection):
|
Line 888 class ECHO_group(ECHO_collection):
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
def getLogo(self): |
|
"""logo ausgeben""" |
|
return "ECHO_groups" |
|
|
def content_html(self): |
def content_html(self): |
"""template fuer content""" |
"""template fuer content""" |
return content_html(self,'group') |
return content_html(self,'group') |