# HG changeset patch # User dwinter # Date 1367573974 -7200 # Node ID c86ee1081b6265a8dd1c8e501dbf18f613f13b0d # Parent 2ad8aa9d306c2ad38b7752821a70036b4137b193# Parent fd6931bd49c869ea7b2fd377b18d3410185f066c Merge with fd6931bd49c869ea7b2fd377b18d3410185f066c diff -r fd6931bd49c8 -r c86ee1081b62 MPIWGStaff.py --- a/MPIWGStaff.py Fri May 03 11:30:41 2013 +0200 +++ b/MPIWGStaff.py Fri May 03 11:39:34 2013 +0200 @@ -1740,5 +1740,28 @@ return self.executeZSQL(query,[self.getKey()]) + + + def generateProfileForPerson(self,REQUEST=None): + """erzeugt ein automatisches Profil aus den alten Eintraegen CV, Current work, und research interests""" + + ret="" + #founds=self.ZSQLInlineSearch(_table='research_interest',key_main=person.getKeyUTF8()) + founds=self.ZSQLInlineSearch(_table='research_interest',key_main=self.getKey()) + if founds: + ret="

Research interests:


" + for found in self.sortPriority(founds): + ret+=found.interest+"
" + + + if (self.content.current_work) and (not self.content.current_work==""): + ret+="

Current work:


" + + ret+=self.current_work+"
" + if (self.content.cv) and (not self.content.cv==""): + ret+="

Curriculum Vitae:


" + ret+=self.formatAscii(self.content.cv) + + return ret InitializeClass(MPIWGStaffMember) diff -r fd6931bd49c8 -r c86ee1081b62 MPIWGTemplate.py --- a/MPIWGTemplate.py Fri May 03 11:30:41 2013 +0200 +++ b/MPIWGTemplate.py Fri May 03 11:39:34 2013 +0200 @@ -99,7 +99,7 @@ def manage_addMPIWGTemplate(self, MPIWGType,id, text="",title=None,weight=0,REQUEST=None): "Add a Page Template with optional file content." - if type(MPIWGType)==StringType: + if isinstance(MPIWGType, str): MPIWGTypes=[MPIWGType] else: MPIWGTypes=MPIWGType