version 1.6, 2005/10/26 17:30:26
|
version 1.7, 2006/11/21 16:49:58
|
Line 213 def link2html(self,str):
|
Line 213 def link2html(self,str):
|
|
|
return "" |
return "" |
|
|
|
def related2html(self,str): |
|
"""related library items: xlinks in html wandeln / mb 21.11.2006""" |
|
if str: |
|
|
|
str=re.sub("\&","&",str) |
|
dom=xml.dom.minidom.parseString("<?xml version='1.0' encoding='utf-8'?><txt>"+str+"</txt>") |
|
links=dom.getElementsByTagName("link") |
|
|
|
for link in links: |
|
link.tagName = "a" |
|
ref = link.getAttribute("ref") |
|
pn = link.getAttribute("page") |
|
|
|
searchStr=str("select fullreference, online from vl_literature where reference =\'%s\' and authorized = 1"%(ref)) |
|
res = self.search(var=searchStr) |
|
|
|
if res: |
|
if res.online == 1: # achtung: syntax?! = feld 'online' vom abfrageergebnis |
|
# 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) |
|
else: |
|
# item nur als bibliographische angabe vorhanden |
|
link.setAttribute("alt", res.fullreference) # achtung: syntax? |
|
link.setAttribute("title", "click to expand") |
|
link.setAttribute("onclick", "return toggle(this);") |
|
link.setAttribute("class", "x_offline") |
|
|
|
newxml=dom.toxml('utf-8') |
|
|
|
retStr=regexpTXT.search(newxml) |
|
|
|
return retStr.group(1) |
|
|
|
return "" |
|
|
|
|
|
|
|
|
def xml2html(self,str,quote="yes"): |
def xml2html(self,str,quote="yes"): |