--- MPIWGWeb/MPIWGStaff.py 2008/08/20 09:40:57 1.10.2.43 +++ MPIWGWeb/MPIWGStaff.py 2008/08/25 10:35:02 1.10.2.46 @@ -372,6 +372,20 @@ class MPIWGStaff(CatalogAware,ZSQLExtend return style + def changeCurrentWork(self,current_work,publish,key,RESPONSE=None): + """change current work""" + + query="UPDATE personal_www SET current_work =%s WHERE key='%s'" + + self.ZSQLQuery(query%(self.ZSQLQuote(current_work),key)) + + query="UPDATE personal_www SET current_work_p =%s WHERE key='%s'" + + self.ZSQLQuery(query%(self.ZSQLQuote(publish),key)) + + if RESPONSE: + RESPONSE.redirect("edit") + security.declareProtected('View management screens','changeResearch') def changeResearch(self,noredirect=None): """change the research entries""" @@ -500,11 +514,11 @@ class MPIWGStaff(CatalogAware,ZSQLExtend for found in self.sortPriority(founds): ret+=found.interest+"
" - founds=self.ZSQLInlineSearch(_table='current_work',key_main=person.key) - if founds: + + if (person.current_work) and (not person.current_work==""): ret="Current work:

" - for found in self.sortPriority(founds): - ret+=found.current+"
" + + ret+=person.current_work+"
" ret+="
" ret+=self.formatAscii(person.cv)