Diff for /MPIWGWeb/MPIWGStaff.py between versions 1.10.2.56 and 1.10.2.61

version 1.10.2.56, 2008/09/03 11:13:44 version 1.10.2.61, 2008/09/12 15:54:49
Line 22  import time Line 22  import time
 import logging  import logging
 import email  import email
 import re  import re
   from OFS.Cache import Cacheable
   
 from MPIWGHelper import *  from MPIWGHelper import *
 #ersetzt logging  #ersetzt logging
Line 56  def createNewDBEntry(self,publish_the_da Line 57  def createNewDBEntry(self,publish_the_da
             return False,"ERROR:key%s already exists"%key              return False,"ERROR:key%s already exists"%key
                   
         #eintragen          #eintragen
         columnlist="""publish_the_data,key,last_name,first_name,title,status,e_mail,e_mail_p,date_from,date_to,department,home_inst,funded_by,e_mail2,date_stay_at_mpiwg,web_object_created,"group" """          columnlist="""publish_the_data,key,last_name,first_name,title,status,e_mail,e_mail_p,date_from,date_to,department,home_inst,funded_by,e_mail2,date_stay_at_mpiwg,web_object_created,"group",current_work,current_work_p """
         insertTuple=(publish_the_data,key,name,vorname,title,position,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2,stay_at_mpiwg,web_object_created,group)          insertTuple=(publish_the_data,key,name,vorname,title,position,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by,e_mail2,stay_at_mpiwg,web_object_created,group,current_work,"yes")
                   
         insert=[]          insert=[]
         for element in insertTuple:          for element in insertTuple:
Line 72  def createNewDBEntry(self,publish_the_da Line 73  def createNewDBEntry(self,publish_the_da
         self.ZSQLQuery(queryStr)          self.ZSQLQuery(queryStr)
         logging.info("QQQQ %s:"%queryStr)          logging.info("QQQQ %s:"%queryStr)
         #currentwork          #currentwork
         if not (current_work==""):          #if not (current_work==""):
             queryStr="INSERT INTO current_work (key_main,current,publish) VALUES ('%s',%s,'%s')"%(key,self.ZSQLQuote(current_work),"yes")          #    queryStr="INSERT INTO current_work (key_main,current,publish) VALUES ('%s',%s,'%s')"%(key,self.ZSQLQuote(current_work),"yes")
   
             self.ZSQLQuery(queryStr)          #  self.ZSQLQuery(queryStr)
                   
         return True,msg          return True,msg
 class MPIWGStaff(CatalogAware,ZSQLExtendFolder):  class MPIWGStaff(CatalogAware,ZSQLExtendFolder,Cacheable):
     """Staff"""      """Staff"""
   
     meta_type="MPIWGStaff"      meta_type="MPIWGStaff"
Line 115  class MPIWGStaff(CatalogAware,ZSQLExtend Line 116  class MPIWGStaff(CatalogAware,ZSQLExtend
         #logging.error("NEW KEY:%s"%(self.firstName+'_'+self.lastName).lower().replace(' ',''))          #logging.error("NEW KEY:%s"%(self.firstName+'_'+self.lastName).lower().replace(' ',''))
         return (self.firstName+'_'+self.lastName).lower().replace(' ','')          return (self.firstName+'_'+self.lastName).lower().replace(' ','')
                   
     def getConnectionObj(self):#ueberschreibe connection id methode          def getConnectionObj(self):
                     """returns connection id (from root)"""
             return getattr(self.de,self.de.connection_id)           root = self.getMPIWGRoot()
            return root.getConnectionObj()
                   
     def isPublished(self):      def isPublished(self):
         """gib publications status aus der datenbank aus"""          """gib publications status aus der datenbank aus"""
Line 163  class MPIWGStaff(CatalogAware,ZSQLExtend Line 165  class MPIWGStaff(CatalogAware,ZSQLExtend
         self.publicationSelectionMode=publicationSelectionMode          self.publicationSelectionMode=publicationSelectionMode
                   
         if RESPONSE:          if RESPONSE:
             self.redirect(RESPONSE,"<Publications")              self.redirect(RESPONSE,"editPublications")
                           
           
     def downloadCV(self,RESPONSE):      def downloadCV(self,RESPONSE):
Line 595  class MPIWGStaff(CatalogAware,ZSQLExtend Line 597  class MPIWGStaff(CatalogAware,ZSQLExtend
                   
                   
         if (person.current_work) and (not person.current_work==""):          if (person.current_work) and (not person.current_work==""):
             ret="<p class=\"bio_section_header\">Current work: </p><br/>"              ret+="<p class=\"bio_section_header\">Current work: </p><br/>"
               
             ret+=person.current_work+"<br/>"              ret+=person.current_work+"<br/>"
               if (person.cv) and (not person.cv==""):
         ret+="<br/>"              ret+="<p class=\"bio_section_header\">Curriculum Vitae: </p><br/>"
         ret+=self.formatAscii(person.cv)          ret+=self.formatAscii(person.cv)
                   
         return ret          return ret

Removed from v.1.10.2.56  
changed lines
  Added in v.1.10.2.61


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>