Commit 901dbc0a authored by 's avatar

*** empty log message ***

parent f885878e
......@@ -11,8 +11,8 @@
__doc__='''Application support
$Id: Application.py,v 1.22 1997/12/05 17:13:48 brian Exp $'''
__version__='$Revision: 1.22 $'[11:-2]
$Id: Application.py,v 1.23 1997/12/05 20:33:02 brian Exp $'''
__version__='$Revision: 1.23 $'[11:-2]
import Globals,Folder,os,regex
......@@ -46,7 +46,8 @@ class Application(Folder.Folder):
_reserved_names=('standard_html_header',
'standard_html_footer',
'acl_users')
'acl_users',
'Control_Panel')
def _init(self):
# Initialize users
......@@ -247,6 +248,9 @@ if __name__ == "__main__": main()
##############################################################################
#
# $Log: Application.py,v $
# Revision 1.23 1997/12/05 20:33:02 brian
# *** empty log message ***
#
# Revision 1.22 1997/12/05 17:13:48 brian
# New UI
#
......
......@@ -14,8 +14,8 @@ 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.2 1997/11/11 21:25:28 brian Exp $'''
__version__='$Revision: 1.2 $'[11:-2]
$Id: DraftFolder.py,v 1.3 1997/12/05 20:33:02 brian Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
import AccessControl.User, Session
......@@ -32,6 +32,20 @@ def add(self,id,baseid,title='',REQUEST=None):
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':'AccessControl/AccessControl_icon.gif',
'label':'Access Control',
'action':'manage_rolesForm', '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,
SimpleItem.Item,
......@@ -41,6 +55,7 @@ class DraftFolder(Persistence.Persistent,
meta_type='Draft Folder'
icon='OFS/DraftFolder.gif'
isPrincipiaFolderish=1
manage_options=(
{'icon':icon, 'label':'Contents',
......@@ -113,12 +128,11 @@ class DraftFolder(Persistence.Persistent,
oid=oids[-1]
del oids[-1]
base=pd.jar[oid].__of__(base)
base.manage_options=hack
return base
def __bobo_traverse__(self, REQUEST, name):
cookie_name=self.cookie_name
cookie=''
if REQUEST.has_key(cookie_name):
......@@ -146,9 +160,14 @@ class DraftFolder(Persistence.Persistent,
"%s/manage_draftFolder-%s/manage"
% (REQUEST['URL2'], self.id))
if not cookie: raise 'Redirect', (
REQUEST['URL1']+'/manage')
if not cookie:
# Just set cookie here, rather than redirect!
cookie=self.cookie
cookie_name=self.cookie_name
REQUEST['RESPONSE'].setCookie(cookie_name, cookie,
expires="Mon, 27-Dec-99 23:59:59 GMT",
path=REQUEST['SCRIPT_NAME']+cookie,)
REQUEST[cookie_name]=cookie
__traceback_info__=PATH_INFO, cookie, self.cookie
......@@ -172,18 +191,6 @@ class DraftFolder(Persistence.Persistent,
"Sorry, the requested document does not exist.<p>"
"\n<!--\n%s\n%s\n-->" % (name,REQUEST['REQUEST_METHOD']))
def manage(self, REQUEST):
"Access management interface making sure that user gets a cookie"
cookie=self.cookie
cookie_name=self.cookie_name
REQUEST['RESPONSE'].setCookie(
cookie_name, cookie,
expires="Mon, 27-Dec-99 23:59:59 GMT",
path=REQUEST['SCRIPT_NAME']+cookie,
)
REQUEST[cookie_name]=cookie
return Management.manage(self, REQUEST)
def manage_supervisor(self): return self.__allow_groups__
def parentObject(self):
......@@ -203,6 +210,9 @@ class Supervisor(AccessControl.User.UserFolder, Session.Session):
##############################################################################
#
# $Log: DraftFolder.py,v $
# Revision 1.3 1997/12/05 20:33:02 brian
# *** empty log message ***
#
# Revision 1.2 1997/11/11 21:25:28 brian
# Added copy/paste support, restricted unpickling, fixed DraftFolder bug
#
......
......@@ -19,12 +19,12 @@
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<!--#var id-->">
<A HREF="./<!--#var id-->/manage_main">
<A HREF="<!--#var id-->/manage_main">
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->"
ALT="Click to open this item" BORDER="0"></A>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="./<!--#var id-->/manage_main">
<A HREF="<!--#var id-->/manage_main">
<!--#var title_and_id--></A>
<!--#if modified_in_session-->
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/modified.gif"
......
......@@ -14,8 +14,8 @@ 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.2 1997/11/11 21:25:28 brian Exp $'''
__version__='$Revision: 1.2 $'[11:-2]
$Id: DraftFolder.py,v 1.3 1997/12/05 20:33:02 brian Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
import AccessControl.User, Session
......@@ -32,6 +32,20 @@ def add(self,id,baseid,title='',REQUEST=None):
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':'AccessControl/AccessControl_icon.gif',
'label':'Access Control',
'action':'manage_rolesForm', '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,
SimpleItem.Item,
......@@ -41,6 +55,7 @@ class DraftFolder(Persistence.Persistent,
meta_type='Draft Folder'
icon='OFS/DraftFolder.gif'
isPrincipiaFolderish=1
manage_options=(
{'icon':icon, 'label':'Contents',
......@@ -113,12 +128,11 @@ class DraftFolder(Persistence.Persistent,
oid=oids[-1]
del oids[-1]
base=pd.jar[oid].__of__(base)
base.manage_options=hack
return base
def __bobo_traverse__(self, REQUEST, name):
cookie_name=self.cookie_name
cookie=''
if REQUEST.has_key(cookie_name):
......@@ -146,9 +160,14 @@ class DraftFolder(Persistence.Persistent,
"%s/manage_draftFolder-%s/manage"
% (REQUEST['URL2'], self.id))
if not cookie: raise 'Redirect', (
REQUEST['URL1']+'/manage')
if not cookie:
# Just set cookie here, rather than redirect!
cookie=self.cookie
cookie_name=self.cookie_name
REQUEST['RESPONSE'].setCookie(cookie_name, cookie,
expires="Mon, 27-Dec-99 23:59:59 GMT",
path=REQUEST['SCRIPT_NAME']+cookie,)
REQUEST[cookie_name]=cookie
__traceback_info__=PATH_INFO, cookie, self.cookie
......@@ -172,18 +191,6 @@ class DraftFolder(Persistence.Persistent,
"Sorry, the requested document does not exist.<p>"
"\n<!--\n%s\n%s\n-->" % (name,REQUEST['REQUEST_METHOD']))
def manage(self, REQUEST):
"Access management interface making sure that user gets a cookie"
cookie=self.cookie
cookie_name=self.cookie_name
REQUEST['RESPONSE'].setCookie(
cookie_name, cookie,
expires="Mon, 27-Dec-99 23:59:59 GMT",
path=REQUEST['SCRIPT_NAME']+cookie,
)
REQUEST[cookie_name]=cookie
return Management.manage(self, REQUEST)
def manage_supervisor(self): return self.__allow_groups__
def parentObject(self):
......@@ -203,6 +210,9 @@ class Supervisor(AccessControl.User.UserFolder, Session.Session):
##############################################################################
#
# $Log: DraftFolder.py,v $
# Revision 1.3 1997/12/05 20:33:02 brian
# *** empty log message ***
#
# Revision 1.2 1997/11/11 21:25:28 brian
# Added copy/paste support, restricted unpickling, fixed DraftFolder bug
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment