version 1.43, 2004/04/16 10:24:09
|
version 1.48, 2004/04/18 19:40:13
|
Line 266 class ECHO_resource(Folder):
|
Line 266 class ECHO_resource(Folder):
|
viewClassificationList=viewClassificationListMaster |
viewClassificationList=viewClassificationListMaster |
|
|
getSubCols = ECHO_helpers.getSubCols |
getSubCols = ECHO_helpers.getSubCols |
|
def getTitle(self): |
|
"""title""" |
|
return self.title.encode('utf-8') |
|
|
|
def getLabel(self): |
|
"""title""" |
|
return self.label.encode('utf-8') |
|
|
def content_html(self): |
def content_html(self): |
"""template fuer content""" |
"""template fuer content""" |
Line 436 class ECHO_externalLink(Folder):
|
Line 443 class ECHO_externalLink(Folder):
|
security=ClassSecurityInfo() |
security=ClassSecurityInfo() |
meta_type='ECHO_externalLink' |
meta_type='ECHO_externalLink' |
|
|
|
def getTitle(self): |
|
"""title""" |
|
return self.title.encode('utf-8') |
|
|
|
def getLabel(self): |
|
"""title""" |
|
return self.label.encode('utf-8') |
|
|
def content_html(self): |
def content_html(self): |
"""template fuer content""" |
"""template fuer content""" |
return content_html(self,'externalLink') |
return content_html(self,'externalLink') |
Line 525 class ECHO_collection(Folder, Persistent
|
Line 540 class ECHO_collection(Folder, Persistent
|
security=ClassSecurityInfo() |
security=ClassSecurityInfo() |
meta_type='ECHO_collection' |
meta_type='ECHO_collection' |
|
|
|
def getTitle(self): |
|
"""title""" |
|
return self.title.encode('utf-8') |
|
|
|
def getLabel(self): |
|
"""title""" |
|
return self.label.encode('utf-8') |
|
|
|
def createRessourcesFromXMLForm(self): |
|
"""form""" |
|
pt=PageTemplateFile('Products/ECHO_content/zpt/createRessourcesFromXMLForm.zpt').__of__(self) |
|
return pt() |
|
def createRessourcesFromXML(self,fileupload): |
|
"""read an XML file for generating resources""" |
|
dom=xml.dom.minidom.parse(fileupload) |
|
ret="<h2>Added</h2>" |
|
for resource in dom.getElementsByTagName('resource'): |
|
link=getText(resource.getElementsByTagName('link')[0].childNodes) |
|
label=getText(resource.getElementsByTagName('label')[0].childNodes) |
|
#splitted=link.split("?")[0].split("/") |
|
#id=splitted[len(splitted)-1].encode('ascii') |
|
id=re.sub(" ","_",label).encode('ascii') |
|
|
|
ret+="<p>"+label+"</p>" |
|
manage_addECHO_resource(self,id,label.encode('ascii'),label.encode('ascii'),"","","",link.encode('ascii'),"","") |
|
return ret |
def getImageTag(self): |
def getImageTag(self): |
"""GetTag""" |
"""GetTag""" |
try: |
try: |
Line 579 class ECHO_collection(Folder, Persistent
|
Line 620 class ECHO_collection(Folder, Persistent
|
|
|
dynamical="" |
dynamical="" |
for ob in self.getGraphicCoords(): |
for ob in self.getGraphicCoords(): |
|
if ob[4][4] == "": |
dynamical+="""Coords.push(new Coord('%s', Img, %s));\n"""%(ob[1],ob[0]) |
dynamical+="""Coords.push(new Coord('%s', Img, %s));\n"""%(ob[1],ob[0]) |
|
else: |
|
dynamical+="""Coords.push(new Coord('%s', Img, %s));//%s\n"""%(ob[1],ob[0],ob[4][4]) |
|
dynamical+="ShowArrow(new getObj('i.%s'),Img,%s);\n"%(ob[1],ob[0]) |
ret+=javaHandler%dynamical |
ret+=javaHandler%dynamical |
return ret |
return ret |
|
|
Line 667 class ECHO_collection(Folder, Persistent
|
Line 712 class ECHO_collection(Folder, Persistent
|
{'label':'Main Config','action':'ECHO_collection_config'}, |
{'label':'Main Config','action':'ECHO_collection_config'}, |
{'label':'Rerender Links','action':'ECHO_rerenderLinksMD'}, |
{'label':'Rerender Links','action':'ECHO_rerenderLinksMD'}, |
{'label':'Graphics','action':'ECHO_graphicEntry'}, |
{'label':'Graphics','action':'ECHO_graphicEntry'}, |
|
{'label':'create resources from XML','action':'createRessourcesFromXMLForm'}, |
|
|
) |
) |
|
|
Line 742 class ECHO_collection(Folder, Persistent
|
Line 788 class ECHO_collection(Folder, Persistent
|
self.coords=None |
self.coords=None |
|
|
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew) |
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew) |
|
try: |
self.coords=coordsnew[0:] # HACK fehler in setECHO_collection |
self.coords=coordsnew[0:] # HACK fehler in setECHO_collection |
|
except: |
|
"""none""" |
|
|
self.sortfield=sortfield |
self.sortfield=sortfield |
|
|
Line 801 class ECHO_collection(Folder, Persistent
|
Line 849 class ECHO_collection(Folder, Persistent
|
if len(coordtemp)>3: |
if len(coordtemp)>3: |
coord=coordtemp[0:4] |
coord=coordtemp[0:4] |
if hasattr(object,'label') and not object.label=="": |
if hasattr(object,'label') and not object.label=="": |
ids.append([string.join(coord,", "),object.getId(),object.label,object]) |
ids.append([string.join(coord,", "),object.getId(),object.label,object,coordtemp]) |
elif hasattr(object,'title'): |
elif hasattr(object,'title'): |
if not object.title=="": |
if not object.title=="": |
ids.append([string.join(coord,", "),object.getId(),object.title,object]) |
ids.append([string.join(coord,", "),object.getId(),object.title,object,coordtemp]) |
else: |
else: |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object]) |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object,coordtemp]) |
else: |
else: |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object]) |
ids.append([string.join(coord,", "),object.getId(),object.getId(),object,coordtemp]) |
|
|
except: |
except: |
"""nothing""" |
"""nothing""" |