version 1.51, 2004/05/05 13:19:40
|
version 1.52, 2004/05/06 10:27:07
|
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 853 class ECHO_collection(Folder, Persistent
|
Line 853 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 930 class ECHO_group(ECHO_collection):
|
Line 930 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 1026 class ECHO_root(Folder,Persistent,Implic
|
Line 1047 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: |