File:  [Repository] / OSAS / OSA_system / OSAS_Root.py
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Thu Oct 9 08:04:26 2003 UTC (20 years, 8 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
products gegen Products ausgetauscht

    1: from time import localtime,strftime
    2: from Acquisition import Implicit
    3: from OFS.Folder import Folder
    4: from Products.PageTemplates.PageTemplateFile import PageTemplateFile
    5: from Products.PageTemplates.PageTemplate import PageTemplate
    6: 
    7: class OSAS_Root(Folder,Implicit):
    8:     """Implicit Folder of the  Storage Systems"""
    9:     def __init__(self,id,RootFolderName):
   10:         """initialize a new instance"""
   11:         self.id = id
   12:         self.RootFolderName = RootFolderName
   13: 
   14:     meta_type="OSAS_Root"
   15: 
   16:     manage_options = Folder.manage_options+(
   17:         {'label':'Main Config','action':'Root_config'},
   18:         )
   19: 
   20:     def Root_config(self):
   21:         """Main configuration"""
   22:         pt=PageTemplateFile('Products/OSA_system/ConfigOSAS_Root.zpt').__of__(self)
   23:         return pt()
   24: 
   25:     def change_OSAS_Root(self,RootFolderName,RESPONSE=None):
   26:         """Change RootFolderName"""
   27:         self.RootFolderName=RootFolderName
   28:         if RESPONSE is not None:
   29:             RESPONSE.redirect('manage_main')
   30: 
   31:     def date(self):
   32:         """gives formatted date"""
   33: 	return strftime("%d.%m.%Y",localtime())	
   34: 
   35: def manage_AddOSAS_RootForm(self):
   36:     """interface for adding the OSAS_root"""
   37:     pt=PageTemplateFile('Products/OSA_system/AddOSAS_Root.zpt').__of__(self)
   38:     return pt()
   39: 
   40: def manage_AddOSAS_Root(self,id,RootFolderName,RESPONSE=None):
   41:     """add the OSAS_root"""
   42:     newObj=OSAS_Root(id,RootFolderName)
   43:     self._setObject(id,newObj)
   44:     if RESPONSE is not None:
   45:         RESPONSE.redirect('manage_main')
   46: 
   47:     

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>