version 1.10.2.6, 2005/10/13 18:00:36
|
version 1.10.2.10, 2005/10/14 17:13:37
|
Line 13 import bibliography
|
Line 13 import bibliography
|
from Globals import package_home |
from Globals import package_home |
from Products.PythonScripts.standard import sql_quote |
from Products.PythonScripts.standard import sql_quote |
from types import * |
from types import * |
|
from AccessControl import ClassSecurityInfo |
|
|
departmentList="Renn\nRheinberger\nDaston\nKlein\nSibum\nIT\nInstitut\nBibliothek" |
departmentList="Renn\nRheinberger\nDaston\nKlein\nSibum\nIT\nInstitut\nBibliothek" |
|
|
Line 33 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 34 class MPIWGStaff(CatalogAware,ZSQLExtend
|
meta_type="MPIWGStaff" |
meta_type="MPIWGStaff" |
default_catalog='MembersCatalog' |
default_catalog='MembersCatalog' |
departmentList=departmentList |
departmentList=departmentList |
|
security=ClassSecurityInfo() |
|
|
|
def getConnectionObj(self):#ueberschreibe connection id methode |
|
|
|
return getattr(self.de,self.de.connection_id) |
|
|
|
def isPublished(self): |
|
"""gib publications status aus der datenbank aus""" |
|
username=self.getId() |
|
query="select count(publish_the_data) from personal_www where username='%s' and publish_the_data='yes'"%username |
|
|
|
res = self.ZSQLQuery(query) |
|
|
|
if res and res[0].count>0: |
|
return True |
|
else: |
|
return False |
|
|
def createNewDBEntry(self,publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by="",e_mail2="",txt="",txt_p="no"): |
def createNewDBEntry(self,publish_the_data,id,name,vorname,username,title,e_mail,e_mail_p,date_from,date_to,abteilung,heimat_inst,funded_by="",e_mail2="",txt="",txt_p="no"): |
"""lege person in der datenbank an""" |
"""lege person in der datenbank an""" |
Line 98 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 116 class MPIWGStaff(CatalogAware,ZSQLExtend
|
def updateImage(self,file,publishImage,rename=None,RESPONSE=None): |
def updateImage(self,file,publishImage,rename=None,RESPONSE=None): |
"""update image""" |
"""update image""" |
|
|
|
if file and not(file.filename==""): |
if self.getImageObj(): |
if self.getImageObj(): |
self.getImageObj().updateImage(file,rename=None,RESPONSE=None) |
self.getImageObj().updateImage(file,rename=None,RESPONSE=None) |
else: |
else: |
Line 195 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 214 class MPIWGStaff(CatalogAware,ZSQLExtend
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGStaff.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGStaff.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
|
security.declareProtected('View management screens','changeMPIWGStaff') |
def changeMPIWGStaff(self,lastName,firstName,RESPONSE=None): |
def changeMPIWGStaff(self,lastName,firstName,RESPONSE=None): |
"""change it""" |
"""change it""" |
self.title="%s, %s"%(lastName,firstName) |
self.title="%s, %s"%(lastName,firstName) |
Line 204 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 224 class MPIWGStaff(CatalogAware,ZSQLExtend
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
security.declareProtected('View management screens','edit') |
def edit(self): |
def edit(self): |
"""Edit the pages""" |
"""Edit the pages""" |
|
#TODO: zusammenspiel mit apache, redirect auf 18080 rausnehmen bzw. zumindest verallgemeinern |
|
if self.REQUEST['SERVER_URL']=="http://www.mpiwg-berlin.mpg.de": |
|
redURL="http://xserve04.mpiwg-berlin.mpg.de:18080/www_neu/de/mitarbeiter/members/%s/edit"%self.getId() |
|
|
|
self.REQUEST.RESPONSE.redirect(redURL) |
|
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editMPIWGStaff.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editMPIWGStaff.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
mainEditFile=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editMPIWGStaff_main.zpt')) |
mainEditFile=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editMPIWGStaff_main.zpt')) |
|
|
|
security.declareProtected('View management screens','changeResearch') |
def changeResearch(self,noredirect=None): |
def changeResearch(self,noredirect=None): |
"""change the research entries""" |
"""change the research entries""" |
newEntries={} |
newEntries={} |
Line 263 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 290 class MPIWGStaff(CatalogAware,ZSQLExtend
|
if not noredirect: |
if not noredirect: |
self.REQUEST.RESPONSE.redirect(self.REQUEST['HTTP_REFERER']) |
self.REQUEST.RESPONSE.redirect(self.REQUEST['HTTP_REFERER']) |
|
|
|
security.declareProtected('View management screens','editCV') |
def editCV(self,cv=None,oid=None,RESPONSE=None): |
def editCV(self,cv=None,oid=None,RESPONSE=None): |
"""edit Cv""" |
"""edit Cv""" |
|
|
Line 277 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 305 class MPIWGStaff(CatalogAware,ZSQLExtend
|
if RESPONSE: |
if RESPONSE: |
RESPONSE.redirect("editCV") |
RESPONSE.redirect("editCV") |
|
|
|
security.declareProtected('View management screens','editAwards') |
def editAwards(self,awards=None,oid=None,RESPONSE=None): |
def editAwards(self,awards=None,oid=None,RESPONSE=None): |
"""edit a awards""" |
"""edit a awards""" |
|
|
Line 291 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 320 class MPIWGStaff(CatalogAware,ZSQLExtend
|
if RESPONSE: |
if RESPONSE: |
RESPONSE.redirect("editAwards") |
RESPONSE.redirect("editAwards") |
|
|
|
security.declareProtected('View management screens','editTalks') |
def editTalks(self): |
def editTalks(self): |
"""edit talks""" |
"""edit talks""" |
|
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editTalks.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editTalks.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
|
security.declareProtected('View management screens','editTeaching') |
def editTeaching(self): |
def editTeaching(self): |
"""edit Teaching""" |
"""edit Teaching""" |
|
|
Line 310 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 340 class MPIWGStaff(CatalogAware,ZSQLExtend
|
list= [x[0] for x in finds] |
list= [x[0] for x in finds] |
return "\n".join(list) |
return "\n".join(list) |
|
|
|
security.declareProtected('View management screens','editMainData') |
def editMainData(self,REQUEST=None,RESPONSE=None,name=None,**argv): |
def editMainData(self,REQUEST=None,RESPONSE=None,name=None,**argv): |
"""edit main data""" |
"""edit main data""" |
|
|
Line 323 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 354 class MPIWGStaff(CatalogAware,ZSQLExtend
|
if RESPONSE: |
if RESPONSE: |
RESPONSE.redirect("editMainData") |
RESPONSE.redirect("editMainData") |
|
|
|
security.declareProtected('View management screens','newBibliogrpaphy') |
def newBibliography(self,_docType=None, _addEntry=None,RESPONSE=None,**argv): |
def newBibliography(self,_docType=None, _addEntry=None,RESPONSE=None,**argv): |
|
|
"""add an entry to the bibliography""" |
"""add an entry to the bibliography""" |
Line 354 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 385 class MPIWGStaff(CatalogAware,ZSQLExtend
|
|
|
return True |
return True |
|
|
|
security.declareProtected('View management screens','editImage') |
def editImage(self): |
def editImage(self): |
"""edit images""" |
"""edit images""" |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editImageStaff.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editImageStaff.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
|
security.declareProtected('View management screens','editBibliography') |
def editBibliography(self): |
def editBibliography(self): |
"""edit the bibliography""" |
"""edit the bibliography""" |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editBibliographyEntry.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','editBibliographyEntry.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
|
|
|
security.declareProtected('View management screens','editPublications') |
def editPublications(self): |
def editPublications(self): |
"""edit the bibliographie""" |
"""edit the bibliographie""" |
|
|
Line 391 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 424 class MPIWGStaff(CatalogAware,ZSQLExtend
|
except: |
except: |
return 0 |
return 0 |
|
|
|
security.declareProtected('View management screens','changePublications') |
def changePublications(self): |
def changePublications(self): |
"""change the publication list""" |
"""change the publication list""" |
self.changeResearch(noredirect=True) |
self.changeResearch(noredirect=True) |
Line 400 class MPIWGStaff(CatalogAware,ZSQLExtend
|
Line 433 class MPIWGStaff(CatalogAware,ZSQLExtend
|
self.REQUEST.RESPONSE.redirect(self.REQUEST['HTTP_REFERER']) |
self.REQUEST.RESPONSE.redirect(self.REQUEST['HTTP_REFERER']) |
|
|
|
|
|
security.declareProtected('View management screens','addPublications') |
def addPublications(self,submit=None,REQUEST=None,noredirect=None): |
def addPublications(self,submit=None,REQUEST=None,noredirect=None): |
"""add publications""" |
"""add publications""" |
|
|