version 1.37, 2004/04/14 20:09:08
|
version 1.40, 2004/04/15 13:41:01
|
Line 195 class ECHO_layoutTemplate(ZopePageTempla
|
Line 195 class ECHO_layoutTemplate(ZopePageTempla
|
|
|
meta_type="ECHO_layoutTemplate" |
meta_type="ECHO_layoutTemplate" |
|
|
#manage_options=ZopePageTemplate.manage_options+( |
|
# {'label':'Set back to Standard','action':'changeECHO_layoutTemplateToStandardForm'}, |
|
# ) |
|
|
|
|
|
def __init__(self, id, text=None, content_type=None,EchoType=None): |
def __init__(self, id, text=None, content_type=None,EchoType=None): |
self.id = str(id) |
self.id = str(id) |
|
|
Line 212 class ECHO_layoutTemplate(ZopePageTempla
|
Line 207 class ECHO_layoutTemplate(ZopePageTempla
|
text = open(self._default_content_fn).read() |
text = open(self._default_content_fn).read() |
self.pt_edit(text, content_type) |
self.pt_edit(text, content_type) |
|
|
## def changeECHO_layoutTemplateToStandardForm(self): |
|
## """change form""" |
|
## pt=PageTemplateFile('Products/ECHO_content/zpt/changeECHO_pageTemplateWeightForm.zpt').__of__(self) |
|
## return pt() |
|
|
|
|
|
"""change form""" |
"""change form""" |
|
|
Line 570 class ECHO_collection(Folder, Persistent
|
Line 560 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 824 class ECHO_collection(Folder, Persistent
|
Line 814 class ECHO_collection(Folder, Persistent
|
|
|
def getSubCols(self,sortfield="weight"): |
def getSubCols(self,sortfield="weight"): |
|
|
subColTypes=['ECHO_collection','ECHO_externalLink','ECHO_resource'] |
subColTypes=['ECHO_group','ECHO_collection','ECHO_externalLink','ECHO_resource'] |
ids=[] |
ids=[] |
for entry in self.__dict__.keys(): |
for entry in self.__dict__.keys(): |
object=getattr(self,entry) |
object=getattr(self,entry) |
Line 875 def manage_addECHO_collection(self,id,ti
|
Line 865 def manage_addECHO_collection(self,id,ti
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
class ECHO_group(ECHO_collection): |
|
"""ECHO Gruppe""" |
|
meta_type="ECHO_group" |
|
|
|
manage_options = Folder.manage_options+( |
|
{'label':'Main Config','action':'ECHO_group_config'}, |
|
{'label':'Rerender Links','action':'ECHO_rerenderLinksMD'}, |
|
{'label':'Graphics','action':'ECHO_graphicEntry'}, |
|
) |
|
def ECHO_group_config(self): |
|
"""Main configuration""" |
|
|
|
if not hasattr(self,'weight'): |
|
self.weight="" |
|
|
|
if not hasattr(self,'sortfield'): |
|
self.sortfield="weight" |
|
|
|
if not hasattr(self,'coords'): |
|
self.coords=[] |
|
|
|
pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_group.zpt').__of__(self) |
|
return pt() |
|
|
|
def changeECHO_group(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour=""): |
|
"""Änderung der Properties""" |
|
|
|
self.secondaryLink=secondaryLink |
|
self.secondaryLinkTitle=secondaryLinkTitle |
|
self.imageTag=imageTag |
|
self.bgcolour=bgcolour |
|
|
|
if coords: |
|
coordsnew=[ string.split(x,",") for x in coords] |
|
self.coords=coordsnew[0:] |
|
else: |
|
coordsnew=None |
|
self.coords=None |
|
|
|
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew) |
|
|
|
|
|
|
|
self.sortfield=sortfield |
|
|
|
if RESPONSE is not None: |
|
RESPONSE.redirect('manage_main') |
|
|
|
def getLogo(self): |
|
"""logo ausgeben""" |
|
return "ECHO_groups" |
|
|
|
def content_html(self): |
|
"""template fuer content""" |
|
return content_html(self,'group') |
|
|
|
|
|
|
|
def manage_addECHO_groupForm(self): |
|
"""Add group form""" |
|
pt=PageTemplateFile('Products/ECHO_content/zpt/AddECHO_groupForm.zpt').__of__(self) |
|
return pt() |
|
|
|
|
|
def manage_addECHO_group(self,id,title,label,description,contentType,responsible,weight,sortfield,coords="",secondaryLinkTitle="",secondaryLink="",credits=None,RESPONSE=None,imageTag="",bgcolour=""): |
|
"""add a echo group""" |
|
|
|
|
|
newObj=ECHO_group(id,title,label,description,contentType,responsible,credits,weight,sortfield,coords,secondaryLinkTitle=secondaryLinkTitle,secondaryLink=secondaryLink,imageTag=imageTag,bgcolour="") |
|
|
|
self._setObject(id,newObj) |
|
|
|
if RESPONSE is not None: |
|
RESPONSE.redirect('manage_main') |
|
|
|
|
|
|
class ECHO_root(Folder,Persistent,Implicit): |
class ECHO_root(Folder,Persistent,Implicit): |
"""ECHO Root Folder""" |
"""ECHO Root Folder""" |
meta_type="ECHO_root" |
meta_type="ECHO_root" |