diff MPIWGStaff.py @ 68:2ad8aa9d306c

bugs in MPIWGTemplate fixed
author dwinter
date Thu, 02 May 2013 15:40:27 +0200
parents d452fff7c52e
children ad2e970ffd9f
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)