--- OSAS/OSA_system/OSAS_archiver.py 2004/01/06 14:39:49 1.6 +++ OSAS/OSA_system/OSAS_archiver.py 2004/01/07 10:46:30 1.7 @@ -416,7 +416,7 @@ class OSAS_archiver(Folder, Persistent,I def getProducer(self,id): """Gebe ProducerObjekt zurück""" - obj=getattr(self.aq_parent.producerFolder,id) + obj=getattr(self.producerFolder,id) return obj @@ -431,16 +431,17 @@ class OSAS_archiver(Folder, Persistent,I def createFolders(self,folderList,producer): """Erzeug die entsprechenden Folder""" #hack - producer="library" + #producer="library" if type(folderList)==StringType: folders=[folderList] else: folders=folderList - + #return producer + producerFolderName=self.getProducer(producer).producerFolderName for folder in folders: - os.mkdir(self.startPath+"/"+producer+"/"+folder) - os.chmod(self.startPath+"/"+producer+"/"+folder,0775) + os.mkdir(self.startPath+"/"+producerFolderName+"/"+folder) + os.chmod(self.startPath+"/"+producerFolderName+"/"+folder,0775) self.REQUEST.SESSION['folderList']=folders pt=PageTemplateFile('Products/OSA_system/createFolders.zpt').__of__(self) return pt() @@ -530,14 +531,15 @@ class OSAS_producer(SimpleItem,Persisten meta_type="OSAS_producer" - def __init__(self,shortName,fullName,address="",url="",contact=""): + def __init__(self,shortName,fullName,producerFolderName,address="",url="",contact=""): self.id=shortName self.title=fullName self.address=address self.url=url self.contact=contact - + self.producerFolderName=producerFolderName + manage_options = SimpleItem.manage_options+( {'label':'Main Config','action':'changeOSAS_producerForm'}, ) @@ -547,25 +549,29 @@ class OSAS_producer(SimpleItem,Persisten pt=PageTemplateFile('Products/OSA_system/ChangeOSAS_producer.zpt').__of__(self) return pt() - def changeOSAS_producer(self,title,address,contact="",url=""): + def changeOSAS_producer(self,title,address,producerFolderName,contact="",url="",RESPONSE=None): """change""" - self.title=fullName + self.title=title self.address=address self.url=url self.contact=contact + self.producerFolderName=producerFolderName + if RESPONSE: + RESPONSE.redirect("manage_main") + def manage_AddOSAS_producerForm(self): """interface for adding the OSAS_root""" pt=PageTemplateFile('Products/OSA_system/AddOSAS_producer.zpt').__of__(self) return pt() -def manage_AddOSAS_producer(self,id,title="",contact="",address="",url="",RESPONSE=None): +def manage_AddOSAS_producer(self,id,producerFolderName,title="",contact="",address="",url="",RESPONSE=None): """add the OSAS_root""" if title=="": title=id - newObj=OSAS_producer(id, title,address,contact,url) + newObj=OSAS_producer(id, title,producerFolderName,address,contact,url) self._setObject(id,newObj) if RESPONSE is not None: RESPONSE.redirect('manage_main')