--- ECHO_content/ECHO_collection.py 2004/04/14 20:09:08 1.37 +++ ECHO_content/ECHO_collection.py 2004/04/14 23:44:52 1.38 @@ -875,6 +875,79 @@ def manage_addECHO_collection(self,id,ti if RESPONSE is not None: 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 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): """ECHO Root Folder""" meta_type="ECHO_root"