Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1d8e035d
Commit
1d8e035d
authored
Jan 02, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factored old Management mix-in into Navigation and Tabs.
parent
d92dfc23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
24 deletions
+41
-24
lib/python/Products/OFSP/DraftFolder.py
lib/python/Products/OFSP/DraftFolder.py
+41
-24
No files found.
lib/python/Products/OFSP/DraftFolder.py
View file @
1d8e035d
...
...
@@ -14,33 +14,47 @@ Provide an area where people can work without others seeing their changes.
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.9 1998/01/02 17:41:19 brian Exp $'''
__version__
=
'$Revision: 1.9 $'
[
11
:
-
2
]
import
Globals
,
Session
,
time
from
AccessControl.Role
import
RoleManager
from
AccessControl.User
import
UserFolder
from
App.Management
import
Management
from
Persistence
import
Persistent
from
Acquisition
import
Implicit
from
OFS.SimpleItem
import
Item
from
Session
import
Session
$Id: DraftFolder.py,v 1.10 1998/01/02 18:35:04 jim Exp $'''
__version__
=
'$Revision: 1.10 $'
[
11
:
-
2
]
import
time
,
OFS
.
SimpleItem
,
AccessControl
.
Role
,
App
.
Management
,
App
.
Undo
import
AccessControl.User
import
Persistence
,
Acquisition
,
Globals
import
AccessControl.User
,
Session
from
string
import
rfind
from
Globals
import
HTMLFile
from
string
import
rfind
addForm
=
HTMLFile
(
'draftFolderAdd'
,
globals
())
def
add
(
self
,
id
,
baseid
,
title
=
''
,
REQUEST
=
None
):
""" """
self
.
_setObject
(
id
,
DraftFolder
(
id
,
baseid
,
title
,
self
,
REQUEST
))
if
REQUEST
:
return
self
.
manage_main
(
self
,
REQUEST
)
class
DraftFolder
(
Persistent
,
Implicit
,
RoleManager
,
Management
,
Item
):
"""Add a new Folder object"""
i
=
DraftFolder
()
i
.
_init
(
id
,
baseid
,
title
,
self
,
REQUEST
)
self
.
_setObject
(
id
,
i
)
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
)
def
hack
(
self
):
return
({
'icon'
:
icon
,
'label'
:
'Contents'
,
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
{
'icon'
:
'OFS/Properties_icon.gif'
,
'label'
:
'Properties'
,
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
},
{
'icon'
:
''
,
'label'
:
'Security'
,
'action'
:
'manage_access'
,
'target'
:
'manage_main'
},
{
'icon'
:
'App/undo_icon.gif'
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
{
'icon'
:
'OFS/DraftFolderControl.gif'
,
'label'
:
'Supervise'
,
'action'
:
'manage_Supervise'
,
'target'
:
'manage_main'
},
)
class
DraftFolder
(
Persistence
.
Persistent
,
AccessControl
.
Role
.
RoleManager
,
OFS
.
SimpleItem
.
Item
,
Acquisition
.
Implicit
,
App
.
Management
.
Navigation
,
App
.
Undo
.
UndoSupport
,
):
""" """
meta_type
=
'Draft Folder'
icon
=
'misc_/OFSP/DraftFolderIcon'
...
...
@@ -134,7 +148,7 @@ class DraftFolder(Persistent,Implicit,RoleManager,Management,Item):
if
PATH_INFO
[:
1
]
!=
'/'
:
PATH_INFO
=
'/'
+
PATH_INFO
if
PATH_INFO
==
self
.
cookie
+
'/manage'
:
if
not
cookie
:
return
self
.
manage
return
Management
.
manage
return
App
.
Management
.
Navigation
.
manage
if
PATH_INFO
==
self
.
cookie
+
'/manage_menu'
:
return
self
.
manage_menu
if
name
==
'manage_Supervise'
:
...
...
@@ -180,12 +194,12 @@ class DraftFolder(Persistent,Implicit,RoleManager,Management,Item):
except
:
return
()
class
Supervisor
(
UserFolder
,
Session
):
class
Supervisor
(
AccessControl
.
User
.
UserFolder
,
Session
.
Session
):
manage
=
manage_main
=
HTMLFile
(
'DraftFolderSupervisor'
,
globals
())
manage_options
=
()
def
__init__
(
self
):
UserFolder
.
__init__
(
self
)
AccessConreol
.
User
.
UserFolder
.
__init__
(
self
)
...
...
@@ -193,6 +207,9 @@ class Supervisor(UserFolder, Session):
##############################################################################
#
# $Log: DraftFolder.py,v $
# Revision 1.10 1998/01/02 18:35:04 jim
# Factored old Management mix-in into Navigation and Tabs.
#
# Revision 1.9 1998/01/02 17:41:19 brian
# Made undo available only in folders
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment