Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
moved Sessions and Daft folders here.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Dec 19, 1997
1 parent 9b2dab0 commit 1f5b413
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 27 deletions.
14 changes: 8 additions & 6 deletions DraftFolder.py
Expand Up @@ -14,15 +14,15 @@
A Draft folder is a surrogate for a folder. It get\'s subobjects by
gettingthem from a session copy of a base folder.
$Id: DraftFolder.py,v 1.5 1997/12/18 16:45:40 jeffrey Exp $'''
__version__='$Revision: 1.5 $'[11:-2]
$Id: DraftFolder.py,v 1.6 1997/12/19 17:06:20 jim Exp $'''
__version__='$Revision: 1.6 $'[11:-2]

import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
import time, OFS.SimpleItem, AccessControl.Role
import Persistence, Acquisition, Globals
import AccessControl.User, Session
from string import rfind
from App.Management import Management
from Globals import HTMLFile
from ImageFile import ImageFile

addForm=HTMLFile('draftFolderAdd', globals())

Expand All @@ -49,14 +49,13 @@ def hack(self):

class DraftFolder(Persistence.Persistent,
AccessControl.Role.RoleManager,
SimpleItem.Item,
OFS.SimpleItem.Item,
Acquisition.Implicit,
Management,
):

meta_type='Draft Folder'
icon='DraftFolderIcon'
DraftFolderIcon=ImageFile('www/DraftFolder.gif', globals())
isPrincipiaFolderish=1

manage_options=(
Expand Down Expand Up @@ -212,6 +211,9 @@ class Supervisor(AccessControl.User.UserFolder, Session.Session):
##############################################################################
#
# $Log: DraftFolder.py,v $
# Revision 1.6 1997/12/19 17:06:20 jim
# moved Sessions and Daft folders here.
#
# Revision 1.5 1997/12/18 16:45:40 jeffrey
# changeover to new ImageFile and HTMLFile handling
#
Expand Down
16 changes: 9 additions & 7 deletions Session.py
Expand Up @@ -12,11 +12,11 @@
$Id: Session.py,v 1.8 1997/12/18 16:42:02 jeffrey Exp $'''
$Id: Session.py,v 1.9 1997/12/19 17:06:20 jim Exp $'''

import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
import time, OFS.SimpleItem, AccessControl.Role
import Persistence, Acquisition, Globals
from string import rfind
from ImageFile import ImageFile

_addForm=Globals.HTMLFile('sessionAdd', globals())
def addForm(realself, self, REQUEST, **ignored):
Expand All @@ -40,15 +40,14 @@ def add(self, id, title, acl_type='A',acl_roles=[], REQUEST=None):

class Session(Persistence.Persistent,
AccessControl.Role.RoleManager,
SimpleItem.Item,
OFS.SimpleItem.Item,
Acquisition.Implicit):

'''Model sessions as drop-in objects
'''

meta_type='Session'
icon='SessionIcon'
SessionIcon=ImageFile('www/session.gif', globals())
icon='session'

manage_options=({'icon':'', 'label':'Join/Leave',
'action':'manage_main', 'target':'manage_main',
Expand Down Expand Up @@ -125,14 +124,17 @@ def discard(self, REQUEST):

def nonempty(self): return Globals.SessionBase[self.cookie].nonempty()

__version__='$Revision: 1.8 $'[11:-2]
__version__='$Revision: 1.9 $'[11:-2]




##############################################################################
#
# $Log: Session.py,v $
# Revision 1.9 1997/12/19 17:06:20 jim
# moved Sessions and Daft folders here.
#
# Revision 1.8 1997/12/18 16:42:02 jeffrey
# *** empty log message ***
#
Expand Down
16 changes: 9 additions & 7 deletions Version.py
Expand Up @@ -12,11 +12,11 @@
$Id: Version.py,v 1.8 1997/12/18 16:42:02 jeffrey Exp $'''
$Id: Version.py,v 1.9 1997/12/19 17:06:20 jim Exp $'''

import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
import time, OFS.SimpleItem, AccessControl.Role
import Persistence, Acquisition, Globals
from string import rfind
from ImageFile import ImageFile

_addForm=Globals.HTMLFile('sessionAdd', globals())
def addForm(realself, self, REQUEST, **ignored):
Expand All @@ -40,15 +40,14 @@ def add(self, id, title, acl_type='A',acl_roles=[], REQUEST=None):

class Session(Persistence.Persistent,
AccessControl.Role.RoleManager,
SimpleItem.Item,
OFS.SimpleItem.Item,
Acquisition.Implicit):

'''Model sessions as drop-in objects
'''

meta_type='Session'
icon='SessionIcon'
SessionIcon=ImageFile('www/session.gif', globals())
icon='session'

manage_options=({'icon':'', 'label':'Join/Leave',
'action':'manage_main', 'target':'manage_main',
Expand Down Expand Up @@ -125,14 +124,17 @@ def discard(self, REQUEST):

def nonempty(self): return Globals.SessionBase[self.cookie].nonempty()

__version__='$Revision: 1.8 $'[11:-2]
__version__='$Revision: 1.9 $'[11:-2]




##############################################################################
#
# $Log: Version.py,v $
# Revision 1.9 1997/12/19 17:06:20 jim
# moved Sessions and Daft folders here.
#
# Revision 1.8 1997/12/18 16:42:02 jeffrey
# *** empty log message ***
#
Expand Down
25 changes: 18 additions & 7 deletions __init__.py
Expand Up @@ -8,33 +8,44 @@
#
##############################################################################
__doc__='''OFS
$Id: __init__.py,v 1.1 1997/12/18 17:05:54 jim Exp $'''
__version__='$Revision: 1.1 $'[11:-2]
$Id: __init__.py,v 1.2 1997/12/19 17:06:22 jim Exp $'''
__version__='$Revision: 1.2 $'[11:-2]

import Session, DraftFolder
from ImageFile import ImageFile

__.meta_types=(
meta_types=(
{'name':'Draft Folder', 'action':'manage_addDraftFolderForm'},
{'name':'Session', 'action':'manage_addSessionForm'},
{'name':'File', 'action':'manage_addFileForm'},
{'name':'Image', 'action':'manage_addImageForm'},
{'name':'Folder', 'action':'manage_addFolderForm'},
{'name':'Document', 'action':'manage_addDocumentForm'},
)
__.methods={

methods={
'manage_addSessionForm': Session.addForm,
'manage_addSession': Session.add,
'manage_addDraftFolderForm': DraftFolder.addForm,
'manage_addDraftFolder': DraftFolder.add,
}




misc_={
'image': ImageFile('images/Image_icon.gif', globals()),
'file': ImageFile('images/File_icon.gif', globals()),
'doc': ImageFile('images/Document_icon.gif', globals()),
'draft': ImageFile('images/DraftFolder.gif', globals()),
'sup': ImageFile('images/DraftFolderControl.gif', globals()),
'session': ImageFile('images/session.gif', globals()),
'folder': ImageFile('images/folder.gif', globals()),
}

##############################################################################
#
# $Log: __init__.py,v $
# Revision 1.2 1997/12/19 17:06:22 jim
# moved Sessions and Daft folders here.
#
# Revision 1.1 1997/12/18 17:05:54 jim
# *** empty log message ***
#
Expand Down

0 comments on commit 1f5b413

Please sign in to comment.