|
|
| version 1.16, 2004/03/04 12:59:53 | version 1.22, 2004/03/30 18:10:00 |
|---|---|
| Line 231 class ECHO_resource(Folder): | Line 231 class ECHO_resource(Folder): |
| if not hasattr(self,'coords'): | if not hasattr(self,'coords'): |
| self.coords=[] | self.coords=[] |
| print "vorher",self.coords | |
| pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_resource.zpt').__of__(self) | pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_resource.zpt').__of__(self) |
| return pt() | return pt() |
| def changeECHO_resource(self,metalink,link,title,label,description,content_type,responsible,weight,viewClassification="",coords=None,credits=None,RESPONSE=None): | def changeECHO_resource(self,metalink,link,title,label,description,content_type,responsible,weight,viewClassification="",coords=None,credits=None,RESPONSE=None): |
| """Änderung der Properties""" | """Änderung der Properties""" |
| setECHO_collectionInformation(self,title,label,description,content_type,responsible,credits,weight,coords,viewClassification) | coordsnew=[ string.split(x,",") for x in coords] |
| setECHO_collectionInformation(self,title,label,description,content_type,responsible,credits,weight,coordsnew) | |
| self.coords=coordsnew[0:] | |
| self.link=link | self.link=link |
| self.metalink=metalink | self.metalink=metalink |
| Line 257 class ECHO_resource(Folder): | Line 259 class ECHO_resource(Folder): |
| {'label':'Graphics','action':'ECHO_graphicEntry'}, | {'label':'Graphics','action':'ECHO_graphicEntry'}, |
| ) | ) |
| def getOverview(self): | |
| """overview graphics""" | |
| return self.aq_parent.ZopeFind(self.aq_parent,obj_ids=['overview'])[0][1] | |
| def ECHO_graphicEntry(self): | def ECHO_graphicEntry(self): |
| """DO nothing""" | """DO nothing""" |
| if 'overview' in self.aq_parent.__dict__.keys(): | overview = self.aq_parent.ZopeFind(self.aq_parent,obj_ids=['overview']) |
| if overview: | |
| pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_draw.zpt').__of__(self) | pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_draw.zpt').__of__(self) |
| return pt() | return pt() |
| else: | else: |
| Line 370 class ECHO_externalLink(Folder): | Line 378 class ECHO_externalLink(Folder): |
| def changeECHO_externalLink(self,link,title,label,description,content_type,responsible,weight,coords=None,credits=None,RESPONSE=None): | def changeECHO_externalLink(self,link,title,label,description,content_type,responsible,weight,coords=None,credits=None,RESPONSE=None): |
| """Änderung der Properties""" | """Änderung der Properties""" |
| coordsnew=[ string.split(x,",") for x in coords] | |
| setECHO_collectionInformation(self,title,label,description,content_type,responsible,credits,weight,coords) | setECHO_collectionInformation(self,title,label,description,content_type,responsible,credits,weight,coords) |
| self.coords=coordsnew[0:] | |
| self.link=link | self.link=link |
| if RESPONSE is not None: | if RESPONSE is not None: |
| RESPONSE.redirect('manage_main') | RESPONSE.redirect('manage_main') |
| Line 384 class ECHO_externalLink(Folder): | Line 392 class ECHO_externalLink(Folder): |
| {'label':'Main Config','action':'ECHO_externalLink_config'}, | {'label':'Main Config','action':'ECHO_externalLink_config'}, |
| ) | ) |
| def getCredits(self): | |
| """Ausgabe der credits""" | |
| if self.credits: | |
| return self.credits | |
| else: | |
| return [] | |
| def index_html(self): | def index_html(self): |
| """standard page""" | """standard page""" |
| Line 459 class ECHO_collection(Folder, Persistent | Line 474 class ECHO_collection(Folder, Persistent |
| return "Rerenderd all links to resources in: "+self.title | return "Rerenderd all links to resources in: "+self.title |
| security.declarePublic('ECHO_newViewerLink') | |
| def getCoords(self): | def getCoords(self): |
| try: | try: |
| Line 495 class ECHO_collection(Folder, Persistent | Line 512 class ECHO_collection(Folder, Persistent |
| ) | ) |
| def getOverview(self): | |
| """overview graphics""" | |
| return self.aq_parent.ZopeFind(self.aq_parent,obj_ids=['overview'])[0][1] | |
| def ECHO_graphicEntry(self): | def ECHO_graphicEntry(self): |
| """DO nothing""" | """DO nothing""" |
| if 'overview' in self.aq_parent.__dict__.keys(): | overview = self.aq_parent.ZopeFind(self.aq_parent,obj_ids=['overview']) |
| if overview: | |
| pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_draw.zpt').__of__(self) | pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_draw.zpt').__of__(self) |
| return pt() | return pt() |
| else: | else: |
| Line 538 class ECHO_collection(Folder, Persistent | Line 564 class ECHO_collection(Folder, Persistent |
| def changeECHO_collection(self,title,label,description,content_type,responsible,weight,credits=None,sortfield="weight",coords=None,RESPONSE=None): | def changeECHO_collection(self,title,label,description,content_type,responsible,weight,credits=None,sortfield="weight",coords=None,RESPONSE=None): |
| """Änderung der Properties""" | """Änderung der Properties""" |
| try: | |
| coordsnew=[ string.split(x,",") for x in coords] | coordsnew=[ string.split(x,",") for x in coords] |
| except: | |
| coordsnew=[] | |
| setECHO_collectionInformation(self,title,label,description,content_type,responsible,credits,weight,coordsnew) | setECHO_collectionInformation(self,title,label,description,content_type,responsible,credits,weight,coordsnew) |
| self.coords=coordsnew[0:] | |
| self.sortfield=sortfield | self.sortfield=sortfield |
| if RESPONSE is not None: | if RESPONSE is not None: |
| Line 552 class ECHO_collection(Folder, Persistent | Line 577 class ECHO_collection(Folder, Persistent |
| security.declarePublic('index_html') | security.declarePublic('index_html') |
| showOverview=DTMLFile('ECHO_content_overview',globals()) | showOverview=DTMLFile('dtml/ECHO_content_overview',globals()) |
| def index_html(self): | def index_html(self): |
| Line 656 class ECHO_root(Folder,Persistent,Implic | Line 681 class ECHO_root(Folder,Persistent,Implic |
| """ECHO Root Folder""" | """ECHO Root Folder""" |
| meta_type="ECHO_root" | meta_type="ECHO_root" |
| def ECHO_newViewerLink(self,obj=None): | |
| """change links (:86 faellt weg)""" | |
| if not obj: | |
| obj = self | |
| entries=obj.ZopeFind(obj,obj_metatypes=['ECHO_resource','ECHO_collection']) | |
| for entry in entries: | |
| if entry[1].meta_type == 'ECHO_resource': | |
| entry[1].link=re.sub('\:86','',entry[1].link) | |
| else: | |
| entry[1].ECHO_newViewerLink(entry[1]) | |
| return "Rerenderd all links to resources in: "+self.title | |
| def __init__(self,id,title): | def __init__(self,id,title): |
| """init""" | """init""" |
| self.id = id | self.id = id |