--- MPIWGWeb/MPIWGProjects.py 2004/10/21 14:28:55 1.40 +++ MPIWGWeb/MPIWGProjects.py 2004/11/03 17:33:31 1.41 @@ -397,16 +397,18 @@ class MPIWGRoot(ZSQLExtendFolder): for object in objects: obj=object[1] - 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 - fieldNameTmp="WEB_title" + + if not getattr(obj,'invisible',None): + 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 + fieldNameTmp="WEB_title" + else: + fieldNameTmp="xdata_07" else: - fieldNameTmp="xdata_07" - else: - fieldNameTmp=fieldName - - ret.append((obj,obj.getContent(fieldNameTmp))) + fieldNameTmp=fieldName + + ret.append((obj,obj.getContent(fieldNameTmp))) if sort=="int": @@ -534,6 +536,7 @@ class MPIWGRoot(ZSQLExtendFolder): """generate Tree from project list""" returnList=[] 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 if not idNr=="": splittedId=idNr.split(".") @@ -725,13 +728,11 @@ class MPIWGRoot(ZSQLExtendFolder): if proj: proj2=[] for x in proj: - - 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) + + if not getattr(x.getObject(),'invisible',None): + if not((splitted[1]==" Christoph") and (splitted[0]=="Hoffmann") and (str(x.WEB_title).find('Einstein')>0)): proj2.append(x) - # proj2.sort(sortP) - # ret.append((y,proj2)) + else: proj2=[] @@ -739,6 +740,7 @@ class MPIWGRoot(ZSQLExtendFolder): if proj: names=[x.WEB_title for x in proj] for x in proj: + if not x.WEB_title in names: proj2.append(x) @@ -846,6 +848,18 @@ class MPIWGProject(Folder): 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): """experimental crosslinker""" @@ -903,6 +917,7 @@ class MPIWGProject(Folder): {'label':'Edit BasisInfo','action':'editMPIWGBasisForm'}, {'label':'Edit Publications','action':'editMPIWGRelatedPublicationsForm'}, {'label':'Edit Themes & Disciplines','action':'editMPIWGDisciplinesThemesForm'}, + {'label':'Versionmanager','action':'versionManageForm'}, )