Commit 9b2ffdee authored by 's avatar

New UI

parent c706fcf7
"""Access control package"""
__version__='$Revision: 1.6 $'[11:-2]
__version__='$Revision: 1.7 $'[11:-2]
import Globals
from User import SafeDtml
......@@ -11,7 +11,7 @@ from string import join, strip, split
class RoleManager:
"""Mixin role management support"""
manage_rolesForm=SafeDtml('AccessControl/RoleManager_manage_rolesForm')
manage_rolesForm=SafeDtml('AccessControl/manage_rolesForm')
smallRolesWidget=SafeDtml('AccessControl/smallRolesWidget')
......@@ -83,6 +83,9 @@ class RoleManager:
# $Log: Role.py,v $
# Revision 1.7 1997/12/05 17:10:08 brian
# New UI
#
# Revision 1.6 1997/11/18 21:48:20 brian
# Fixed bug that appeared after __roles__ were allowed to be acquired.
#
......
......@@ -3,9 +3,11 @@
<TITLE>Access Control</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<H2>Access Control</H2>
<!--#var menu_bar-->
<BR>
<FONT SIZE="+2">Access Control</FONT>
<P>
You may restrict access to <EM><!--#var title--></EM> using the form
You may restrict access to <EM><!--#var title_or_id--></EM> using the form
below. To add or remove roles, select or deselect
the desired role names and click &quot;Change&quot;.
<P>
......
......@@ -4,7 +4,7 @@
# install groupForm.dtml
# install groupsForm.dtml
# install memberForm.dtml
# install RoleManager_manage_rolesForm.dtml
# install manage_rolesForm.dtml
# install UserFolder_manage_editForm.dtml
# install UserFolder_manage_main.dtml
# install smallRolesWidget.dtml
......
"""Access control package"""
__version__='$Revision: 1.19 $'[11:-2]
__version__='$Revision: 1.20 $'[11:-2]
import Globals
from Persistence import Persistent
from Persistence import PersistentMapping
from App.Management import Management
from OFS.SimpleItem import Item
from Acquisition import Implicit
from DocumentTemplate import HTML
......@@ -31,6 +32,7 @@ class SafeDtml(HTML):
class User(Implicit, Persistent):
def __init__(self,name=None,password=None,roles=[]):
if name is not None:
......@@ -85,25 +87,27 @@ class SuperUser:
super=SuperUser()
class UserFolder(Implicit, Persistent, Item):
class UserFolder(Persistent, Item, Implicit, Management):
""" """
meta_type='User Folder'
id ='acl_users'
title ='User Folder'
icon ='AccessControl/UserFolder_icon.gif'
isPrincipiaFolderish=1
isAUserFolder=1
manage =SafeDtml('App/manage')
manage_menu=SafeDtml('App/menu')
manage_main=SafeDtml('AccessControl/UserFolder_manage_main')
_editForm =SafeDtml('AccessControl/UserFolder_manage_editForm')
index_html =manage_main
manage_main=Globals.HTMLFile('AccessControl/UserFolder_manage_main')
_editForm =Globals.HTMLFile('AccessControl/UserFolder_manage_editForm')
manage=manage_main
#index_html =manage_main
manage_options=(
{'icon':'AccessControl/UserFolder_icon.gif', 'label':'Contents',
'action':'manage_main', 'target':'manage_main'},
{'icon':'App/undo_icon.gif', 'label':'Undo',
'action':'manage_UndoForm', 'target':'manage_main'},
)
def _init(self):
......@@ -261,6 +265,9 @@ class UserFolderHandler:
# $Log: User.py,v $
# Revision 1.20 1997/12/05 17:10:10 brian
# New UI
#
# Revision 1.19 1997/11/20 13:39:54 jim
# Added logic to check for a broken user folder.
#
......
......@@ -2,9 +2,16 @@
<HEAD>
<TITLE>Change User</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Change User</H2>
<P>
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<!--#/if Principia-Session-->
<FORM ACTION="manage_editUser" METHOD="POST">
<TABLE>
<TR>
......
<HTML>
<HEAD>
<TITLE><!--#var title--></TITLE>
<TITLE>Contents of <!--#var title--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<H2><!--#var title--></H2>
<P>
<!--#if parentObject-->
<!--#in parentObject-->
<A HREF="<!--#var URL2-->/manage" target="_top">
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/UpFolder_icon.gif" BORDER=0></A>
Return to <!--#if title-->
<!--#var title-->
<!--#else title-->
<!--#var id-->
<!--#/if title-->
<BR>
<!--#/in parentObject-->
<!--#/if parentObject-->
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Contents of <EM><!--#var title--></EM></H2>
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<!--#/if Principia-Session-->
<!--#if userNames-->
<FORM ACTION="manage_editForm" METHOD="POST">
The following users have been defined. To edit a user,
select a user and click &quot;Edit&quot;.
<FORM ACTION="manage_deleteUser" METHOD="POST">
The following users have been defined. Click on a user to edit
that user.
<BR>
<SELECT NAME="name">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2>
<!--#in userNames-->
<OPTION VALUE="<!--#var sequence-item-->"> <!--#var sequence-item-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="CHECKBOX" NAME="names:list" VALUE="<!--#var sequence-item-->">
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="manage_editForm?name=<!--#var sequence-item fmt=url-quote-->">
<IMG SRC="<!--#var SOFTWARE_URL-->/AccessControl/User_icon.gif"
ALT="Click to edit this user" BORDER="0">
</A>
<A HREF="manage_editForm?name=<!--#var sequence-item fmt=url-quote-->">
<!--#var sequence-item-->
</A>
</TD>
</TR>
<!--#/in userNames-->
</SELECT>
<BR>
<INPUT TYPE="SUBMIT" VALUE=" Change ">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" VALUE="Delete">
</TD>
</TR>
</TABLE>
</FORM>
<!--#else userNames-->
<EM>There are no users defined.</EM>
<!--#/if userNames-->
<P>
<TABLE>
<TR>
......@@ -92,20 +103,5 @@ select a user and click &quot;Edit&quot;.
</TD>
</TR>
</TABLE>
<P>
<!--#if userNames-->
<FORM ACTION="manage_deleteUser" METHOD="POST">
To delete users, select one or more users and click &quot;Delete&quot;.
<BR>
<SELECT NAME="names:list" MULTIPLE SIZE="4" >
<!--#in userNames-->
<OPTION><!--#var sequence-item-->
<!--#/in userNames-->
</SELECT>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Delete">
</FORM>
<!--#/if userNames-->
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Access Control for <!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<!--#var manage_tabs-->
<H2>Access Control for <EM><!--#var title_or_id--></EM></H2>
<P>
You may restrict access to this item using the form
below. To add or remove roles, select or deselect
the desired role names and click &quot;Change&quot;.
<P>
<FORM ACTION="manage_editRoles" METHOD="POST">
<TABLE>
<TR>
<TD VALIGN=CENTER><STRONG>Access<BR>Control</STRONG></TD>
<TD VALIGN="TOP">
<INPUT TYPE="RADIO" NAME="acl_type" VALUE="E"<!--#var aclEChecked-->>
Allow users with selected roles
<BR>
<INPUT TYPE="RADIO" NAME="acl_type" VALUE="A"<!--#var aclAChecked-->>
Allow based on default roles
<BR>
<INPUT TYPE="RADIO" NAME="acl_type" VALUE="P"<!--#var aclPChecked-->>
Allow all users
</TD>
<TD VALIGN="TOP">
<SELECT NAME="acl_roles:list" SIZE="4" MULTIPLE>
<!--#in selectedRoles-->
<!--#var sequence-item-->
<!--#/in selectedRoles-->
</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" VALUE="Change">
</TD>
</TR>
</TABLE>
</FORM>
<P>
<FORM ACTION="manage_addRole" METHOD="POST">
To add a new, user-defined role to this object, enter the name of
the new role and click &quot;Add&quot;.
<BR>
<INPUT TYPE="TEXT" NAME="role" SIZE="20">
<BR>
<INPUT TYPE="SUBMIT" VALUE=" Add ">
</FORM>
</BODY>
</HTML>
__doc__="""Application management component"""
__version__='$Revision: 1.14 $'[11:-2]
__doc__="""System management components"""
__version__='$Revision: 1.15 $'[11:-2]
import sys,os,time,Globals
from Acquisition import Acquirer
from Management import Management
from Globals import HTMLFile
from OFS.ObjectManager import ObjectManager
from CacheManager import CacheManager
from Persistence import Persistent
from OFS import SimpleItem
class ApplicationManager(Persistent, Acquirer,Management,CacheManager):
"""Application management component."""
class ApplicationManager(ObjectManager,SimpleItem.Item,CacheManager):
"""System management"""
__roles__=['manage',]
manage_main =HTMLFile('App/appMain')
manage=manage_main=HTMLFile('App/appMain')
manage_packForm=HTMLFile('App/pack')
manage_undoForm=HTMLFile('App/undo')
manage=manage_main
manage_options=(
{'icon':'OFS/ControlPanel_icon.gif', 'label':'Control Panel',
{'icon':'OFS/ControlPanel_icon.gif', 'label':'System',
'action':'manage_main', 'target':'manage_main'},
{'icon':'App/CacheManager_icon.gif','label':'Cache Manager',
{'icon':'App/CacheManager_icon.gif','label':'Cache',
'action':'manage_cacheForm','target':'manage_main'},
{'icon':'App/undo_icon.gif', 'label':'Undo',
'action':'manage_UndoForm', 'target':'manage_main'},
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
# 'action':'manage_main', 'target':'_new'},
)
name=title ='Control Panel'
process_id =os.getpid()
id ='Control_Panel'
name=title='Control Panel'
icon ='OFS/ControlPanel_icon.gif'
process_id=os.getpid()
process_start=int(time.time())
# Disable some inappropriate operations
manage_addObject=None
manage_delObjects=None
manage_addProperty=None
manage_editProperties=None
manage_delProperties=None
isPrincipiaFolderish=0
def _init(self):
pass
def manage_app(self, URL2):
"""Return to the main management screen"""
raise 'Redirect', URL2+'/manage'
......@@ -80,3 +99,4 @@ class ApplicationManager(Persistent, Acquirer,Management,CacheManager):
products=Globals.Bobobase['products']
if product not in products:
Globals.Bobobase['products']=tuple(products)+(product,)
"""Standard management interface support
$Id: Management.py,v 1.6 1997/09/23 00:07:28 jim Exp $"""
$Id: Management.py,v 1.7 1997/12/05 17:10:46 brian Exp $"""
__version__='$Revision: 1.6 $'[11:-2]
__version__='$Revision: 1.7 $'[11:-2]
import sys,Globals
from Dialogs import MessageDialog
from Globals import HTMLFile
import Undo
class Management(Undo.UndoSupport):
"""A mix-in class for basic management interface support.
Management provides the basic frames-based management interface for an
object. For any Management derived instance, the url <object>/manage
will return the management interface for that object. The manage
attribute is a document template containing a frameset referencing
two named frames: "manage_menu" on the left, "manage_main" on the
right. The "manage_menu" frame will load the manage_menu attribute
of your instance, The "manage_main" frame will load the instance's
manage_main attribute.
manage_menu -- the management menu frame. This is provided by the
Management class. It renders menu options based on your
instance's manage_options attribute, as described
below.
manage_main -- the "management homepage" frame. This is the default
document loaded into the right-hand frame whenever a
browser goes to <object>/manage. This page will often
be a "status" page, relaying relevant information about
the instance being viewed, as well as a link to the
"public" interface of the object (index_html).
The Management class provides a default document template
that is used for manage_main if the instance does not
override this attribute.
manage_options -- This attribute is a list of dictionaries containing
information about each menu item to be displayed in
the "manage_menu" frame. Subclasses should override the
default manage_options attribute of Management (which is
just an empty list, producing an empty menu).
For each dictionary in the list, a menu item will be shown
with an icon of dict['icon'],
a label of dict['label'],
linking to <PARENT_URL>/dict['action'],
targeted at the frame dict['target'].
If your Management derived class defines a manage_options
attribute:
<PRE>
manage_options=[{'icon':'foo.gif',
'label':'Go to spam',
'action':'spam_html',
'target':'manage_main'}]
</PRE>
...you will get one menu item labelled 'Go to spam',
(with an icon of foo.gif) that is a hyperlink to
<PARENT_URL>/spam_html, and when clicked, the document
will appear in the 'manage_main' frame of the web browser.
If you wanted a new window to appear containing the
document, you would use '_new' as the value of 'target'
in the dictionary for that item.
Following these general rules will keep you from
inadvertantly ending up with nested framesets:
o If your menu option should take the user to another
attribute of the current object, the target should
be 'manage_main'.
o If your menu option should take the user to the public
interface of the current object, the target should be
'_top'.
from Undo import UndoSupport
o If your menu option should take the user to the
management or public interface of another object, the
target should be '_top'.
o If your menu option should cause a new window to be
opened with the requested document, the target should
be '_new' (This is often useful for things like online
help).
A menu item will be generated for each dictionary in the
manage_options list. Sometimes it is useful to provide a
separator between various menu items; to insert a
"separator" line as a menu entry, put an empty dictionary
in your manage_options list where you want the separator
to appear.
"""
manage_options =[]
manage =HTMLFile('App/manage')
manage_menu =HTMLFile('App/menu')
manage_copyright =HTMLFile('App/copyright')
class Management(UndoSupport):
"""Management support"""
manage =HTMLFile('App/manage')
manage_menu =HTMLFile('App/menu')
manage_tabs =HTMLFile('App/manage_tabs')
manage_copyright=HTMLFile('App/copyright')
manage_options =()
......@@ -10,4 +10,5 @@
# install undo.dtml
# install cache.dtml
# install copyright.dtml
# install manage_tabs.dtml
# install www www/%(package)s
<HTML>
<HEAD>
<TITLE><!--#var title--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<table border=0 width="100%" cellpadding=0 cellspacing=0>
<tr>
<td align=left width="90%">
<H2><!--#var title--></H2>
<!--#if Principia-Session-->
<em>You are currently working in session
<!--#var Principia-Session--></em><br><br>
<!--#/if-->
</td>
<td align=right width="10%">
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/Help_icon.gif" BORDER=0>
</td>
</tr>
</table>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2><!--#var title--></H2>
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<!--#/if Principia-Session-->
The Control Panel allows you to view application status information.
It also allows you to perform maintenance tasks such as process control,
database packing, and &quot;undoing&quot; previous changes to your site.
......
<HTML><HEAD><TITLE>Cache Manager</TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<h2>Cache Manager</h2><P>
<HTML>
<HEAD>
<TITLE>Cache Manager</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Cache Manager</H2>
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<!--#/if Principia-Session-->
<P>
<h3>Cache Statistics</h3>
<table>
<tr><th align=right>Total number of objects in the database:</th>
<td><!--#var database_size--></td></tr>
......
<HTML><HEAD>
<TITLE><!--#if title-->
<!--#var title--><!--#else title-->
<!--#var id--><!--#/if title--></TITLE>
<HTML>
<HEAD>
<TITLE><!--#var title_or_id--></TITLE>
<SCRIPT LANGUAGE="javascript">
<!--
function update(target)
{ window.focus();
if((target=="l") || (target=="b"))
{ window.manage_menu.history.go(0);
}
if((target=="r") || (target=="b"))
{ window.manage_main.history.go(0);
}
}
//-->
</SCRIPT>
</HEAD>
<FRAMESET FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0" COLS="150,*">
<FRAMESET COLS="150,*">
<FRAME SRC="manage_menu" NAME="manage_menu"
MARGINWIDTH="6" MARGINHEIGHT="6" SCROLLING="auto">
MARGINWIDTH="2" MARGINHEIGHT="2" SCROLLING="auto">
<FRAME SRC="manage_main" NAME="manage_main"
MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto">
MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto">
</FRAMESET>
<NOFRAMES>
Management interfaces require the use of a <B>frames-capable</B> web browser, such as:
<UL>
<LI> <B><A HREF="http://www.netscape.com">Netscape Navigator 3.0</A></B>
<LI> <B><A HREF="http://www.microsoft.com">Microsoft Internet Explorer 3.0</A></B>
</UL>
Management interfaces require the use of a <B>frames-capable</B> web browser.
</NOFRAMES>
</HTML>
<!--#if manage_options-->
<TABLE WIDTH="100%" BORDER="1" CELLSPACING="0" CELLPADDING="2">
<TR>
<!--#in manage_options mapping-->
<!--#if sequence-item-->
<TD ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#EFEFEF">
<FONT SIZE="-1">
<A HREF="<!--#var action-->"><!--#var label--></A>
</FONT>
</TD>
<!--#/if sequence-item-->
<!--#/in manage_options-->
</TR>
</TABLE>
<!--#/if manage_options-->
<HTML>
<HEAD>
<TITLE>Management Menu</TITLE>
<TITLE>Principia Navigator</TITLE>
</HEAD>
<BODY BACKGROUND="<!--#var SOFTWARE_URL-->/App/border.gif"
BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<TABLE WIDTH="120" BORDER="0">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<TABLE CELLSPACING="0">
<TR>
<TD ALIGN="LEFT" COLSPAN="2">
<IMG SRC="<!--#var SOFTWARE_URL-->/App/logo.jpg" WIDTH="102" HEIGHT="54">
<BR>
<A HREF="manage_copyright" TARGET="manage_main">
<FONT SIZE="-2"><CENTER>
&copy; 1997 Digital Creations</FONT></CENTER></A>
<TD VALIGN="TOP" NOWRAP>
<A HREF="manage_main" TARGET="manage_main">
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->" BORDER="0"
ALT="Click to open this item"></A>
<STRONG>
<A HREF="manage_main" TARGET="manage_main">
<!--#var title_or_id-->
</A>
</STRONG>
</TD>
</TR>
<TR><TD></TD><TD></TD></TR>
<!--#if parentObject-->
<!--#in parentObject-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var URL2-->/manage" target="_top">
<IMG BORDER="0" HEIGHT="16" ALT="Up One Folder" WIDTH="16"
SRC="<!--#var SOFTWARE_URL-->/OFS/UpFolder_icon.gif"></A></TD>
<TD ALIGN="LEFT">
<FONT SIZE="-1">
<A HREF="<!--#var URL2-->/manage" target="_top">Up One Folder</A></TD>
</FONT>
</TD>
</TR>
<!--#/in parentObject-->
<!--#/if parentObject-->
<!--#if manage_options-->
<!--#in manage_options mapping-->
<!--#if sequence-item-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var action-->"
TARGET="<!--#var target-->"><IMG BORDER="0" HEIGHT="16"
WIDTH="16" ALT="<!--#var label-->"
SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->"></A>
</TD>
<TD ALIGN="LEFT">
<FONT SIZE="-1">
<A HREF="<!--#var action-->"
TARGET="<!--#var target-->">
<!--#var label-->
</A></FONT>
</TD>
</TR>
<!--#else sequence-item-->
<TR><TD COLSPAN="2"><HR></TD></TR>
<!--#/if sequence-item-->
<!--#/in manage_options-->
<!--#/if manage_options-->
</TABLE>
<!--#tree sort=title_or_id nowrap=1-->
<A HREF="<!--#var tree-item-url-->/manage_main" TARGET="manage_main">
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->" BORDER="0"
ALT="Click to open this item"></A>
<A HREF="<!--#var tree-item-url-->/manage_main" TARGET="manage_main">
<!--#var title_or_id-->
</A>
<!--#/tree-->
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE><!--#var title_or_id--></TITLE>
<TITLE>Undo Changes</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<FONT SIZE="+2">Undo Changes</FONT>
<!--#var manage_tabs-->
<H2>Undo Changes</H2>
<P>
<FORM ACTION="manage_undo_transactions" METHOD="POST">
This application's transactional feature allows you to easily undo changes
made to the application's settings or data. You can revert the application
to a &quot;snapshot&quot; of it's state at a previous point in time.
......
......@@ -11,14 +11,16 @@
__doc__='''Application support
$Id: Application.py,v 1.21 1997/11/20 13:40:28 jim Exp $'''
__version__='$Revision: 1.21 $'[11:-2]
$Id: Application.py,v 1.22 1997/12/05 17:13:48 brian Exp $'''
__version__='$Revision: 1.22 $'[11:-2]
import Globals,Folder,regex
import Globals,Folder,os,regex
from string import lower, find
from AccessControl.User import UserFolder
from DateTime import DateTime
from AccessControl.User import UserFolder
from App.ApplicationManager import ApplicationManager
class Application(Folder.Folder):
title ='Principia'
......@@ -34,8 +36,6 @@ class Application(Folder.Folder):
'action':'manage_propertiesForm', 'target':'manage_main'},
{'icon':'AccessControl/AccessControl_icon.gif', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main'},
{'icon':'OFS/ControlPanel_icon.gif', 'label':'Control Panel',
'action':'app/manage', 'target':'_top'},
{'icon':'App/undo_icon.gif', 'label':'Undo',
'action':'manage_UndoForm', 'target':'manage_main'},
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
......@@ -49,6 +49,16 @@ class Application(Folder.Folder):
'acl_users')
def _init(self):
# Initialize users
self.__allow_groups__=UserFolder()
self.__allow_groups__._init()
self._setObject('acl_users', self.__allow_groups__)
# Initialize control panel
cpl=ApplicationManager()
cpl._init()
self._setObject('Control_Panel', cpl)
self.manage_addDocument('standard_html_header',
'Standard Html Header',
'<HTML><HEAD><TITLE><!--#var title_or_id-->' \
......@@ -56,9 +66,7 @@ class Application(Folder.Folder):
self.manage_addDocument('standard_html_footer',
'Standard Html Footer',
'</BODY></HTML>')
self.__allow_groups__=UserFolder()
self.__allow_groups__._init()
self._setObject('acl_users', self.__allow_groups__)
def folderClass(self): return Folder.Folder
......@@ -119,8 +127,6 @@ class Application(Folder.Folder):
def open_bobobase():
import App.ApplicationManager
# Open the application database
Bobobase=Globals.Bobobase=Globals.PickleDictionary(Globals.BobobaseName)
......@@ -128,8 +134,6 @@ def open_bobobase():
except KeyError:
app=Application()
app._init()
app.app=App.ApplicationManager.ApplicationManager()
Bobobase['Application']=app
get_transaction().commit()
......@@ -142,6 +146,14 @@ def open_bobobase():
Bobobase['roles']=('manage',)
get_transaction().commit()
# Backward compatibility
if not hasattr(app, 'Control_Panel'):
cpl=ApplicationManager()
cpl._init()
app._setObject('Control_Panel', cpl)
get_transaction().commit()
products=Bobobase['products']
install_products(products)
......@@ -235,6 +247,9 @@ if __name__ == "__main__": main()
##############################################################################
#
# $Log: Application.py,v $
# Revision 1.22 1997/12/05 17:13:48 brian
# New UI
#
# Revision 1.21 1997/11/20 13:40:28 jim
# Added logic to make sure that the top-level user folder gets
# initialized correctly.
......
"""Document object"""
__version__='$Revision: 1.26 $'[11:-2]
__version__='$Revision: 1.27 $'[11:-2]
from Globals import HTML, HTMLFile
from string import join,split,strip,rfind,atoi
......@@ -15,6 +15,23 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
icon ='OFS/Document_icon.gif'
__state_names__=HTML.__state_names__+('title','__roles__')
manage_options=({'icon':'', 'label':'Edit',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Upload',
'action':'manage_uploadForm', 'target':'manage_main',
},
{'icon':'', 'label':'View',
'action':'', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm', 'target':'manage_main',
},
)
def initvars(self, mapping, vars):
"""Hook to override signature so we can detect whether we are
running from the web"""
......@@ -46,7 +63,8 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
except AttributeError: return 0
manage_editForm=HTMLFile('OFS/documentEdit')
manage=manage_editDocument=manage_editForm
manage_uploadForm=HTMLFile('OFS/documentUpload')
manage=manage_main=manage_editDocument=manage_editForm
def manage_edit(self,data,title,acl_type='A',acl_roles=[],SUBMIT='Change',
dtpref_cols='50',dtpref_rows='20',REQUEST=None):
......@@ -77,6 +95,11 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
self.munge(data)
if REQUEST: return self.manage_editedDialog(REQUEST)
def manage_upload(self,file='', REQUEST=None):
"""Change image data"""
self.munge(file.read())
if REQUEST: return self.manage_editedDialog(REQUEST)
def validRoles(self):
return self.aq_parent.validRoles()
......
"""Folder object
$Id: Folder.py,v 1.21 1997/11/26 23:46:59 paul Exp $"""
$Id: Folder.py,v 1.22 1997/12/05 17:13:49 brian Exp $"""
__version__='$Revision: 1.21 $'[11:-2]
__version__='$Revision: 1.22 $'[11:-2]
from Globals import HTMLFile
......@@ -108,7 +108,8 @@ class Folder(ObjectManager,RoleManager,DocumentHandler,
for id in self._objects:
o=getattr(self, id['id'])
try:
if subclass(o.__class__, Folder): r.append(o)
if o.isPrincipiaFolderish: r.append(o)
# if subclass(o.__class__, Folder): r.append(o)
except: pass
return r
......
"""Image object"""
__version__='$Revision: 1.12 $'[11:-2]
__version__='$Revision: 1.13 $'[11:-2]
from Persistence import Persistent
from Globals import HTMLFile
......@@ -16,8 +16,26 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
icon ='OFS/File_icon.gif'
manage_editForm =HTMLFile('OFS/imageEdit', Kind='File', kind='file')
manage_uploadForm =HTMLFile('OFS/imageUpload', Kind='File', kind='file')
manage=manage_main=manage_editForm
manage_options=({'icon':'', 'label':'Edit',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Upload',
'action':'manage_uploadForm', 'target':'manage_main',
},
{'icon':'', 'label':'View',
'action':'index_html', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm', 'target':'manage_main',
},
)
def manage_edit(self,title,content_type,
acl_type='A',acl_roles=[], REQUEST=None):
""" """
......@@ -27,7 +45,7 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
self._setRoles(acl_type,acl_roles)
if REQUEST: return self.manage_editedDialog(REQUEST)
def manage_editData(self,file='', REQUEST=None):
def manage_upload(self,file='', REQUEST=None):
"""Change image data"""
headers=file.headers
data=file.read()
......@@ -76,7 +94,9 @@ class Image(File):
meta_type='Image'
icon ='OFS/Image_icon.gif'
manage=manage_editForm=HTMLFile('OFS/imageEdit', Kind='Image', kind='image')
manage_editForm =HTMLFile('OFS/imageEdit', Kind='Image', kind='image')
manage_uploadForm =HTMLFile('OFS/imageUpload', Kind='Image', kind='image')
manage=manage_main=manage_editForm
def __str__(self):
return '<IMG SRC="%s" ALT="%s">' % (self.__name__, self.title_or_id())
......
__doc__="""Object Manager
$Id: ObjectManager.py,v 1.21 1997/11/26 23:47:00 paul Exp $"""
$Id: ObjectManager.py,v 1.22 1997/12/05 17:13:50 brian Exp $"""
__version__='$Revision: 1.21 $'[11:-2]
__version__='$Revision: 1.22 $'[11:-2]
from SingleThreadedTransaction import Persistent
......@@ -45,6 +45,8 @@ class ObjectManager(Acquirer,Management,Persistent):
isAnObjectManager=1
isPrincipiaFolderish=1
def __class_init__(self):
try: mt=list(self.meta_types)
except: mt=[]
......@@ -453,6 +455,9 @@ class ObjectManager(Acquirer,Management,Persistent):
##############################################################################
#
# $Log: ObjectManager.py,v $
# Revision 1.22 1997/12/05 17:13:50 brian
# New UI
#
# Revision 1.21 1997/11/26 23:47:00 paul
# if REQUEST is None added
#
......
......@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
$Id: Session.py,v 1.4 1997/11/11 19:25:48 jim Exp $'''
$Id: Session.py,v 1.5 1997/12/05 17:13:51 brian Exp $'''
import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
from string import rfind
......@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
meta_type='Session'
icon='OFS/session.gif'
manage_options=({'icon':'', 'label':'Properties',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Join/Leave',
'action':'index_html', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm','target':'manage_main',
},
)
def _init(self, id, title, REQUEST):
self.id=id
self.title=title
......@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
if l >= 0: cookie=cookie[:l]
self.cookie="%s/%s" % (cookie, id)
manage=Globals.HTMLFile('OFS/sessionEdit')
manage=manage_main=Globals.HTMLFile('OFS/sessionEdit')
index_html=Globals.HTMLFile('OFS/session')
def title_and_id(self):
......@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
def nonempty(self): return Globals.SessionBase[self.cookie].nonempty()
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
......@@ -117,6 +131,9 @@ __version__='$Revision: 1.4 $'[11:-2]
##############################################################################
#
# $Log: Session.py,v $
# Revision 1.5 1997/12/05 17:13:51 brian
# New UI
#
# Revision 1.4 1997/11/11 19:25:48 jim
# Changed title_and_id method to include a flag to indicate whether a
# session has unsaved changes.
......
......@@ -14,11 +14,13 @@
# install DraftFolderSupervisor.dtml
# install documentAdd.dtml
# install documentEdit.dtml
# install documentUpload.dtml
# install draftFolderAdd.dtml
# install editedDialog.dtml
# install folderAdd.dtml
# install imageAdd.dtml
# install imageEdit.dtml
# install imageUpload.dtml
# install main.dtml
# install pasteDialog.dtml
# install properties.dtml
......
......@@ -16,8 +16,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
item types.
$Id: SimpleItem.py,v 1.6 1997/11/11 21:25:29 brian Exp $'''
__version__='$Revision: 1.6 $'[11:-2]
$Id: SimpleItem.py,v 1.7 1997/12/05 17:13:52 brian Exp $'''
__version__='$Revision: 1.7 $'[11:-2]
import Globals
from DateTime import DateTime
......@@ -26,6 +26,8 @@ from CopySupport import CopySource
class Item(CopySource):
isPrincipiaFolderish=0
# Name, relative to SOFTWARE_URL of icon used to display item
# in folder listings.
icon='App/arrow.jpg'
......@@ -36,9 +38,17 @@ class Item(CopySource):
# Default title.
title=''
# Empty manage_options signals that this object has a
# single-screen management interface.
manage_options=()
manage_tabs =Globals.HTMLFile('App/manage_tabs')
manage_options=({'icon':'', 'label':'Manage',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm','target':'manage_main',
},
)
# Utility that returns the title if it is not blank and the id
# otherwise.
......@@ -108,6 +118,9 @@ class Item_w__name__(Item):
##############################################################################
#
# $Log: SimpleItem.py,v $
# Revision 1.7 1997/12/05 17:13:52 brian
# New UI
#
# Revision 1.6 1997/11/11 21:25:29 brian
# Added copy/paste support, restricted unpickling, fixed DraftFolder bug
#
......
......@@ -3,9 +3,9 @@
<TITLE>Edit <!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Edit Document</H2>
<!--#var manage_tabs-->
<h3>Edit Document Source and Properties</h3>
<H2>Edit <!--#var title_or_id--></H2>
<FORM ACTION="manage_edit" METHOD="POST">
<TABLE CELLSPACING="2">
......@@ -42,38 +42,13 @@
<TR>
<TD></TD>
<TD>
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Edit">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Change">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Smaller">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Bigger">
</TD>
</TR>
</TABLE>
</FORM>
<hr>
<h3>Upload Document Source from a File</h3>
You may upload the source for <!--#var title_and_id--> using the form below.
Also, you may choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
<FORM ACTION="manage_addDocument" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">File</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file:string" SIZE="25" VALUE="">
</TD>
</TR>
<TR>
<TD></TD>
<TD><BR><INPUT TYPE="SUBMIT" VALUE=" Add "></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Upload document data</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Upload document data</H2>
You may upload the source for <!--#var title_and_id--> using the form below.
Choose an existing html file from your local computer by clicking the
<I>Browse</I> button.
<FORM ACTION="manage_upload" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">File</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file:string" SIZE="25" VALUE="">
</TD>
</TR>
<TR>
<TD></TD>
<TD><BR><INPUT TYPE="SUBMIT" VALUE="Change"></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Edit <!--#var Kind--></TITLE>
<TITLE>Edit <!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Edit <!--#var Kind--></H2>
<!--#var manage_tabs-->
<H3>Edit <!--#var Kind--> Properties</H3>
<H2>Edit <!--#var title_or_id--></H2>
<FORM ACTION="manage_edit" METHOD="POST" TARGET="manage_main">
<TABLE CELLSPACING="2">
......@@ -32,34 +32,6 @@
</TR>
</TABLE>
</FORM>
<hr>
<H3>Upload New Data</H3>
You can update data in the <!--#var kind--> using the form below.
Select a data file from your local computer by clicking the <EM>Browse</EM>
button. The file you select will be uploaded to the application.
<FORM ACTION="manage_editData" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Id</TH>
<TD ALIGN="LEFT" VALIGN="TOP"><!--#var id--></TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Data</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file" SIZE="25" VALUE="">
</TD>
</TR>
<TR><TD></TD><TD><BR><INPUT TYPE="SUBMIT" VALUE="Change Data"></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Upload <!--#var kind--> data</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Upload data to <EM><!--#var title_or_id--></EM></H2>
You can update data in the <!--#var kind--> using the form below.
Select a data file from your local computer by clicking the <EM>Browse</EM>
button. The file you select will be uploaded to the application.
<FORM ACTION="manage_upload" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Id</TH>
<TD ALIGN="LEFT" VALIGN="TOP"><!--#var id--></TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">Data</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file" SIZE="25" VALUE="">
</TD>
</TR>
<TR><TD></TD><TD><BR><INPUT TYPE="SUBMIT" VALUE="Change"></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<HTML><HEAD><TITLE><!--#var title_or_id--></TITLE></HEAD>
<HTML>
<HEAD>
<TITLE>Contents of <!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD ALIGN="LEFT" WIDTH="90%">
<H2><!--#var title_or_id--></H2>
<!--#if Principia-Session-->
<EM>
You are currently working in session <!--#var Principia-Session-->
</EM>
<BR><BR>
<!--#/if Principia-Session-->
</TD>
<TD ALIGN="RIGHT">
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/Help_icon.gif" BORDER=0>
</TD>
</TR>
</TABLE>
<H2>Contents of <EM><!--#var title_or_id--></EM></H2>
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<!--#/if Principia-Session-->
<!--#if objectValues-->
The following items have been defined. To <strong>manage</strong> the
item, click on the item's icon. To <strong>view</strong> the item,
click on the item's title and id.
<FORM ACTION="manage_delObjects" METHOD="POST">
<!--#if objectValues-->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2>
<TR>
<TH ALIGN="CENTER">
<FONT SIZE="-1">Manage</FONT>
</TH>
<TH ALIGN="LEFT">
<FONT SIZE="-1">View</FONT>
</TH>
</TR>
<!--#in objectValues sort=title_and_id-->
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<!--#var id-->">
<A HREF="<!--#var URL1-->/<!--#var id-->/manage"
<!--#if sequence-var-manage_options-->
TARGET="_top"
<!--#/if sequence-var-manage_options-->>
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->"
ALT="manage" BORDER="0"></A>
<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 URL1-->/<!--#var id-->">
<!--#var title_and_id--></A>
<!--#if modified_in_session-->
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/modified.gif">
<!--#/if modified_in_session-->
<A HREF="./<!--#var id-->/manage_main">
<!--#var title_and_id--></A>
<!--#if modified_in_session-->
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/modified.gif"
ALT="This item has been modified in a session">
<!--#/if modified_in_session-->
</TD>
</TR>
<!--#/in objectValues-->
......@@ -64,14 +44,19 @@ click on the item's title and id.
</TD>
</TR>
</TABLE>
</FORM>
<!--#else objectValues-->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2>
<TR>
<TD>
There are currently no items in <EM><!--#var title_or_id--></EM>
<P>
<!--#if validClipData-->
<FORM ACTION="manage_delObjects" METHOD="POST">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Paste">
</FORM>
<!--#/if validClipData-->
</TD>
</TABLE>
<!--#/if objectValues-->
</FORM>
<TABLE>
<TR>
......
<HTML>
<HEAD>
<TITLE>Properties</TITLE>
<TITLE>Properties for <!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Properties</H2>
<!--#var manage_tabs-->
<H2>Properties for <EM><!--#var title_or_id--></EM></H2>
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<P>
<!--#if propertyMap-->
<!--#/if Principia-Session-->
<FORM ACTION="<!--#var URL1-->/manage_editProperties">
The following properties are defined. To change a property's value,
edit the value and click "Change".
<!--#if propertyMap-->
The following properties are defined for this item.
To change a property's value, edit the value and click "Change".
<P>
<TABLE CELLPADDING="4">
<TR>
......@@ -41,7 +47,8 @@ edit the value and click "Change".
</TABLE>
</FORM>
<!--#else propertyMap-->
<EM>No properties have been defined.</EM>
<EM>No properties have been defined for
<STRONG><!--#var title_or_id--></STRONG></EM>
<!--#/if propertyMap-->
<P>
......
......@@ -3,6 +3,8 @@
<TITLE>Access Control</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<!--#var manage_tabs-->
<H2>Access Control</H2>
<P>
You may restrict access to <EM><!--#var title--></EM> using the form
......
<html> <head>
<title><!--#var title_or_id--></title>
</head>
<body>
<HTML>
<HEAD>
<TITLE><!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
......
......@@ -3,6 +3,8 @@
<TITLE>Edit Session</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit Session</H2>
<FORM ACTION="manage_edit" METHOD="POST">
......
......@@ -6,8 +6,8 @@ import OFS.SimpleItem
import Globals
from Scheduler.OneTimeEvent import OneTimeEvent
#$Id: MailHost.py,v 1.17 1997/09/25 13:29:13 brian Exp $
__version__ = "$Revision: 1.17 $"[11:-2]
#$Id: MailHost.py,v 1.18 1997/12/05 17:11:58 brian Exp $
__version__ = "$Revision: 1.18 $"[11:-2]
smtpError = "SMTP Error"
MailHostError = "MailHost Error"
......@@ -29,10 +29,22 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
RoleManager):
'a mailhost...?'
meta_type='Mail Host'
manage=HTMLFile('MailHost/manageMailHost')
manage=manage_main=HTMLFile('MailHost/manageMailHost')
index_html=None
icon="MailHost/MailHost_icon.gif"
manage_options=({'icon':'', 'label':'Edit',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm', 'target':'manage_main',
},
)
def __init__(self):
'nothing yet'
pass
......@@ -213,6 +225,9 @@ def decapitate(message, **kw):
#$Log: MailHost.py,v $
#Revision 1.18 1997/12/05 17:11:58 brian
#New UI
#
#Revision 1.17 1997/09/25 13:29:13 brian
#Removed index_html
#
......
<HTML>
<HEAD>
<TITLE>Change MailHost</TITLE>
<TITLE>Edit <!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>Change MailHost</H2>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit <EM><!--#var title_or_id--></EM></H2>
<FORM ACTION="manage_makeChanges" METHOD="POST">
<TABLE CELLSPACING="2">
<TR VALIGN="TOP">
......
......@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
$Id: Session.py,v 1.4 1997/11/11 19:25:48 jim Exp $'''
$Id: Session.py,v 1.5 1997/12/05 17:13:51 brian Exp $'''
import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
from string import rfind
......@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
meta_type='Session'
icon='OFS/session.gif'
manage_options=({'icon':'', 'label':'Properties',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Join/Leave',
'action':'index_html', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm','target':'manage_main',
},
)
def _init(self, id, title, REQUEST):
self.id=id
self.title=title
......@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
if l >= 0: cookie=cookie[:l]
self.cookie="%s/%s" % (cookie, id)
manage=Globals.HTMLFile('OFS/sessionEdit')
manage=manage_main=Globals.HTMLFile('OFS/sessionEdit')
index_html=Globals.HTMLFile('OFS/session')
def title_and_id(self):
......@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
def nonempty(self): return Globals.SessionBase[self.cookie].nonempty()
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
......@@ -117,6 +131,9 @@ __version__='$Revision: 1.4 $'[11:-2]
##############################################################################
#
# $Log: Session.py,v $
# Revision 1.5 1997/12/05 17:13:51 brian
# New UI
#
# Revision 1.4 1997/11/11 19:25:48 jim
# Changed title_and_id method to include a flag to indicate whether a
# session has unsaved changes.
......
......@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
$Id: Version.py,v 1.4 1997/11/11 19:25:48 jim Exp $'''
$Id: Version.py,v 1.5 1997/12/05 17:13:51 brian Exp $'''
import time, SimpleItem, AccessControl.Role, Persistence, Acquisition, Globals
from string import rfind
......@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
meta_type='Session'
icon='OFS/session.gif'
manage_options=({'icon':'', 'label':'Properties',
'action':'manage_main', 'target':'manage_main',
},
{'icon':'', 'label':'Join/Leave',
'action':'index_html', 'target':'manage_main',
},
{'icon':'', 'label':'Access Control',
'action':'manage_rolesForm', 'target':'manage_main',
},
{'icon':'', 'label':'Undo',
'action':'manage_UndoForm','target':'manage_main',
},
)
def _init(self, id, title, REQUEST):
self.id=id
self.title=title
......@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
if l >= 0: cookie=cookie[:l]
self.cookie="%s/%s" % (cookie, id)
manage=Globals.HTMLFile('OFS/sessionEdit')
manage=manage_main=Globals.HTMLFile('OFS/sessionEdit')
index_html=Globals.HTMLFile('OFS/session')
def title_and_id(self):
......@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
def nonempty(self): return Globals.SessionBase[self.cookie].nonempty()
__version__='$Revision: 1.4 $'[11:-2]
__version__='$Revision: 1.5 $'[11:-2]
......@@ -117,6 +131,9 @@ __version__='$Revision: 1.4 $'[11:-2]
##############################################################################
#
# $Log: Version.py,v $
# Revision 1.5 1997/12/05 17:13:51 brian
# New UI
#
# Revision 1.4 1997/11/11 19:25:48 jim
# Changed title_and_id method to include a flag to indicate whether a
# session has unsaved changes.
......
<html> <head>
<title><!--#var title_or_id--></title>
</head>
<body>
<HTML>
<HEAD>
<TITLE><!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
......
......@@ -3,6 +3,8 @@
<TITLE>Edit Session</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit Session</H2>
<FORM ACTION="manage_edit" METHOD="POST">
......
<html> <head>
<title><!--#var title_or_id--></title>
</head>
<body>
<HTML>
<HEAD>
<TITLE><!--#var title_or_id--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
......
......@@ -3,6 +3,8 @@
<TITLE>Edit Session</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit Session</H2>
<FORM ACTION="manage_edit" METHOD="POST">
......
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