Mercurial > hg > MPIWGWeb
changeset 68:2ad8aa9d306c
bugs in MPIWGTemplate fixed
author | dwinter |
---|---|
date | Thu, 02 May 2013 15:40:27 +0200 |
parents | d452fff7c52e |
children | c86ee1081b62 |
files | MPIWGStaff.py MPIWGTemplate.py |
diffstat | 2 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGStaff.py Thu May 02 10:14:52 2013 +0200 +++ b/MPIWGStaff.py Thu May 02 15:40:27 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="<p class=\"bio_section_header\">Research interests: </p><br/>" + for found in self.sortPriority(founds): + ret+=found.interest+"<br/>" + + + if (self.content.current_work) and (not self.content.current_work==""): + ret+="<p class=\"bio_section_header\">Current work: </p><br/>" + + ret+=self.current_work+"<br/>" + if (self.content.cv) and (not self.content.cv==""): + ret+="<p class=\"bio_section_header\">Curriculum Vitae: </p><br/>" + ret+=self.formatAscii(self.content.cv) + + return ret InitializeClass(MPIWGStaffMember)
--- a/MPIWGTemplate.py Thu May 02 10:14:52 2013 +0200 +++ b/MPIWGTemplate.py Thu May 02 15:40:27 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