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
9b2ffdee
Commit
9b2ffdee
authored
Dec 05, 1997
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New UI
parent
c706fcf7
Changes
41
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
582 additions
and
413 deletions
+582
-413
lib/python/AccessControl/Role.py
lib/python/AccessControl/Role.py
+5
-2
lib/python/AccessControl/RoleManager_manage_rolesForm.dtml
lib/python/AccessControl/RoleManager_manage_rolesForm.dtml
+4
-2
lib/python/AccessControl/Setup
lib/python/AccessControl/Setup
+1
-1
lib/python/AccessControl/User.py
lib/python/AccessControl/User.py
+15
-8
lib/python/AccessControl/UserFolder_manage_editForm.dtml
lib/python/AccessControl/UserFolder_manage_editForm.dtml
+8
-1
lib/python/AccessControl/UserFolder_manage_main.dtml
lib/python/AccessControl/UserFolder_manage_main.dtml
+36
-40
lib/python/AccessControl/manage_rolesForm.dtml
lib/python/AccessControl/manage_rolesForm.dtml
+57
-0
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+33
-13
lib/python/App/Management.py
lib/python/App/Management.py
+10
-91
lib/python/App/Setup
lib/python/App/Setup
+1
-0
lib/python/App/appMain.dtml
lib/python/App/appMain.dtml
+10
-16
lib/python/App/cache.dtml
lib/python/App/cache.dtml
+13
-6
lib/python/App/manage.dtml
lib/python/App/manage.dtml
+20
-12
lib/python/App/manage_tabs.dtml
lib/python/App/manage_tabs.dtml
+16
-0
lib/python/App/menu.dtml
lib/python/App/menu.dtml
+20
-51
lib/python/App/undo.dtml
lib/python/App/undo.dtml
+4
-3
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+28
-13
lib/python/OFS/Document.py
lib/python/OFS/Document.py
+25
-2
lib/python/OFS/Folder.py
lib/python/OFS/Folder.py
+4
-3
lib/python/OFS/Image.py
lib/python/OFS/Image.py
+23
-3
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+7
-2
lib/python/OFS/Session.py
lib/python/OFS/Session.py
+20
-3
lib/python/OFS/Setup
lib/python/OFS/Setup
+2
-0
lib/python/OFS/SimpleItem.py
lib/python/OFS/SimpleItem.py
+18
-5
lib/python/OFS/documentEdit.dtml
lib/python/OFS/documentEdit.dtml
+3
-28
lib/python/OFS/documentUpload.dtml
lib/python/OFS/documentUpload.dtml
+31
-0
lib/python/OFS/imageEdit.dtml
lib/python/OFS/imageEdit.dtml
+3
-31
lib/python/OFS/imageUpload.dtml
lib/python/OFS/imageUpload.dtml
+33
-0
lib/python/OFS/main.dtml
lib/python/OFS/main.dtml
+28
-43
lib/python/OFS/properties.dtml
lib/python/OFS/properties.dtml
+13
-6
lib/python/OFS/rolesForm.dtml
lib/python/OFS/rolesForm.dtml
+2
-0
lib/python/OFS/session.dtml
lib/python/OFS/session.dtml
+6
-5
lib/python/OFS/sessionEdit.dtml
lib/python/OFS/sessionEdit.dtml
+2
-0
lib/python/Products/MailHost/MailHost.py
lib/python/Products/MailHost/MailHost.py
+19
-4
lib/python/Products/MailHost/manageMailHost.dtml
lib/python/Products/MailHost/manageMailHost.dtml
+6
-3
lib/python/Products/OFSP/Session.py
lib/python/Products/OFSP/Session.py
+20
-3
lib/python/Products/OFSP/Version.py
lib/python/Products/OFSP/Version.py
+20
-3
lib/python/Products/OFSP/session.dtml
lib/python/Products/OFSP/session.dtml
+6
-5
lib/python/Products/OFSP/sessionEdit.dtml
lib/python/Products/OFSP/sessionEdit.dtml
+2
-0
lib/python/Products/OFSP/version.dtml
lib/python/Products/OFSP/version.dtml
+6
-5
lib/python/Products/OFSP/versionEdit.dtml
lib/python/Products/OFSP/versionEdit.dtml
+2
-0
No files found.
lib/python/AccessControl/Role.py
View file @
9b2ffdee
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
import
Globals
import
Globals
from
User
import
SafeDtml
from
User
import
SafeDtml
...
@@ -11,7 +11,7 @@ from string import join, strip, split
...
@@ -11,7 +11,7 @@ from string import join, strip, split
class
RoleManager
:
class
RoleManager
:
"""Mixin role management support"""
"""Mixin role management support"""
manage_rolesForm
=
SafeDtml
(
'AccessControl/
RoleManager_
manage_rolesForm'
)
manage_rolesForm
=
SafeDtml
(
'AccessControl/manage_rolesForm'
)
smallRolesWidget
=
SafeDtml
(
'AccessControl/smallRolesWidget'
)
smallRolesWidget
=
SafeDtml
(
'AccessControl/smallRolesWidget'
)
...
@@ -83,6 +83,9 @@ class RoleManager:
...
@@ -83,6 +83,9 @@ class RoleManager:
# $Log: Role.py,v $
# $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
# Revision 1.6 1997/11/18 21:48:20 brian
# Fixed bug that appeared after __roles__ were allowed to be acquired.
# Fixed bug that appeared after __roles__ were allowed to be acquired.
#
#
...
...
lib/python/AccessControl/RoleManager_manage_rolesForm.dtml
View file @
9b2ffdee
...
@@ -3,9 +3,11 @@
...
@@ -3,9 +3,11 @@
<TITLE>Access Control</TITLE>
<TITLE>Access Control</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<H2>Access Control</H2>
<!--#var menu_bar-->
<BR>
<FONT SIZE="+2">Access Control</FONT>
<P>
<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
below. To add or remove roles, select or deselect
the desired role names and click "Change".
the desired role names and click "Change".
<P>
<P>
...
...
lib/python/AccessControl/Setup
View file @
9b2ffdee
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# install groupForm.dtml
# install groupForm.dtml
# install groupsForm.dtml
# install groupsForm.dtml
# install memberForm.dtml
# install memberForm.dtml
# install
RoleManager_
manage_rolesForm.dtml
# install manage_rolesForm.dtml
# install UserFolder_manage_editForm.dtml
# install UserFolder_manage_editForm.dtml
# install UserFolder_manage_main.dtml
# install UserFolder_manage_main.dtml
# install smallRolesWidget.dtml
# install smallRolesWidget.dtml
...
...
lib/python/AccessControl/User.py
View file @
9b2ffdee
"""Access control package"""
"""Access control package"""
__version__
=
'$Revision: 1.
19
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
20
$'
[
11
:
-
2
]
import
Globals
import
Globals
from
Persistence
import
Persistent
from
Persistence
import
Persistent
from
Persistence
import
PersistentMapping
from
Persistence
import
PersistentMapping
from
App.Management
import
Management
from
OFS.SimpleItem
import
Item
from
OFS.SimpleItem
import
Item
from
Acquisition
import
Implicit
from
Acquisition
import
Implicit
from
DocumentTemplate
import
HTML
from
DocumentTemplate
import
HTML
...
@@ -31,6 +32,7 @@ class SafeDtml(HTML):
...
@@ -31,6 +32,7 @@ class SafeDtml(HTML):
class
User
(
Implicit
,
Persistent
):
class
User
(
Implicit
,
Persistent
):
def
__init__
(
self
,
name
=
None
,
password
=
None
,
roles
=
[]):
def
__init__
(
self
,
name
=
None
,
password
=
None
,
roles
=
[]):
if
name
is
not
None
:
if
name
is
not
None
:
...
@@ -85,25 +87,27 @@ class SuperUser:
...
@@ -85,25 +87,27 @@ class SuperUser:
super
=
SuperUser
()
super
=
SuperUser
()
class
UserFolder
(
Implicit
,
Persistent
,
Item
):
class
UserFolder
(
Persistent
,
Item
,
Implicit
,
Management
):
""" """
""" """
meta_type
=
'User Folder'
meta_type
=
'User Folder'
id
=
'acl_users'
id
=
'acl_users'
title
=
'User Folder'
title
=
'User Folder'
icon
=
'AccessControl/UserFolder_icon.gif'
icon
=
'AccessControl/UserFolder_icon.gif'
isPrincipiaFolderish
=
1
isAUserFolder
=
1
isAUserFolder
=
1
manage
=
SafeDtml
(
'App/manage'
)
manage_main
=
Globals
.
HTMLFile
(
'AccessControl/UserFolder_manage_main'
)
manage_menu
=
SafeDtml
(
'App/menu'
)
_editForm
=
Globals
.
HTMLFile
(
'AccessControl/UserFolder_manage_editForm'
)
manage_main
=
SafeDtml
(
'AccessControl/UserFolder_manage_main'
)
manage
=
manage_main
#index_html =manage_main
_editForm
=
SafeDtml
(
'AccessControl/UserFolder_manage_editForm'
)
index_html
=
manage_main
manage_options
=
(
manage_options
=
(
{
'icon'
:
'AccessControl/UserFolder_icon.gif'
,
'label'
:
'Contents'
,
{
'icon'
:
'AccessControl/UserFolder_icon.gif'
,
'label'
:
'Contents'
,
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
{
'icon'
:
'App/undo_icon.gif'
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
)
)
def
_init
(
self
):
def
_init
(
self
):
...
@@ -261,6 +265,9 @@ class UserFolderHandler:
...
@@ -261,6 +265,9 @@ class UserFolderHandler:
# $Log: User.py,v $
# $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
# Revision 1.19 1997/11/20 13:39:54 jim
# Added logic to check for a broken user folder.
# Added logic to check for a broken user folder.
#
#
...
...
lib/python/AccessControl/UserFolder_manage_editForm.dtml
View file @
9b2ffdee
...
@@ -2,9 +2,16 @@
...
@@ -2,9 +2,16 @@
<HEAD>
<HEAD>
<TITLE>Change User</TITLE>
<TITLE>Change User</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Change User</H2>
<H2>Change User</H2>
<P>
<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">
<FORM ACTION="manage_editUser" METHOD="POST">
<TABLE>
<TABLE>
<TR>
<TR>
...
...
lib/python/AccessControl/UserFolder_manage_main.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE><!--#var title--></TITLE>
<TITLE>
Contents of
<!--#var title--></TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2><!--#var title--></H2>
<!--#var manage_tabs-->
<P>
<!--#if parentObject-->
<H2>Contents of <EM><!--#var title--></EM></H2>
<!--#in parentObject-->
<!--#if Principia-Session-->
<A HREF="<!--#var URL2-->/manage" target="_top">
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<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-->
<P>
<P>
<!--#/if Principia-Session-->
<!--#if userNames-->
<!--#if userNames-->
<FORM ACTION="manage_
editForm
" METHOD="POST">
<FORM ACTION="manage_
deleteUser
" METHOD="POST">
The following users have been defined.
To edit a user,
The following users have been defined.
Click on a user to edit
select a user and click "Edit"
.
that user
.
<BR>
<BR>
<
SELECT NAME="name"
>
<
TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2
>
<!--#in userNames-->
<!--#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-->
<!--#/in userNames-->
</SELECT>
<TR>
<BR>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" VALUE=" Change ">
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="SUBMIT" VALUE="Delete">
</TD>
</TR>
</TABLE>
</FORM>
</FORM>
<!--#else userNames-->
<!--#else userNames-->
<EM>There are no users defined.</EM>
<EM>There are no users defined.</EM>
<!--#/if userNames-->
<!--#/if userNames-->
<P>
<P>
<TABLE>
<TABLE>
<TR>
<TR>
...
@@ -92,20 +103,5 @@ select a user and click "Edit".
...
@@ -92,20 +103,5 @@ select a user and click "Edit".
</TD>
</TD>
</TR>
</TR>
</TABLE>
</TABLE>
<P>
<!--#if userNames-->
<FORM ACTION="manage_deleteUser" METHOD="POST">
To delete users, select one or more users and click "Delete".
<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>
</BODY>
</HTML>
</HTML>
lib/python/AccessControl/manage_rolesForm.dtml
0 → 100644
View file @
9b2ffdee
<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 "Change".
<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 "Add".
<BR>
<INPUT TYPE="TEXT" NAME="role" SIZE="20">
<BR>
<INPUT TYPE="SUBMIT" VALUE=" Add ">
</FORM>
</BODY>
</HTML>
lib/python/App/ApplicationManager.py
View file @
9b2ffdee
__doc__
=
"""System management components"""
__doc__
=
"""Application management component"""
__version__
=
'$Revision: 1.15 $'
[
11
:
-
2
]
__version__
=
'$Revision: 1.14 $'
[
11
:
-
2
]
import
sys
,
os
,
time
,
Globals
import
sys
,
os
,
time
,
Globals
from
Acquisition
import
Acquirer
from
Management
import
Management
from
Globals
import
HTMLFile
from
Globals
import
HTMLFile
from
OFS.ObjectManager
import
ObjectManager
from
CacheManager
import
CacheManager
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'
,]
__roles__
=
[
'manage'
,]
manage
_main
=
HTMLFile
(
'App/appMain'
)
manage
=
manage_main
=
HTMLFile
(
'App/appMain'
)
manage_packForm
=
HTMLFile
(
'App/pack'
)
manage_packForm
=
HTMLFile
(
'App/pack'
)
manage_undoForm
=
HTMLFile
(
'App/undo'
)
manage_undoForm
=
HTMLFile
(
'App/undo'
)
manage
=
manage_main
manage_options
=
(
manage_options
=
(
{
'icon'
:
'OFS/ControlPanel_icon.gif'
,
'label'
:
'
Control Panel
'
,
{
'icon'
:
'OFS/ControlPanel_icon.gif'
,
'label'
:
'
System
'
,
'action'
:
'manage_main'
,
'target'
:
'manage_main'
},
'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'
},
'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
())
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
):
def
manage_app
(
self
,
URL2
):
"""Return to the main management screen"""
"""Return to the main management screen"""
raise
'Redirect'
,
URL2
+
'/manage'
raise
'Redirect'
,
URL2
+
'/manage'
...
@@ -80,3 +99,4 @@ class ApplicationManager(Persistent, Acquirer,Management,CacheManager):
...
@@ -80,3 +99,4 @@ class ApplicationManager(Persistent, Acquirer,Management,CacheManager):
products
=
Globals
.
Bobobase
[
'products'
]
products
=
Globals
.
Bobobase
[
'products'
]
if
product
not
in
products
:
if
product
not
in
products
:
Globals
.
Bobobase
[
'products'
]
=
tuple
(
products
)
+
(
product
,)
Globals
.
Bobobase
[
'products'
]
=
tuple
(
products
)
+
(
product
,)
lib/python/App/Management.py
View file @
9b2ffdee
"""Standard management interface support
"""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
import
sys
,
Globals
from
Dialogs
import
MessageDialog
from
Dialogs
import
MessageDialog
from
Globals
import
HTMLFile
from
Globals
import
HTMLFile
import
Undo
from
Undo
import
UndoSupport
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'.
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
=
[]
class
Management
(
UndoSupport
):
manage
=
HTMLFile
(
'App/manage'
)
"""Management support"""
manage_menu
=
HTMLFile
(
'App/menu'
)
manage
=
HTMLFile
(
'App/manage'
)
manage_copyright
=
HTMLFile
(
'App/copyright'
)
manage_menu
=
HTMLFile
(
'App/menu'
)
manage_tabs
=
HTMLFile
(
'App/manage_tabs'
)
manage_copyright
=
HTMLFile
(
'App/copyright'
)
manage_options
=
()
lib/python/App/Setup
View file @
9b2ffdee
...
@@ -10,4 +10,5 @@
...
@@ -10,4 +10,5 @@
# install undo.dtml
# install undo.dtml
# install cache.dtml
# install cache.dtml
# install copyright.dtml
# install copyright.dtml
# install manage_tabs.dtml
# install www www/%(package)s
# install www www/%(package)s
lib/python/App/appMain.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE><!--#var title--></TITLE>
<TITLE><!--#var title--></TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<table border=0 width="100%" cellpadding=0 cellspacing=0>
<!--#var manage_tabs-->
<tr>
<td align=left width="90%">
<H2><!--#var title--></H2>
<H2><!--#var title--></H2>
<!--#if Principia-Session-->
<!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<em>You are currently working in session
<P>
<!--#var Principia-Session--></em><br><br>
<!--#/if Principia-Session-->
<!--#/if-->
</td>
<td align=right width="10%">
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/Help_icon.gif" BORDER=0>
</td>
</tr>
</table>
The Control Panel allows you to view application status information.
The Control Panel allows you to view application status information.
It also allows you to perform maintenance tasks such as process control,
It also allows you to perform maintenance tasks such as process control,
database packing, and "undoing" previous changes to your site.
database packing, and "undoing" previous changes to your site.
...
...
lib/python/App/cache.dtml
View file @
9b2ffdee
<HTML><HEAD><TITLE>Cache Manager</TITLE> </HEAD>
<HTML>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<HEAD>
<TITLE>Cache Manager</TITLE>
<h2>Cache Manager</h2><P>
</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>
<h3>Cache Statistics</h3>
<table>
<table>
<tr><th align=right>Total number of objects in the database:</th>
<tr><th align=right>Total number of objects in the database:</th>
<td><!--#var database_size--></td></tr>
<td><!--#var database_size--></td></tr>
...
...
lib/python/App/manage.dtml
View file @
9b2ffdee
<HTML><HEAD>
<HTML>
<TITLE><!--#if title-->
<HEAD>
<!--#var title--><!--#else title-->
<TITLE><!--#var title_or_id--></TITLE>
<!--#var id--><!--#/if title--></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>
</HEAD>
<FRAMESET
FRAMEBORDER="NO" BORDER="0" FRAMESPACING="0"
COLS="150,*">
<FRAMESET COLS="150,*">
<FRAME SRC="manage_menu" NAME="manage_menu"
<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"
<FRAME SRC="manage_main" NAME="manage_main"
MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto">
MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto">
</FRAMESET>
</FRAMESET>
<NOFRAMES>
<NOFRAMES>
Management interfaces require the use of a <B>frames-capable</B> web browser, such as:
Management interfaces require the use of a <B>frames-capable</B> web browser.
<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>
</NOFRAMES>
</NOFRAMES>
</HTML>
</HTML>
lib/python/App/manage_tabs.dtml
0 → 100644
View file @
9b2ffdee
<!--#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-->
lib/python/App/menu.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE>
Management Menu
</TITLE>
<TITLE>
Principia Navigator
</TITLE>
</HEAD>
</HEAD>
<BODY BACKGROUND="<!--#var SOFTWARE_URL-->/App/border.gif"
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<TABLE CELLSPACING="0">
<TABLE WIDTH="120" BORDER="0">
<TR>
<TR>
<TD ALIGN="LEFT" COLSPAN="2">
<TD VALIGN="TOP" NOWRAP>
<IMG SRC="<!--#var SOFTWARE_URL-->/App/logo.jpg" WIDTH="102" HEIGHT="54">
<A HREF="manage_main" TARGET="manage_main">
<BR>
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->" BORDER="0"
<A HREF="manage_copyright" TARGET="manage_main">
ALT="Click to open this item"></A>
<FONT SIZE="-2"><CENTER>
<STRONG>
© 1997 Digital Creations</FONT></CENTER></A>
<A HREF="manage_main" TARGET="manage_main">
<!--#var title_or_id-->
</A>
</STRONG>
</TD>
</TD>
</TR>
</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>
</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>
</BODY>
</HTML>
</HTML>
lib/python/App/undo.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE>
<!--#var title_or_id-->
</TITLE>
<TITLE>
Undo Changes
</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<FONT SIZE="+2">Undo Changes</FONT>
<!--#var manage_tabs-->
<H2>Undo Changes</H2>
<P>
<P>
<FORM ACTION="manage_undo_transactions" METHOD="POST">
<FORM ACTION="manage_undo_transactions" METHOD="POST">
This application's transactional feature allows you to easily undo changes
This application's transactional feature allows you to easily undo changes
made to the application's settings or data. You can revert the application
made to the application's settings or data. You can revert the application
to a "snapshot" of it's state at a previous point in time.
to a "snapshot" of it's state at a previous point in time.
...
...
lib/python/OFS/Application.py
View file @
9b2ffdee
...
@@ -11,14 +11,16 @@
...
@@ -11,14 +11,16 @@
__doc__
=
'''Application support
__doc__
=
'''Application support
$Id: Application.py,v 1.2
1 1997/11/20 13:40:28 jim
Exp $'''
$Id: Application.py,v 1.2
2 1997/12/05 17:13:48 brian
Exp $'''
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
regex
import
Globals
,
Folder
,
os
,
regex
from
string
import
lower
,
find
from
string
import
lower
,
find
from
AccessControl.User
import
UserFolder
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
AccessControl.User
import
UserFolder
from
App.ApplicationManager
import
ApplicationManager
class
Application
(
Folder
.
Folder
):
class
Application
(
Folder
.
Folder
):
title
=
'Principia'
title
=
'Principia'
...
@@ -34,8 +36,6 @@ class Application(Folder.Folder):
...
@@ -34,8 +36,6 @@ class Application(Folder.Folder):
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
},
'action'
:
'manage_propertiesForm'
,
'target'
:
'manage_main'
},
{
'icon'
:
'AccessControl/AccessControl_icon.gif'
,
'label'
:
'Access Control'
,
{
'icon'
:
'AccessControl/AccessControl_icon.gif'
,
'label'
:
'Access Control'
,
'action'
:
'manage_rolesForm'
,
'target'
:
'manage_main'
},
'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'
,
{
'icon'
:
'App/undo_icon.gif'
,
'label'
:
'Undo'
,
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
'action'
:
'manage_UndoForm'
,
'target'
:
'manage_main'
},
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
# {'icon':'OFS/Help_icon.gif', 'label':'Help',
...
@@ -49,6 +49,16 @@ class Application(Folder.Folder):
...
@@ -49,6 +49,16 @@ class Application(Folder.Folder):
'acl_users'
)
'acl_users'
)
def
_init
(
self
):
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'
,
self
.
manage_addDocument
(
'standard_html_header'
,
'Standard Html Header'
,
'Standard Html Header'
,
'<HTML><HEAD><TITLE><!--#var title_or_id-->'
\
'<HTML><HEAD><TITLE><!--#var title_or_id-->'
\
...
@@ -56,9 +66,7 @@ class Application(Folder.Folder):
...
@@ -56,9 +66,7 @@ class Application(Folder.Folder):
self
.
manage_addDocument
(
'standard_html_footer'
,
self
.
manage_addDocument
(
'standard_html_footer'
,
'Standard Html Footer'
,
'Standard Html Footer'
,
'</BODY></HTML>'
)
'</BODY></HTML>'
)
self
.
__allow_groups__
=
UserFolder
()
self
.
__allow_groups__
.
_init
()
self
.
_setObject
(
'acl_users'
,
self
.
__allow_groups__
)
def
folderClass
(
self
):
return
Folder
.
Folder
def
folderClass
(
self
):
return
Folder
.
Folder
...
@@ -119,8 +127,6 @@ class Application(Folder.Folder):
...
@@ -119,8 +127,6 @@ class Application(Folder.Folder):
def
open_bobobase
():
def
open_bobobase
():
import
App.ApplicationManager
# Open the application database
# Open the application database
Bobobase
=
Globals
.
Bobobase
=
Globals
.
PickleDictionary
(
Globals
.
BobobaseName
)
Bobobase
=
Globals
.
Bobobase
=
Globals
.
PickleDictionary
(
Globals
.
BobobaseName
)
...
@@ -128,8 +134,6 @@ def open_bobobase():
...
@@ -128,8 +134,6 @@ def open_bobobase():
except
KeyError
:
except
KeyError
:
app
=
Application
()
app
=
Application
()
app
.
_init
()
app
.
_init
()
app
.
app
=
App
.
ApplicationManager
.
ApplicationManager
()
Bobobase
[
'Application'
]
=
app
Bobobase
[
'Application'
]
=
app
get_transaction
().
commit
()
get_transaction
().
commit
()
...
@@ -142,6 +146,14 @@ def open_bobobase():
...
@@ -142,6 +146,14 @@ def open_bobobase():
Bobobase
[
'roles'
]
=
(
'manage'
,)
Bobobase
[
'roles'
]
=
(
'manage'
,)
get_transaction
().
commit
()
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'
]
products
=
Bobobase
[
'products'
]
install_products
(
products
)
install_products
(
products
)
...
@@ -235,6 +247,9 @@ if __name__ == "__main__": main()
...
@@ -235,6 +247,9 @@ if __name__ == "__main__": main()
##############################################################################
##############################################################################
#
#
# $Log: Application.py,v $
# $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
# Revision 1.21 1997/11/20 13:40:28 jim
# Added logic to make sure that the top-level user folder gets
# Added logic to make sure that the top-level user folder gets
# initialized correctly.
# initialized correctly.
...
...
lib/python/OFS/Document.py
View file @
9b2ffdee
"""Document object"""
"""Document object"""
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
7
$'
[
11
:
-
2
]
from
Globals
import
HTML
,
HTMLFile
from
Globals
import
HTML
,
HTMLFile
from
string
import
join
,
split
,
strip
,
rfind
,
atoi
from
string
import
join
,
split
,
strip
,
rfind
,
atoi
...
@@ -15,6 +15,23 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
...
@@ -15,6 +15,23 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
icon
=
'OFS/Document_icon.gif'
icon
=
'OFS/Document_icon.gif'
__state_names__
=
HTML
.
__state_names__
+
(
'title'
,
'__roles__'
)
__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
):
def
initvars
(
self
,
mapping
,
vars
):
"""Hook to override signature so we can detect whether we are
"""Hook to override signature so we can detect whether we are
running from the web"""
running from the web"""
...
@@ -46,7 +63,8 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
...
@@ -46,7 +63,8 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
except
AttributeError
:
return
0
except
AttributeError
:
return
0
manage_editForm
=
HTMLFile
(
'OFS/documentEdit'
)
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'
,
def
manage_edit
(
self
,
data
,
title
,
acl_type
=
'A'
,
acl_roles
=
[],
SUBMIT
=
'Change'
,
dtpref_cols
=
'50'
,
dtpref_rows
=
'20'
,
REQUEST
=
None
):
dtpref_cols
=
'50'
,
dtpref_rows
=
'20'
,
REQUEST
=
None
):
...
@@ -77,6 +95,11 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
...
@@ -77,6 +95,11 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
self
.
munge
(
data
)
self
.
munge
(
data
)
if
REQUEST
:
return
self
.
manage_editedDialog
(
REQUEST
)
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
):
def
validRoles
(
self
):
return
self
.
aq_parent
.
validRoles
()
return
self
.
aq_parent
.
validRoles
()
...
...
lib/python/OFS/Folder.py
View file @
9b2ffdee
"""Folder object
"""Folder object
$Id: Folder.py,v 1.2
1 1997/11/26 23:46:59 paul
Exp $"""
$Id: Folder.py,v 1.2
2 1997/12/05 17:13:49 brian
Exp $"""
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
from
Globals
import
HTMLFile
from
Globals
import
HTMLFile
...
@@ -108,7 +108,8 @@ class Folder(ObjectManager,RoleManager,DocumentHandler,
...
@@ -108,7 +108,8 @@ class Folder(ObjectManager,RoleManager,DocumentHandler,
for
id
in
self
.
_objects
:
for
id
in
self
.
_objects
:
o
=
getattr
(
self
,
id
[
'id'
])
o
=
getattr
(
self
,
id
[
'id'
])
try
:
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
except
:
pass
return
r
return
r
...
...
lib/python/OFS/Image.py
View file @
9b2ffdee
"""Image object"""
"""Image object"""
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
from
Persistence
import
Persistent
from
Persistence
import
Persistent
from
Globals
import
HTMLFile
from
Globals
import
HTMLFile
...
@@ -16,8 +16,26 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
...
@@ -16,8 +16,26 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
icon
=
'OFS/File_icon.gif'
icon
=
'OFS/File_icon.gif'
manage_editForm
=
HTMLFile
(
'OFS/imageEdit'
,
Kind
=
'File'
,
kind
=
'file'
)
manage_editForm
=
HTMLFile
(
'OFS/imageEdit'
,
Kind
=
'File'
,
kind
=
'file'
)
manage_uploadForm
=
HTMLFile
(
'OFS/imageUpload'
,
Kind
=
'File'
,
kind
=
'file'
)
manage
=
manage_main
=
manage_editForm
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
,
def
manage_edit
(
self
,
title
,
content_type
,
acl_type
=
'A'
,
acl_roles
=
[],
REQUEST
=
None
):
acl_type
=
'A'
,
acl_roles
=
[],
REQUEST
=
None
):
""" """
""" """
...
@@ -27,7 +45,7 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
...
@@ -27,7 +45,7 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
self
.
_setRoles
(
acl_type
,
acl_roles
)
self
.
_setRoles
(
acl_type
,
acl_roles
)
if
REQUEST
:
return
self
.
manage_editedDialog
(
REQUEST
)
if
REQUEST
:
return
self
.
manage_editedDialog
(
REQUEST
)
def
manage_
editData
(
self
,
file
=
''
,
REQUEST
=
None
):
def
manage_
upload
(
self
,
file
=
''
,
REQUEST
=
None
):
"""Change image data"""
"""Change image data"""
headers
=
file
.
headers
headers
=
file
.
headers
data
=
file
.
read
()
data
=
file
.
read
()
...
@@ -76,7 +94,9 @@ class Image(File):
...
@@ -76,7 +94,9 @@ class Image(File):
meta_type
=
'Image'
meta_type
=
'Image'
icon
=
'OFS/Image_icon.gif'
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
):
def
__str__
(
self
):
return
'<IMG SRC="%s" ALT="%s">'
%
(
self
.
__name__
,
self
.
title_or_id
())
return
'<IMG SRC="%s" ALT="%s">'
%
(
self
.
__name__
,
self
.
title_or_id
())
...
...
lib/python/OFS/ObjectManager.py
View file @
9b2ffdee
__doc__
=
"""Object Manager
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.2
1 1997/11/26 23:47:00 paul
Exp $"""
$Id: ObjectManager.py,v 1.2
2 1997/12/05 17:13:50 brian
Exp $"""
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
from
SingleThreadedTransaction
import
Persistent
from
SingleThreadedTransaction
import
Persistent
...
@@ -45,6 +45,8 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -45,6 +45,8 @@ class ObjectManager(Acquirer,Management,Persistent):
isAnObjectManager
=
1
isAnObjectManager
=
1
isPrincipiaFolderish
=
1
def
__class_init__
(
self
):
def
__class_init__
(
self
):
try
:
mt
=
list
(
self
.
meta_types
)
try
:
mt
=
list
(
self
.
meta_types
)
except
:
mt
=
[]
except
:
mt
=
[]
...
@@ -453,6 +455,9 @@ class ObjectManager(Acquirer,Management,Persistent):
...
@@ -453,6 +455,9 @@ class ObjectManager(Acquirer,Management,Persistent):
##############################################################################
##############################################################################
#
#
# $Log: ObjectManager.py,v $
# $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
# Revision 1.21 1997/11/26 23:47:00 paul
# if REQUEST is None added
# if REQUEST is None added
#
#
...
...
lib/python/OFS/Session.py
View file @
9b2ffdee
...
@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
...
@@ -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
import
time
,
SimpleItem
,
AccessControl
.
Role
,
Persistence
,
Acquisition
,
Globals
from
string
import
rfind
from
string
import
rfind
...
@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
...
@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
meta_type
=
'Session'
meta_type
=
'Session'
icon
=
'OFS/session.gif'
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
):
def
_init
(
self
,
id
,
title
,
REQUEST
):
self
.
id
=
id
self
.
id
=
id
self
.
title
=
title
self
.
title
=
title
...
@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
...
@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
if
l
>=
0
:
cookie
=
cookie
[:
l
]
if
l
>=
0
:
cookie
=
cookie
[:
l
]
self
.
cookie
=
"%s/%s"
%
(
cookie
,
id
)
self
.
cookie
=
"%s/%s"
%
(
cookie
,
id
)
manage
=
Globals
.
HTMLFile
(
'OFS/sessionEdit'
)
manage
=
manage_main
=
Globals
.
HTMLFile
(
'OFS/sessionEdit'
)
index_html
=
Globals
.
HTMLFile
(
'OFS/session'
)
index_html
=
Globals
.
HTMLFile
(
'OFS/session'
)
def
title_and_id
(
self
):
def
title_and_id
(
self
):
...
@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
...
@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
def
nonempty
(
self
):
return
Globals
.
SessionBase
[
self
.
cookie
].
nonempty
()
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]
...
@@ -117,6 +131,9 @@ __version__='$Revision: 1.4 $'[11:-2]
##############################################################################
##############################################################################
#
#
# $Log: Session.py,v $
# $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
# Revision 1.4 1997/11/11 19:25:48 jim
# Changed title_and_id method to include a flag to indicate whether a
# Changed title_and_id method to include a flag to indicate whether a
# session has unsaved changes.
# session has unsaved changes.
...
...
lib/python/OFS/Setup
View file @
9b2ffdee
...
@@ -14,11 +14,13 @@
...
@@ -14,11 +14,13 @@
# install DraftFolderSupervisor.dtml
# install DraftFolderSupervisor.dtml
# install documentAdd.dtml
# install documentAdd.dtml
# install documentEdit.dtml
# install documentEdit.dtml
# install documentUpload.dtml
# install draftFolderAdd.dtml
# install draftFolderAdd.dtml
# install editedDialog.dtml
# install editedDialog.dtml
# install folderAdd.dtml
# install folderAdd.dtml
# install imageAdd.dtml
# install imageAdd.dtml
# install imageEdit.dtml
# install imageEdit.dtml
# install imageUpload.dtml
# install main.dtml
# install main.dtml
# install pasteDialog.dtml
# install pasteDialog.dtml
# install properties.dtml
# install properties.dtml
...
...
lib/python/OFS/SimpleItem.py
View file @
9b2ffdee
...
@@ -16,8 +16,8 @@ Aqueduct database adapters, etc.
...
@@ -16,8 +16,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
This module can also be used as a simple template for implementing new
item types.
item types.
$Id: SimpleItem.py,v 1.
6 1997/11/11 21:25:29
brian Exp $'''
$Id: SimpleItem.py,v 1.
7 1997/12/05 17:13:52
brian Exp $'''
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
import
Globals
import
Globals
from
DateTime
import
DateTime
from
DateTime
import
DateTime
...
@@ -26,6 +26,8 @@ from CopySupport import CopySource
...
@@ -26,6 +26,8 @@ from CopySupport import CopySource
class
Item
(
CopySource
):
class
Item
(
CopySource
):
isPrincipiaFolderish
=
0
# Name, relative to SOFTWARE_URL of icon used to display item
# Name, relative to SOFTWARE_URL of icon used to display item
# in folder listings.
# in folder listings.
icon
=
'App/arrow.jpg'
icon
=
'App/arrow.jpg'
...
@@ -36,9 +38,17 @@ class Item(CopySource):
...
@@ -36,9 +38,17 @@ class Item(CopySource):
# Default title.
# Default title.
title
=
''
title
=
''
# Empty manage_options signals that this object has a
manage_tabs
=
Globals
.
HTMLFile
(
'App/manage_tabs'
)
# single-screen management interface.
manage_options
=
({
'icon'
:
''
,
'label'
:
'Manage'
,
manage_options
=
()
'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
# Utility that returns the title if it is not blank and the id
# otherwise.
# otherwise.
...
@@ -108,6 +118,9 @@ class Item_w__name__(Item):
...
@@ -108,6 +118,9 @@ class Item_w__name__(Item):
##############################################################################
##############################################################################
#
#
# $Log: SimpleItem.py,v $
# $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
# Revision 1.6 1997/11/11 21:25:29 brian
# Added copy/paste support, restricted unpickling, fixed DraftFolder bug
# Added copy/paste support, restricted unpickling, fixed DraftFolder bug
#
#
...
...
lib/python/OFS/documentEdit.dtml
View file @
9b2ffdee
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<TITLE>Edit <!--#var title_or_id--></TITLE>
<TITLE>Edit <!--#var title_or_id--></TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<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">
<FORM ACTION="manage_edit" METHOD="POST">
<TABLE CELLSPACING="2">
<TABLE CELLSPACING="2">
...
@@ -42,38 +42,13 @@
...
@@ -42,38 +42,13 @@
<TR>
<TR>
<TD></TD>
<TD></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="Smaller">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Bigger">
<INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Bigger">
</TD>
</TD>
</TR>
</TR>
</TABLE>
</TABLE>
</FORM>
</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>
</BODY>
</HTML>
</HTML>
lib/python/OFS/documentUpload.dtml
0 → 100644
View file @
9b2ffdee
<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>
lib/python/OFS/imageEdit.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE>Edit <!--#var
Kin
d--></TITLE>
<TITLE>Edit <!--#var
title_or_i
d--></TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<
H2>Edit <!--#var Kind--></H2
>
<
!--#var manage_tabs--
>
<H
3>Edit <!--#var Kind--> Properties</H3
>
<H
2>Edit <!--#var title_or_id--></H2
>
<FORM ACTION="manage_edit" METHOD="POST" TARGET="manage_main">
<FORM ACTION="manage_edit" METHOD="POST" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TABLE CELLSPACING="2">
...
@@ -32,34 +32,6 @@
...
@@ -32,34 +32,6 @@
</TR>
</TR>
</TABLE>
</TABLE>
</FORM>
</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>
</BODY>
</HTML>
</HTML>
lib/python/OFS/imageUpload.dtml
0 → 100644
View file @
9b2ffdee
<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>
lib/python/OFS/main.dtml
View file @
9b2ffdee
<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">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="2">
<H2>Contents of <EM><!--#var title_or_id--></EM></H2>
<TR>
<!--#if Principia-Session-->
<TD ALIGN="LEFT" WIDTH="90%">
<EM>You are currently working in session <!--#var Principia-Session--></EM>
<H2><!--#var title_or_id--></H2>
<P>
<!--#if Principia-Session-->
<!--#/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>
<!--#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">
<FORM ACTION="manage_delObjects" METHOD="POST">
<!--#if objectValues-->
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING=2>
<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-->
<!--#in objectValues sort=title_and_id-->
<TR>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<!--#var id-->">
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<!--#var id-->">
<A HREF="<!--#var URL1-->/<!--#var id-->/manage"
<A HREF="./<!--#var id-->/manage_main">
<!--#if sequence-var-manage_options-->
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->"
TARGET="_top"
ALT="Click to open this item" BORDER="0"></A>
<!--#/if sequence-var-manage_options-->>
<IMG SRC="<!--#var SOFTWARE_URL-->/<!--#var icon-->"
ALT="manage" BORDER="0"></A>
</TD>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var URL1-->/<!--#var id-->">
<A HREF="./<!--#var id-->/manage_main">
<!--#var title_and_id--></A>
<!--#var title_and_id--></A>
<!--#if modified_in_session-->
<!--#if modified_in_session-->
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/modified.gif">
<IMG SRC="<!--#var SOFTWARE_URL-->/OFS/modified.gif"
<!--#/if modified_in_session-->
ALT="This item has been modified in a session">
<!--#/if modified_in_session-->
</TD>
</TD>
</TR>
</TR>
<!--#/in objectValues-->
<!--#/in objectValues-->
...
@@ -64,14 +44,19 @@ click on the item's title and id.
...
@@ -64,14 +44,19 @@ click on the item's title and id.
</TD>
</TD>
</TR>
</TR>
</TABLE>
</TABLE>
</FORM>
<!--#else objectValues-->
<!--#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-->
<!--#if validClipData-->
<FORM ACTION="manage_delObjects" METHOD="POST">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Paste">
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Paste">
</FORM>
<!--#/if validClipData-->
<!--#/if validClipData-->
</TD>
</TABLE>
<!--#/if objectValues-->
<!--#/if objectValues-->
</FORM>
<TABLE>
<TABLE>
<TR>
<TR>
...
...
lib/python/OFS/properties.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE>Properties</TITLE>
<TITLE>Properties
for <!--#var title_or_id-->
</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<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>
<P>
<!--#if propertyMap-->
<!--#/if Principia-Session-->
<FORM ACTION="<!--#var URL1-->/manage_editProperties">
<FORM ACTION="<!--#var URL1-->/manage_editProperties">
The following properties are defined. To change a property's value,
<!--#if propertyMap-->
edit the value and click "Change".
The following properties are defined for this item.
To change a property's value, edit the value and click "Change".
<P>
<P>
<TABLE CELLPADDING="4">
<TABLE CELLPADDING="4">
<TR>
<TR>
...
@@ -41,7 +47,8 @@ edit the value and click "Change".
...
@@ -41,7 +47,8 @@ edit the value and click "Change".
</TABLE>
</TABLE>
</FORM>
</FORM>
<!--#else propertyMap-->
<!--#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-->
<!--#/if propertyMap-->
<P>
<P>
...
...
lib/python/OFS/rolesForm.dtml
View file @
9b2ffdee
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
<TITLE>Access Control</TITLE>
<TITLE>Access Control</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<!--#var manage_tabs-->
<H2>Access Control</H2>
<H2>Access Control</H2>
<P>
<P>
You may restrict access to <EM><!--#var title--></EM> using the form
You may restrict access to <EM><!--#var title--></EM> using the form
...
...
lib/python/OFS/session.dtml
View file @
9b2ffdee
<html>
<head>
<HTML>
<title>
<!--#var title_or_id-->
</title>
<HEAD>
</head>
<TITLE><!--#var title_or_id--></TITLE>
</HEAD>
<body>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<!--#if Principia-Session-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
...
...
lib/python/OFS/sessionEdit.dtml
View file @
9b2ffdee
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
<TITLE>Edit Session</TITLE>
<TITLE>Edit Session</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit Session</H2>
<H2>Edit Session</H2>
<FORM ACTION="manage_edit" METHOD="POST">
<FORM ACTION="manage_edit" METHOD="POST">
...
...
lib/python/Products/MailHost/MailHost.py
View file @
9b2ffdee
...
@@ -6,8 +6,8 @@ import OFS.SimpleItem
...
@@ -6,8 +6,8 @@ import OFS.SimpleItem
import
Globals
import
Globals
from
Scheduler.OneTimeEvent
import
OneTimeEvent
from
Scheduler.OneTimeEvent
import
OneTimeEvent
#$Id: MailHost.py,v 1.1
7 1997/09/25 13:29:13
brian Exp $
#$Id: MailHost.py,v 1.1
8 1997/12/05 17:11:58
brian Exp $
__version__
=
"$Revision: 1.1
7
$"
[
11
:
-
2
]
__version__
=
"$Revision: 1.1
8
$"
[
11
:
-
2
]
smtpError
=
"SMTP Error"
smtpError
=
"SMTP Error"
MailHostError
=
"MailHost Error"
MailHostError
=
"MailHost Error"
...
@@ -29,10 +29,22 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
...
@@ -29,10 +29,22 @@ class MailHost(Persistent, Acquisition.Implicit, OFS.SimpleItem.Item,
RoleManager
):
RoleManager
):
'a mailhost...?'
'a mailhost...?'
meta_type
=
'Mail Host'
meta_type
=
'Mail Host'
manage
=
HTMLFile
(
'MailHost/manageMailHost'
)
manage
=
manage_main
=
HTMLFile
(
'MailHost/manageMailHost'
)
index_html
=
None
index_html
=
None
icon
=
"MailHost/MailHost_icon.gif"
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
):
def
__init__
(
self
):
'nothing yet'
'nothing yet'
pass
pass
...
@@ -213,6 +225,9 @@ def decapitate(message, **kw):
...
@@ -213,6 +225,9 @@ def decapitate(message, **kw):
#$Log: MailHost.py,v $
#$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
#Revision 1.17 1997/09/25 13:29:13 brian
#Removed index_html
#Removed index_html
#
#
...
...
lib/python/Products/MailHost/manageMailHost.dtml
View file @
9b2ffdee
<HTML>
<HTML>
<HEAD>
<HEAD>
<TITLE>
Change MailHost
</TITLE>
<TITLE>
Edit <!--#var title_or_id-->
</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Change MailHost</H2>
<!--#var manage_tabs-->
<H2>Edit <EM><!--#var title_or_id--></EM></H2>
<FORM ACTION="manage_makeChanges" METHOD="POST">
<FORM ACTION="manage_makeChanges" METHOD="POST">
<TABLE CELLSPACING="2">
<TABLE CELLSPACING="2">
<TR VALIGN="TOP">
<TR VALIGN="TOP">
...
...
lib/python/Products/OFSP/Session.py
View file @
9b2ffdee
...
@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
...
@@ -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
import
time
,
SimpleItem
,
AccessControl
.
Role
,
Persistence
,
Acquisition
,
Globals
from
string
import
rfind
from
string
import
rfind
...
@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
...
@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
meta_type
=
'Session'
meta_type
=
'Session'
icon
=
'OFS/session.gif'
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
):
def
_init
(
self
,
id
,
title
,
REQUEST
):
self
.
id
=
id
self
.
id
=
id
self
.
title
=
title
self
.
title
=
title
...
@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
...
@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
if
l
>=
0
:
cookie
=
cookie
[:
l
]
if
l
>=
0
:
cookie
=
cookie
[:
l
]
self
.
cookie
=
"%s/%s"
%
(
cookie
,
id
)
self
.
cookie
=
"%s/%s"
%
(
cookie
,
id
)
manage
=
Globals
.
HTMLFile
(
'OFS/sessionEdit'
)
manage
=
manage_main
=
Globals
.
HTMLFile
(
'OFS/sessionEdit'
)
index_html
=
Globals
.
HTMLFile
(
'OFS/session'
)
index_html
=
Globals
.
HTMLFile
(
'OFS/session'
)
def
title_and_id
(
self
):
def
title_and_id
(
self
):
...
@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
...
@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
def
nonempty
(
self
):
return
Globals
.
SessionBase
[
self
.
cookie
].
nonempty
()
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]
...
@@ -117,6 +131,9 @@ __version__='$Revision: 1.4 $'[11:-2]
##############################################################################
##############################################################################
#
#
# $Log: Session.py,v $
# $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
# Revision 1.4 1997/11/11 19:25:48 jim
# Changed title_and_id method to include a flag to indicate whether a
# Changed title_and_id method to include a flag to indicate whether a
# session has unsaved changes.
# session has unsaved changes.
...
...
lib/python/Products/OFSP/Version.py
View file @
9b2ffdee
...
@@ -12,7 +12,7 @@ __doc__='''A drop-in object that represents a session.
...
@@ -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
import
time
,
SimpleItem
,
AccessControl
.
Role
,
Persistence
,
Acquisition
,
Globals
from
string
import
rfind
from
string
import
rfind
...
@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
...
@@ -48,6 +48,20 @@ class Session(Persistence.Persistent,
meta_type
=
'Session'
meta_type
=
'Session'
icon
=
'OFS/session.gif'
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
):
def
_init
(
self
,
id
,
title
,
REQUEST
):
self
.
id
=
id
self
.
id
=
id
self
.
title
=
title
self
.
title
=
title
...
@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
...
@@ -56,7 +70,7 @@ class Session(Persistence.Persistent,
if
l
>=
0
:
cookie
=
cookie
[:
l
]
if
l
>=
0
:
cookie
=
cookie
[:
l
]
self
.
cookie
=
"%s/%s"
%
(
cookie
,
id
)
self
.
cookie
=
"%s/%s"
%
(
cookie
,
id
)
manage
=
Globals
.
HTMLFile
(
'OFS/sessionEdit'
)
manage
=
manage_main
=
Globals
.
HTMLFile
(
'OFS/sessionEdit'
)
index_html
=
Globals
.
HTMLFile
(
'OFS/session'
)
index_html
=
Globals
.
HTMLFile
(
'OFS/session'
)
def
title_and_id
(
self
):
def
title_and_id
(
self
):
...
@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
...
@@ -109,7 +123,7 @@ class Session(Persistence.Persistent,
def
nonempty
(
self
):
return
Globals
.
SessionBase
[
self
.
cookie
].
nonempty
()
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]
...
@@ -117,6 +131,9 @@ __version__='$Revision: 1.4 $'[11:-2]
##############################################################################
##############################################################################
#
#
# $Log: Version.py,v $
# $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
# Revision 1.4 1997/11/11 19:25:48 jim
# Changed title_and_id method to include a flag to indicate whether a
# Changed title_and_id method to include a flag to indicate whether a
# session has unsaved changes.
# session has unsaved changes.
...
...
lib/python/Products/OFSP/session.dtml
View file @
9b2ffdee
<html>
<head>
<HTML>
<title>
<!--#var title_or_id-->
</title>
<HEAD>
</head>
<TITLE><!--#var title_or_id--></TITLE>
</HEAD>
<body>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<!--#if Principia-Session-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
...
...
lib/python/Products/OFSP/sessionEdit.dtml
View file @
9b2ffdee
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
<TITLE>Edit Session</TITLE>
<TITLE>Edit Session</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit Session</H2>
<H2>Edit Session</H2>
<FORM ACTION="manage_edit" METHOD="POST">
<FORM ACTION="manage_edit" METHOD="POST">
...
...
lib/python/Products/OFSP/version.dtml
View file @
9b2ffdee
<html>
<head>
<HTML>
<title>
<!--#var title_or_id-->
</title>
<HEAD>
</head>
<TITLE><!--#var title_or_id--></TITLE>
</HEAD>
<body>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#if Principia-Session-->
<!--#if Principia-Session-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
<!--#if expr="_vars['Principia-Session'] != cookie"-->
...
...
lib/python/Products/OFSP/versionEdit.dtml
View file @
9b2ffdee
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
<TITLE>Edit Session</TITLE>
<TITLE>Edit Session</TITLE>
</HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<H2>Edit Session</H2>
<H2>Edit Session</H2>
<FORM ACTION="manage_edit" METHOD="POST">
<FORM ACTION="manage_edit" METHOD="POST">
...
...
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