version 1.228, 2005/07/20 11:30:28
|
version 1.231, 2005/07/29 11:17:08
|
Line 1
|
Line 1
|
|
|
|
|
"""New version of the product started February, 8th. Without scientific classification, use content-type for further classification.""" |
"""New version of the product started February, 8th. Without scientific classification, use content-type for further classification.""" |
"""Echo collection provides the classes for the ECHO content web-site. |
"""Echo collection provides the classes for the ECHO content web-site. |
|
|
Line 1457 class ECHO_link(ECHO_externalLink):
|
Line 1459 class ECHO_link(ECHO_externalLink):
|
|
|
def index_html(self): |
def index_html(self): |
"""standard link""" |
"""standard link""" |
|
if self.link: |
splitted=self.link.split("?") |
splitted=self.link.split("?") |
if len(splitted)>1: |
if len(splitted)>1: |
params=cgi.parse_qs(splitted[1]) |
params=cgi.parse_qs(splitted[1]) |
Line 1471 class ECHO_link(ECHO_externalLink):
|
Line 1473 class ECHO_link(ECHO_externalLink):
|
params={} |
params={} |
|
|
params['backLink']=self.aq_parent.absolute_url() |
params['backLink']=self.aq_parent.absolute_url() |
|
params['startLink']=splitted[0]+"?"+urllib.urlencode(params) |
|
|
self.REQUEST.SESSION['_ECHOLink']=splitted[0]+"?"+urllib.urlencode(params) |
|
|
|
return self.REQUEST.RESPONSE.redirect(splitted[0]+"?"+urllib.urlencode(params)) |
return self.REQUEST.RESPONSE.redirect(splitted[0]+"?"+urllib.urlencode(params)) |
|
else: |
|
return "" |
|
|
def manage_addECHO_linkForm(self): |
def manage_addECHO_linkForm(self): |
"""Form for external Links""" |
"""Form for external Links""" |
Line 1506 class ECHO_collection(Folder, Persistent
|
Line 1510 class ECHO_collection(Folder, Persistent
|
def localizeObjects(self): |
def localizeObjects(self): |
"""localize all objects""" |
"""localize all objects""" |
contents=self.ZopeFind(self,obj_metatypes=['ECHO_link','ECHO_mapText']) |
contents=self.ZopeFind(self,obj_metatypes=['ECHO_link','ECHO_mapText']) |
|
find=self.ZopeFind(self,obj_ids=('locale_en')) |
|
if not find: |
|
self.manage_addECHO_locale("en",'','') |
for content in contents: |
for content in contents: |
if content[1].meta_type=='ECHO_link': |
if content[1].meta_type=='ECHO_link': |
find=content[1].ZopeFind(content[1],obj_metatypes=('ECHO_mapText')) |
find=content[1].ZopeFind(content[1],obj_metatypes=('ECHO_mapText')) |
|
if find: |
root=find[0][1] |
root=find[0][1] |
|
|
locale=find[0][1].ZopeFind(find[0][1],obj_ids=('locale_en')) |
locale=find[0][1].ZopeFind(find[0][1],obj_ids=('locale_en')) |
else: |
else: |
|
root=None |
|
else: |
root=content[1] |
root=content[1] |
locale=content[1].ZopeFind(content[1],obj_ids=('locale_en')) |
locale=content[1].ZopeFind(content[1],obj_ids=('locale_en')) |
if not locale: |
if root and not locale: |
root.manage_addECHO_locale("en",'','') |
root.manage_addECHO_locale("en",'','') |
|
|
pt=zptFile(self, 'zpt/localizeObjects.zpt') |
pt=zptFile(self, 'zpt/localizeObjects.zpt') |
Line 2082 class ECHO_collection(Folder, Persistent
|
Line 2091 class ECHO_collection(Folder, Persistent
|
|
|
|
|
security.declarePublic('changeECHO_collection') |
security.declarePublic('changeECHO_collection') |
def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",location=None,isAlwaysClickable=None): |
def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",location=None,isAlwaysClickable=None,prefix="",suffix=""): |
"""Aenderung der Properties""" |
"""Aenderung der Properties""" |
|
|
self.secondaryLink=secondaryLink |
self.secondaryLink=secondaryLink |
Line 2091 class ECHO_collection(Folder, Persistent
|
Line 2100 class ECHO_collection(Folder, Persistent
|
self.bgcolour=bgcolour |
self.bgcolour=bgcolour |
self.location=location |
self.location=location |
self.isAlwaysClickable=isAlwaysClickable |
self.isAlwaysClickable=isAlwaysClickable |
|
self.prefix=prefix[0:] |
|
self.suffix=suffix[0:] |
|
|
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight) |
setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight) |
|
|