Annotation of OSAS/OSA_system/OSAS_addfiles.py, revision 1.1
1.1 ! dwinter 1: # Methoden und Classen zum Hinzufuegen von Dokumenten
! 2:
! 3: import OSAS_add
! 4: from OFS.Folder import Folder
! 5: from AccessControl import ClassSecurityInfo
! 6: from Globals import InitializeClass
! 7: from Products.PageTemplates.PageTemplateFile import PageTemplateFile
! 8: from Products.PageTemplates.PageTemplate import PageTemplate
! 9:
! 10: class OSAS_add_Document(Folder):
! 11: """Hinzufuegen eines Dokumentes zum Storage"""
! 12: security=ClassSecurityInfo()
! 13:
! 14: def __init__(self,id):
! 15: """initialize a new instance"""
! 16: self.id = id
! 17:
! 18:
! 19: meta_type='OSAS_add_Document'
! 20: manage_options = Folder.manage_options+(
! 21: {'label':'Main Config','action':'add_Document_config'},
! 22: )
! 23:
! 24:
! 25:
! 26: security.declarePublic('add_Document_config')
! 27: def add_Document_config(self):
! 28: """Main configuration"""
! 29: pt=PageTemplateFile('products/OSA_system/ChangeOSAS_addDocument.zpt').__of__(self)
! 30: return pt()
! 31:
! 32: security.declarePublic('change_OSAS_add_Document')
! 33: def change_OSAS_add_Document(self,RESPONSE=None):
! 34: """Change"""
! 35: # self.RootFolderName=RootFolderName
! 36: if RESPONSE is not None:
! 37: RESPONSE.redirect('manage_main')
! 38:
! 39: security.declarePublic('index_html')
! 40: def index_html(self):
! 41: """stantard aufruf"""
! 42: return OSAS_add.add(self,no_upload=1)
! 43:
! 44:
! 45: security.declarePublic('add2')
! 46: def add2(self):
! 47: """ anlegen naechster schritt"""
! 48: return OSAS_add.add2(self)
! 49:
! 50: def add3(self):
! 51: """Foldername"""
! 52: return OSAS_add.add3(self)
! 53:
! 54: def add4(self):
! 55: """Applet"""
! 56: return OSAS_add.add4(self)
! 57:
! 58: def add5(self):
! 59: """Foldername"""
! 60: return OSAS_add.add5(self)
! 61:
! 62: def add6(self):
! 63: """write new index.meta file"""
! 64: return OSAS_add.add6(self)
! 65:
! 66:
! 67: def addImages(self,path):
! 68: """Hinzufügen eines neuen Imagesfolders"""
! 69: return OSAS_add.addImages(self,path)
! 70:
! 71: def addImages2(self):
! 72: """Upload des neuen Imagefolders"""
! 73: return OSAS_add.addImages(self,path)
! 74:
! 75: def manage_AddOSAS_add_DocumentForm(self):
! 76: """interface for adding the OSAS_add_Metadata"""
! 77: pt=PageTemplateFile('products/OSA_system/AddOSAS_document.zpt').__of__(self)
! 78: return pt()
! 79:
! 80: def manage_AddOSAS_add_Document(self,id,RESPONSE=None):
! 81: """add the OSAS_root"""
! 82: newObj=OSAS_add_Document(id)
! 83: self.Destination()._setObject(id,newObj)
! 84: if RESPONSE is not None:
! 85: RESPONSE.redirect('manage_main')
! 86:
! 87:
! 88: InitializeClass(OSAS_add_Document)
! 89:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>