version 1.47.2.23, 2005/09/15 12:57:41
|
version 1.47.2.27, 2005/10/11 13:14:01
|
Line 700 class MPIWGRoot(ZSQLExtendFolder):
|
Line 700 class MPIWGRoot(ZSQLExtendFolder):
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
def updatePublicationDB(self,personId=None): |
|
"""updates the publication db, i.e. copy year into the main table""" |
|
|
|
if personId: |
|
founds = self.ZSQLInlineSearch(_table="publications",id_main=personId) |
|
else: |
|
founds = self.ZSQLInlineSearch(_table="publications") |
|
|
|
for found in founds: |
|
print found |
|
if found.id_institutsbibliographie and (not found.id_institutsbibliographie ==""): |
|
entries = self.ZSQLInlineSearch(_table="institutsbiblio",id=found.id_institutsbibliographie) |
|
for entry in entries: |
|
self.ZSQLChange(_table='publications',_identify='oid=%s' % found.oid,year=entry.year,referencetype=entry.reference_type) |
|
|
|
if found.id_gen_bib and (not found.id_gen_bib ==""): |
|
entries = self.ZSQLInlineSearch(_table="bibliography",id=found.id_gen_bib) |
|
for entry in entries: |
|
self.ZSQLChange(_table='publications',_identify='oid=%s' % found.oid,year=entry.year,referencetype=entry.reference_type) |
|
|
|
return True |
|
|
|
|
|
|
def updateHomepages(self,RESPONSE): |
def updateHomepages(self,RESPONSE): |
"""lege members an""" |
"""lege members an""" |
|
|
self.upDateSQL('personalwww.xml') |
self.upDateSQL('personalwww.xml') |
founds=self.ZSQLInlineSearch(_table='personal_www',publish_the_data='yes') |
founds=self.ZSQLInlineSearch(_table='personal_www',publish_the_data='yes') |
project=getattr(self,'members') |
project=getattr(self,'members') |
Line 718 class MPIWGRoot(ZSQLExtendFolder):
|
Line 741 class MPIWGRoot(ZSQLExtendFolder):
|
RESPONSE.write("<p>old:%s (%s,%s)</p>\n"%(found.username,found.name,found.vorname)) |
RESPONSE.write("<p>old:%s (%s,%s)</p>\n"%(found.username,found.name,found.vorname)) |
|
|
|
|
|
|
#delete non existing |
#delete non existing |
|
|
|
|
Line 733 class MPIWGRoot(ZSQLExtendFolder):
|
Line 757 class MPIWGRoot(ZSQLExtendFolder):
|
pass |
pass |
self.ProjectCatalog.manage_catalogReindex(self.REQUEST,RESPONSE,self.REQUEST['URL1']) |
self.ProjectCatalog.manage_catalogReindex(self.REQUEST,RESPONSE,self.REQUEST['URL1']) |
|
|
|
self.updatePublicationDB() |
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 1298 class MPIWGProject(CatalogAware,Folder):
|
Line 1323 class MPIWGProject(CatalogAware,Folder):
|
"""get all Publications""" |
"""get all Publications""" |
def sort_images(x,y): |
def sort_images(x,y): |
return cmp(getattr(x[1],'place',0),getattr(y[1],'place',0)) |
return cmp(getattr(x[1],'place',0),getattr(y[1],'place',0)) |
print self.getId() |
|
publications=self.ZopeFind(self,obj_metatypes=['MPIWGProject_publication']) |
publications=self.ZopeFind(self,obj_metatypes=['MPIWGProject_publication']) |
|
|
publications.sort(sort_images) |
publications.sort(sort_images) |
Line 1340 class MPIWGProject(CatalogAware,Folder):
|
Line 1365 class MPIWGProject(CatalogAware,Folder):
|
"""get all Images""" |
"""get all Images""" |
def sort_images(x,y): |
def sort_images(x,y): |
return cmp(getattr(x[1],'place',0),getattr(y[1],'place',0)) |
return cmp(getattr(x[1],'place',0),getattr(y[1],'place',0)) |
print self.getId() |
|
images=self.ZopeFind(self,obj_metatypes=['MPIWGProject_image']) |
images=self.ZopeFind(self,obj_metatypes=['MPIWGProject_image']) |
|
|
images.sort(sort_images) |
images.sort(sort_images) |
Line 1729 class MPIWGProject(CatalogAware,Folder):
|
Line 1754 class MPIWGProject(CatalogAware,Folder):
|
return True |
return True |
|
|
security.declareProtected('View managment screens','edit') |
security.declareProtected('View managment screens','edit') |
def edit(self): |
def edit(self,western=None): |
"""Edit pages""" |
"""Edit pages""" |
|
if western: |
|
self.REQUEST.RESPONSE.setCookie("MP_debug_code","western",path="/") |
|
|
|
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGProjectNeu.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','edit_MPIWGProjectNeu.zpt')).__of__(self) |
return pt() |
return pt() |
|
|
Line 1752 class MPIWGProject(CatalogAware,Folder):
|
Line 1781 class MPIWGProject(CatalogAware,Folder):
|
|
|
def getWebProject_description(self): |
def getWebProject_description(self): |
"""get description""" |
"""get description""" |
|
debug= self.REQUEST.cookies.get("MP_debug_code",None) |
|
|
|
if debug and debug=="western": |
|
return """ |
|
<html> |
|
<head> |
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
</head> |
|
<body>%s |
|
</html></body> |
|
"""%self.WEB_project_description[0] |
|
|
if type(self.WEB_project_description) is ListType: |
|
return """ |
return """ |
<html> |
<html> |
<head> |
<head> |
Line 1762 class MPIWGProject(CatalogAware,Folder):
|
Line 1801 class MPIWGProject(CatalogAware,Folder):
|
<body>%s |
<body>%s |
</html></body> |
</html></body> |
"""%self.getContent('WEB_project_description') |
"""%self.getContent('WEB_project_description') |
else: |
|
return self.WEB_project_description |
|
|
|
|
|
def editMPIWGProjectForm(self): |
def editMPIWGProjectForm(self): |