--- MPIWGWeb/MPIWGProjects.py 2005/05/27 06:47:19 1.47.2.4 +++ MPIWGWeb/MPIWGProjects.py 2005/05/27 08:34:37 1.47.2.5 @@ -168,6 +168,14 @@ class MPIWGRoot(ZSQLExtendFolder): folders=['MPIWGProject','Folder','ECHO_Navigation'] meta_type='MPIWGRoot' + def generateUrlProject(self,url): + """erzeuge aus absoluter url, relative des Projektes""" + splitted=url.split("/") + length=len(splitted) + short=splitted[length-2:length] + base=self.REQUEST['URL1']+"/"+"/".join(short) + return base + def isNewCapital(self,text=None,reset=None): if reset: self.REQUEST['capital']="A" @@ -661,7 +669,7 @@ class MPIWGRoot(ZSQLExtendFolder): department=element[3].getContent('xdata_05') ret+="""
%s: """%(department,departmentName[department]) - ret+="""%s"""%(element[3].absolute_url()+"/index.html",element[3].getContent('WEB_title')) + ret+="""%s"""%(self.generateUrlProject(element[3].absolute_url())+"/index.html",element[3].getContent('WEB_title')) return ret def formatElementForOverview(self,element): @@ -1169,20 +1177,26 @@ class MPIWGProject(CatalogAware,Folder): if filter: splitted=text2.split("""

""") - tmp=splitted[1].split("

") - self.REQUEST.SESSION['image']=tmp[0].split("\"")[1].encode('utf-8') - split2="

".join(tmp[1:]) - - text3=splitted[0]+split2 - - splitted=text3.split("""

""") - tmp=splitted[1].split("

") - print tmp - self.REQUEST.SESSION['imagecap']=tmp[0].encode('utf-8') - split4="".join(tmp[1:]) + if len(splitted)>1: + tmp=splitted[1].split("

") + self.REQUEST.SESSION['image']=tmp[0].split("\"")[1].encode('utf-8') + split2="

".join(tmp[1:]) + + text3=splitted[0]+split2 + + splitted=text3.split("""

""") + if len(splitted)>1: + tmp=splitted[1].split("

") + self.REQUEST.SESSION['imagecap']=tmp[0].encode('utf-8') + split4="".join(tmp[1:]) - text5=splitted[0]+split4 - + text5=splitted[0]+split4 + else: + #keine caption + text5=text3 + else: + #kein bild + text5=text2 else: text5=text2