version 1.50, 2004/04/28 15:29:55
|
version 1.53, 2004/05/06 11:06:12
|
Line 26 from Products.PageTemplates.PageTemplate
|
Line 26 from Products.PageTemplates.PageTemplate
|
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate |
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate |
from Globals import Persistent, package_home |
from Globals import Persistent, package_home |
from Acquisition import Implicit |
from Acquisition import Implicit |
|
from ECHO_helpers import displayTypes |
try: |
try: |
from psycopg import libpq |
from psycopg import libpq |
except: |
except: |
Line 545 def manage_addECHO_externalLink(self,id,
|
Line 545 def manage_addECHO_externalLink(self,id,
|
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
|
|
class ECHO_link(ECHO_externalLink): |
|
"""external_link""" |
|
|
|
meta_type="ECHO_link" |
|
|
|
|
|
def content_html(self): |
|
"""template fuer content""" |
|
return content_html(self,'link') |
|
|
|
def manage_addECHO_linkForm(self): |
|
"""Form for external Links""" |
|
pt=PageTemplateFile('Products/ECHO_content/zpt/AddECHO_linkForm.zpt').__of__(self) |
|
return pt() |
|
|
|
|
|
def manage_addECHO_link(self,id,title,label,description,contentType,responsible,link,weight,coords=None,credits=None,RESPONSE=None): |
|
"""Add an external Link""" |
|
|
|
newObj=ECHO_link(id,link,title,label,description,contentType,responsible,credits,weight,coords) |
|
|
|
self._setObject(id,newObj) |
|
|
|
if RESPONSE is not None: |
|
RESPONSE.redirect('manage_main') |
|
|
|
|
class ECHO_collection(Folder, Persistent, Implicit): |
class ECHO_collection(Folder, Persistent, Implicit): |
"""ECHO Collection""" |
"""ECHO Collection""" |
Line 831 class ECHO_collection(Folder, Persistent
|
Line 857 class ECHO_collection(Folder, Persistent
|
elif hasattr(self,'collection_index_template'): |
elif hasattr(self,'collection_index_template'): |
return self.collection_index_template() |
return self.collection_index_template() |
|
|
pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_content_standard.zpt').__of__(self) |
pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_collection_index_standard.zpt').__of__(self) |
pt.content_type="text/html" |
pt.content_type="text/html" |
return pt() |
return pt() |
|
|
Line 908 class ECHO_group(ECHO_collection):
|
Line 934 class ECHO_group(ECHO_collection):
|
{'label':'Rerender Links','action':'ECHO_rerenderLinksMD'}, |
{'label':'Rerender Links','action':'ECHO_rerenderLinksMD'}, |
{'label':'Graphics','action':'ECHO_graphicEntry'}, |
{'label':'Graphics','action':'ECHO_graphicEntry'}, |
) |
) |
|
|
|
def index_html(self): |
|
"""standard page""" |
|
displayedObjects=self.ZopeFind(self,obj_metatypes=displayTypes) |
|
if len(displayedObjects)==1: # nur ein Object dann redirect auf dieses Object |
|
return self.REQUEST.RESPONSE.redirect(displayedObjects[0][1].absolute_url()) |
|
|
|
if 'index.html' in self.__dict__.keys(): |
|
return getattr(self,'index.html')() |
|
|
|
elif 'overview' in self.__dict__.keys(): |
|
return self.showOverview() |
|
elif hasattr(self,'group_index_template'): |
|
return self.group_index_template() |
|
elif hasattr(self,'collection_index_template'): |
|
return self.collection_index_template() |
|
|
|
pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_group_index_standard.zpt').__of__(self) |
|
pt.content_type="text/html" |
|
return pt() |
|
|
def ECHO_group_config(self): |
def ECHO_group_config(self): |
"""Main configuration""" |
"""Main configuration""" |
|
|
Line 1004 class ECHO_root(Folder,Persistent,Implic
|
Line 1051 class ECHO_root(Folder,Persistent,Implic
|
retStr="<option>\n" |
retStr="<option>\n" |
|
|
try: |
try: |
for contentType in self.ZopeFind(self.contentTypes,obj_metatypes="ECHO_contentType"): |
for contentType in self.ZopeFind(self.contentTypes,obj_metatypes=["ECHO_contentType"]): |
if selected and (contentType[0]==selected): |
if selected and (contentType[0]==selected): |
retStr+="""<option selected value="%s">%s\n"""%(contentType[0],contentType[0]) |
retStr+="""<option selected value="%s">%s\n"""%(contentType[0],contentType[0]) |
else: |
else: |