version 1.287, 2007/04/20 14:46:26
|
version 1.292, 2007/09/18 14:13:49
|
Line 200 class ECHO_locale(ZopePageTemplate):
|
Line 200 class ECHO_locale(ZopePageTemplate):
|
self.title=title |
self.title=title |
self.label=label |
self.label=label |
if text: |
if text: |
|
if content_type is None: |
|
content_type = self.content_type |
self.pt_edit(text, content_type) |
self.pt_edit(text, content_type) |
self.id=id |
self.id=id |
|
|
Line 218 class ECHO_locale(ZopePageTemplate):
|
Line 220 class ECHO_locale(ZopePageTemplate):
|
self.title=title |
self.title=title |
self.label=label |
self.label=label |
if not text is None: |
if not text is None: |
|
if content_type is None: |
|
content_type = self.content_type |
self.pt_edit(text, content_type) |
self.pt_edit(text, content_type) |
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
Line 307 class ECHO_layoutTemplate(ZopePageTempla
|
Line 311 class ECHO_layoutTemplate(ZopePageTempla
|
if text is None: |
if text is None: |
self._default_content_fn = os.path.join(package_home(globals()),'zpt','ECHO_%s_template_standard.zpt'%EchoType) |
self._default_content_fn = os.path.join(package_home(globals()),'zpt','ECHO_%s_template_standard.zpt'%EchoType) |
text = open(self._default_content_fn).read() |
text = open(self._default_content_fn).read() |
|
if content_type is None: |
|
content_type = self.content_type |
self.pt_edit(text, content_type) |
self.pt_edit(text, content_type) |
|
|
|
|
Line 2010 def manage_addECHO_linkForm(self):
|
Line 2016 def manage_addECHO_linkForm(self):
|
return pt() |
return pt() |
|
|
|
|
def manage_addECHO_link(self,id,title,label,description="",contentType="",responsible="",link="",weight="",coords=[],credits=None,RESPONSE=None): |
def manage_addECHO_link(self,id,title,label,description="",contentType="",responsible="",link="",weight="",coords=[],credits=None,linkType="external",RESPONSE=None): |
"""Add an external Link""" |
"""Add an external Link""" |
|
|
newObj=ECHO_link(id,link,title,label,description,contentType,responsible,credits,weight,coords) |
newObj=ECHO_link(id,link,title,label,description,contentType,responsible,credits,weight,coords,linkType) |
|
|
self._setObject(id,newObj) |
self._setObject(id,newObj) |
|
|
Line 2164 class ECHO_collection(CatalogAware, Fold
|
Line 2170 class ECHO_collection(CatalogAware, Fold
|
|
|
if obj.meta_type=="ECHO_mapText": |
if obj.meta_type=="ECHO_mapText": |
if splitted[1]=="en": |
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: |
else: |
obj.pt_edit(REQUEST.form[key],None) |
obj.pt_edit(REQUEST.form[key],obj.content_type) |
else: |
else: |
text=obj.ZopeFind(obj,obj_metatypes=['ECHO_mapText']) |
text=obj.ZopeFind(obj,obj_metatypes=['ECHO_mapText']) |
if splitted[1]=="en": |
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: |
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: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
Line 2630 class ECHO_collection(CatalogAware, Fold
|
Line 2636 class ECHO_collection(CatalogAware, Fold
|
ret="""<?xml version="1.0" encoding="utf-8" ?>""" |
ret="""<?xml version="1.0" encoding="utf-8" ?>""" |
return ret+"<collection>"+getCollection(self,pwstr=pwstr)+"</collection>" |
return ret+"<collection>"+getCollection(self,pwstr=pwstr)+"</collection>" |
|
|
def createAllJSAreas(self): |
def createAllJSAreas(self,mapColTypes=None): |
"""create area calls for JavaScript""" |
"""create area calls for JavaScript""" |
areas = self.getAllMapAreas() |
areas = self.getAllMapAreas(mapColTypes=mapColTypes) |
return self.createJSAreas(areas) |
return self.createJSAreas(areas) |
|
|
|
|
Line 2857 class ECHO_collection(CatalogAware, Fold
|
Line 2863 class ECHO_collection(CatalogAware, Fold
|
"""javascript""" |
"""javascript""" |
return sendFile(self, 'js/hl_add.js', 'text/plain') |
return sendFile(self, 'js/hl_add.js', 'text/plain') |
|
|
def getAllMapAreas(self,mapColTypes=['ECHO_collection','ECHO_resource','ECHO_link','ECHO_externalLink']): |
def getAllMapAreas(self,mapColTypes=None): |
"""Give list of coordinates""" |
"""Give list of coordinates""" |
|
if mapColTypes is None: |
|
mapColTypes=['ECHO_collection','ECHO_resource','ECHO_link','ECHO_externalLink'] |
|
|
areas=[] |
areas=[] |
for entry in self.getSubCols(subColTypes=mapColTypes): |
for entry in self.getSubCols(subColTypes=mapColTypes): |
Line 3747 class ECHO_root(Folder,Persistent,Implic
|
Line 3755 class ECHO_root(Folder,Persistent,Implic
|
|
|
def formatAscii(self,str,url=None): |
def formatAscii(self,str,url=None): |
"""ersetze ascii umbrueche durch <br>""" |
"""ersetze ascii umbrueche durch <br>""" |
#url=None |
|
|
if not str: |
|
return "" |
|
|
if url: |
if url: |
|
|
retStr="" |
retStr="" |
Line 3759 class ECHO_root(Folder,Persistent,Implic
|
Line 3770 class ECHO_root(Folder,Persistent,Implic
|
retStr+="""<a href="%s">%s</a><br/>"""%(strUrl,word) |
retStr+="""<a href="%s">%s</a><br/>"""%(strUrl,word) |
str=retStr |
str=retStr |
if str: |
if str: |
return re.sub(r"[\n]","<br/>",str) |
str = re.sub(r"[\n]","<br/>",str) |
|
return unicodify(str) |
else: |
else: |
return "" |
return u"" |
|
|
link2html=vlp_xmlhelpers.link2html |
link2html=vlp_xmlhelpers.link2html |
related2html=vlp_xmlhelpers.related2html |
related2html=vlp_xmlhelpers.related2html |
Line 4132 class ECHO_linkList(ZopePageTemplate,ECH
|
Line 4144 class ECHO_linkList(ZopePageTemplate,ECH
|
self.ZBindings_edit(self._default_bindings) |
self.ZBindings_edit(self._default_bindings) |
if text is None: |
if text is None: |
text = '' |
text = '' |
|
if content_type is None: |
|
content_type = self.content_type |
self.pt_edit(text, contentType) |
self.pt_edit(text, contentType) |
|
|
|
|