--- ECHO_content/ECHO_collection.py 2007/04/30 16:30:09 1.288
+++ ECHO_content/ECHO_collection.py 2007/07/24 09:11:45 1.291
@@ -200,6 +200,8 @@ class ECHO_locale(ZopePageTemplate):
self.title=title
self.label=label
if text:
+ if content_type is None:
+ content_type = self.content_type
self.pt_edit(text, content_type)
self.id=id
@@ -218,6 +220,8 @@ class ECHO_locale(ZopePageTemplate):
self.title=title
self.label=label
if not text is None:
+ if content_type is None:
+ content_type = self.content_type
self.pt_edit(text, content_type)
if RESPONSE is not None:
@@ -307,6 +311,8 @@ class ECHO_layoutTemplate(ZopePageTempla
if text is None:
self._default_content_fn = os.path.join(package_home(globals()),'zpt','ECHO_%s_template_standard.zpt'%EchoType)
text = open(self._default_content_fn).read()
+ if content_type is None:
+ content_type = self.content_type
self.pt_edit(text, content_type)
@@ -1999,7 +2005,7 @@ class ECHO_link(ECHO_externalLink):
params['backLink']=self.aq_parent.absolute_url()
params['startLink']=splitted[0]+"?"+urllib.urlencode(params)
-
+
return self.REQUEST.RESPONSE.redirect(splitted[0]+"?"+urllib.urlencode(params))
else:
return ""
@@ -2164,16 +2170,16 @@ class ECHO_collection(CatalogAware, Fold
if obj.meta_type=="ECHO_mapText":
if splitted[1]=="en":
- obj.locale_en.pt_edit(REQUEST.form[key],None)
+ obj.locale_en.pt_edit(REQUEST.form[key],obj.locale_en.content_type)
else:
- obj.pt_edit(REQUEST.form[key],None)
+ obj.pt_edit(REQUEST.form[key],obj.content_type)
else:
text=obj.ZopeFind(obj,obj_metatypes=['ECHO_mapText'])
if splitted[1]=="en":
- text[0][1].locale_en.pt_edit(REQUEST.form[key],None)
+ text[0][1].locale_en.pt_edit(REQUEST.form[key],text[0][1].locale_en.content_type)
else:
- text[0][1].pt_edit(REQUEST.form[key],None)
+ text[0][1].pt_edit(REQUEST.form[key],text[0][1].content_type)
if RESPONSE is not None:
RESPONSE.redirect('manage_main')
@@ -3749,7 +3755,10 @@ class ECHO_root(Folder,Persistent,Implic
def formatAscii(self,str,url=None):
"""ersetze ascii umbrueche durch
"""
- #url=None
+
+ if not str:
+ return ""
+
if url:
retStr=""
@@ -3761,9 +3770,10 @@ class ECHO_root(Folder,Persistent,Implic
retStr+="""%s
"""%(strUrl,word)
str=retStr
if str:
- return re.sub(r"[\n]","
",str)
+ str = re.sub(r"[\n]","
",str)
+ return unicodify(str)
else:
- return ""
+ return u""
link2html=vlp_xmlhelpers.link2html
related2html=vlp_xmlhelpers.related2html
@@ -4134,6 +4144,8 @@ class ECHO_linkList(ZopePageTemplate,ECH
self.ZBindings_edit(self._default_bindings)
if text is None:
text = ''
+ if content_type is None:
+ content_type = self.content_type
self.pt_edit(text, contentType)