version 1.39, 2004/10/21 14:28:09
|
version 1.41, 2004/11/03 17:33:31
|
Line 13 import string
|
Line 13 import string
|
import re |
import re |
import os |
import os |
from types import * |
from types import * |
|
import zLOG |
import xmlhelper # Methoden zur Verwaltung der projekt xmls |
import xmlhelper # Methoden zur Verwaltung der projekt xmls |
from OFS.SimpleItem import SimpleItem |
from OFS.SimpleItem import SimpleItem |
from OFS.Folder import Folder |
from OFS.Folder import Folder |
Line 145 class MPIWGRoot(ZSQLExtendFolder):
|
Line 145 class MPIWGRoot(ZSQLExtendFolder):
|
"""updates SQL databases using fm.jar""" |
"""updates SQL databases using fm.jar""" |
fmJarPath=os.path.join(package_home(globals()), 'updateSQL/fm.jar') |
fmJarPath=os.path.join(package_home(globals()), 'updateSQL/fm.jar') |
xmlPath=os.path.join(package_home(globals()), "updateSQL/%s"%fileName) |
xmlPath=os.path.join(package_home(globals()), "updateSQL/%s"%fileName) |
|
zLOG.LOG("MPIWG Web",zLOG.INFO,"java -classpath %s -Djava.awt.headless=true Convert %s"%(fmJarPath,xmlPath)) |
os.popen("java -classpath %s -Djava.awt.headless=true Convert %s"%(fmJarPath,xmlPath),"r").read() |
ret=os.popen("java -classpath %s -Djava.awt.headless=true Convert %s"%(fmJarPath,xmlPath),"r").read() |
|
zLOG.LOG("MPIWG Web",zLOG.INFO,"result convert: %s"%ret) |
return 1 |
return 1 |
|
|
def patchProjects(self,RESPONSE): |
def patchProjects(self,RESPONSE): |
Line 397 class MPIWGRoot(ZSQLExtendFolder):
|
Line 397 class MPIWGRoot(ZSQLExtendFolder):
|
|
|
for object in objects: |
for object in objects: |
obj=object[1] |
obj=object[1] |
|
|
|
if not getattr(obj,'invisible',None): |
if fieldName=="WEB_title_or_short": |
if fieldName=="WEB_title_or_short": |
|
|
if len(obj.getContent('xdata_07'))<3: # hack weil z.Z. manchmal noch ein Trennzeichen ; oder , im Feld statt leer |
if len(obj.getContent('xdata_07'))<3: # hack weil z.Z. manchmal noch ein Trennzeichen ; oder , im Feld statt leer |
Line 534 class MPIWGRoot(ZSQLExtendFolder):
|
Line 536 class MPIWGRoot(ZSQLExtendFolder):
|
"""generate Tree from project list""" |
"""generate Tree from project list""" |
returnList=[] |
returnList=[] |
for project in self.getProjectFields('xdata_05',sort="int"): # get Projects sorted by xdata_05 |
for project in self.getProjectFields('xdata_05',sort="int"): # get Projects sorted by xdata_05 |
|
|
for idNr in project[1].split(";"): # more than one number |
for idNr in project[1].split(";"): # more than one number |
if not idNr=="": |
if not idNr=="": |
splittedId=idNr.split(".") |
splittedId=idNr.split(".") |
Line 726 class MPIWGRoot(ZSQLExtendFolder):
|
Line 729 class MPIWGRoot(ZSQLExtendFolder):
|
proj2=[] |
proj2=[] |
for x in proj: |
for x in proj: |
|
|
|
if not getattr(x.getObject(),'invisible',None): |
if not((splitted[1]==" Christoph") and (splitted[0]=="Hoffmann") and (str(x.WEB_title).find('Einstein')>0)): |
if not((splitted[1]==" Christoph") and (splitted[0]=="Hoffmann") and (str(x.WEB_title).find('Einstein')>0)): |
|
|
#print repr(splitted[1]),repr(splitted[0]),repr(x.WEB_title) |
|
proj2.append(x) |
proj2.append(x) |
# proj2.sort(sortP) |
|
# ret.append((y,proj2)) |
|
else: |
else: |
proj2=[] |
proj2=[] |
|
|
Line 739 class MPIWGRoot(ZSQLExtendFolder):
|
Line 740 class MPIWGRoot(ZSQLExtendFolder):
|
if proj: |
if proj: |
names=[x.WEB_title for x in proj] |
names=[x.WEB_title for x in proj] |
for x in proj: |
for x in proj: |
|
|
if not x.WEB_title in names: |
if not x.WEB_title in names: |
proj2.append(x) |
proj2.append(x) |
|
|
Line 846 class MPIWGProject(Folder):
|
Line 848 class MPIWGProject(Folder):
|
|
|
meta_type='MPIWGProject' |
meta_type='MPIWGProject' |
|
|
|
def versionManageForm(self): |
|
"""version Manage form:currently only set to invisible""" |
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','MPIWGProject_versionManageForm.zpt')).__of__(self) |
|
return pt() |
|
|
|
def versionManage(self,invisible=None,RESPONSE=None): |
|
"""version Manage form:currently only set to invisible""" |
|
self.invisible=invisible |
|
|
|
if RESPONSE is not None: |
|
RESPONSE.redirect('manage_main') |
|
|
|
|
def crossLinker(self): |
def crossLinker(self): |
"""experimental crosslinker""" |
"""experimental crosslinker""" |
Line 903 class MPIWGProject(Folder):
|
Line 917 class MPIWGProject(Folder):
|
{'label':'Edit BasisInfo','action':'editMPIWGBasisForm'}, |
{'label':'Edit BasisInfo','action':'editMPIWGBasisForm'}, |
{'label':'Edit Publications','action':'editMPIWGRelatedPublicationsForm'}, |
{'label':'Edit Publications','action':'editMPIWGRelatedPublicationsForm'}, |
{'label':'Edit Themes & Disciplines','action':'editMPIWGDisciplinesThemesForm'}, |
{'label':'Edit Themes & Disciplines','action':'editMPIWGDisciplinesThemesForm'}, |
|
{'label':'Versionmanager','action':'versionManageForm'}, |
) |
) |
|
|
|
|