--- MPIWGWeb/MPIWGProjects.py 2005/06/06 14:51:47 1.47.2.10 +++ MPIWGWeb/MPIWGProjects.py 2005/06/14 12:35:55 1.47.2.13 @@ -103,7 +103,7 @@ class MPIWGTemplate(ZopePageTemplate): return "aktiv" else: return "" - + def manage_addMPIWGTemplateForm(self): """Form for adding""" pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/AddMPIWGTemplate.zpt')).__of__(self) @@ -422,11 +422,14 @@ class MPIWGRoot(ZSQLExtendFolder): return cmp(x.WEB_title[0],y.WEB_title[0]) if type(fieldContentsEntry) is StringType: - fieldContents=[fieldContentsEntry] + fieldContentsTmp=[fieldContentsEntry] else: - fieldContents=fieldContentsEntry - - projects=self.ProjectCatalog({fieldName:string.join(fieldContents,' OR')}) + fieldContentsTmp=fieldContentsEntry + + fieldContents=[] + for x in fieldContentsTmp: + fieldContents.append(" AND ".join(x.split())) + projects=self.ProjectCatalog({fieldName:string.join(fieldContents,' AND')}) #print projects ret=[x for x in projects] ret.sort(sort) @@ -449,11 +452,13 @@ class MPIWGRoot(ZSQLExtendFolder): def getDisciplineList(self): """get disciplines as list""" - return self.disciplineList.split("\n") + list= self.disciplineList.split("\n") + return [x.rstrip().lstrip() for x in list] def getThemeList(self): """get themes as list""" - return self.themesList.split("\n") + list= self.themesList.split("\n") + return [x.rstrip().lstrip() for x in list] def test(self): """test""" @@ -644,7 +649,8 @@ class MPIWGRoot(ZSQLExtendFolder): #title=project[0].WEB_title title=[project[0].getContent('WEB_title')] #print title - returnList.append((depth,nr,title,project[0])) + if idNr[0]!="x": + returnList.append((depth,nr,title,project[0])) return returnList @@ -660,19 +666,28 @@ class MPIWGRoot(ZSQLExtendFolder): ret+="""
""") if len(splitted)>1: tmp=splitted[1].split("
") - self.REQUEST.SESSION['imagecap']=tmp[0].encode('utf-8') + self.imagecap=tmp[0].encode('utf-8') + split4="".join(tmp[1:]) text5=splitted[0]+split4 @@ -1224,12 +1241,12 @@ class MPIWGProject(CatalogAware,Folder): #teste ob WEB_project_description und keine führenden p tags if (len(text5)>4) and (not text5[0:3]=='') and (field=='WEB_project_description'): - return "
"+text5+"
" + text5= ""+text5+"
" #filter image - + return text5.encode('utf-8') def showImagesOfPage(self,imageUrl=None): @@ -1301,7 +1318,8 @@ class MPIWGProject(CatalogAware,Folder): else: splitted=list[0].split(";") - + splitted=[y.rstrip().lstrip() for y in splitted] + for x in splitted: if (not x==u'') and x in wert: return 1