--- ECHO_content/vlp_xmlhelpers.py 2006/11/21 18:37:12 1.9 +++ ECHO_content/vlp_xmlhelpers.py 2006/11/22 17:21:10 1.10 @@ -214,7 +214,7 @@ def link2html(self,str): return "" def related2html(self,str): - """related library items: xlinks in html wandeln / mb 21.11.2006""" + """related library items: xlinks in html wandeln / mb 22.11.2006""" if str: str=re.sub("\&","&",str) @@ -232,17 +232,28 @@ def related2html(self,str): if res: if res[0]['online'] == 1: # item online verfuegbar - link.setAttribute("title", "click to view") if pn: link.setAttribute("href",self.REQUEST['SERVER_URL']+"/references?id="+ref+"&page="+pn) else: link.setAttribute("href",self.REQUEST['SERVER_URL']+"/references?id="+ref) + + link.setAttribute("title", "click to view") + link.removeAttribute("ref") + + # prefix preceding the link + prefix = dom.createTextNode(U"\u2013\u0020") # = ndash + space + dom.documentElement.insertBefore(prefix, link) + else: # item nur als bibliographische angabe vorhanden link.setAttribute("alt", res[0]['fullreference'].decode('utf-8')) link.setAttribute("title", "click to expand") link.setAttribute("onclick", "return toggle(this);") link.setAttribute("class", "x_offline") + + # prefix inside link text + link.firstChild.data = '+ ' + link.firstChild.data + newxml=dom.toxml('utf-8')