Commit 24f2d003 authored by Jim Fulton's avatar Jim Fulton

updated icon management strategy

parent 0536874a
"""Access control objects"""
__version__='$Revision: 1.3 $'[11:-2]
__version__='$Revision: 1.4 $'[11:-2]
from Persistence import Persistent
......@@ -8,8 +8,6 @@ from DocumentTemplate import HTML
from Globals import MessageDialog
from Acquisition import Acquirer
from string import join, strip, split
from ImageFile import ImageFile
class SafeDtml(HTML):
"""Lobotomized document template w/no editing"""
......@@ -28,9 +26,6 @@ class SafeDtml(HTML):
class ACL(Persistent, Acquirer):
"""An object which stores and provides a user
interface to access control information"""
......@@ -42,8 +37,8 @@ class ACL(Persistent, Acquirer):
id ='AccessControl'
title ='Access Control'
icon='AccessControlIcon'
AccessControlIcon=ImageFile('www/AccessControl_icon.gif', globals())
#icon='p_/AccessControlIcon'
#AccessControlIcon=ImageFile('www/AccessControl_icon.gif', globals())
_groupsForm=SafeDtml('groupsForm')
_groupForm =SafeDtml('groupForm')
......
"""Access control package"""
__version__='$Revision: 1.23 $'[11:-2]
__version__='$Revision: 1.24 $'[11:-2]
import Globals
from Persistence import Persistent
......@@ -93,9 +93,7 @@ class UserFolder(Persistent, Item, Implicit, Management):
meta_type='User Folder'
id ='acl_users'
title ='User Folder'
icon='UserFolderIcon'
UserFolderIcon=ImageFile('www/UserFolder_icon.gif', globals())
UserIcon=ImageFile('www/User_icon.gif', globals())
icon='p_/UserFolder'
isPrincipiaFolderish=1
isAUserFolder=1
......@@ -267,6 +265,9 @@ class UserFolderHandler:
# $Log: User.py,v $
# Revision 1.24 1997/12/19 19:03:54 jim
# updated icon management strategy
#
# Revision 1.23 1997/12/18 21:12:47 jeffrey
# more ImageFile tweaks
#
......
......@@ -18,7 +18,7 @@ that user.
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="manage_editForm?name=<!--#var sequence-item fmt=url-quote-->">
<IMG SRC="UserIcon"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/User_icon"
ALT="Click to edit this user" BORDER="0">
</A>
<A HREF="manage_editForm?name=<!--#var sequence-item fmt=url-quote-->">
......
__doc__="""System management components"""
__version__='$Revision: 1.19 $'[11:-2]
__version__='$Revision: 1.20 $'[11:-2]
import sys,os,time,Globals
......@@ -7,9 +7,6 @@ from Globals import HTMLFile
from OFS.ObjectManager import ObjectManager
from CacheManager import CacheManager
from OFS import SimpleItem
from ImageFile import ImageFile
class ApplicationManager(ObjectManager,SimpleItem.Item,CacheManager):
"""System management"""
......@@ -34,8 +31,7 @@ class ApplicationManager(ObjectManager,SimpleItem.Item,CacheManager):
id ='Control_Panel'
name=title='Control Panel'
meta_type ='Control Panel'
icon='Icon'
Icon =ImageFile('OFS/www/ControlPanel_icon.gif')
icon='p_/ControlPanel_icon'
process_id=os.getpid()
process_start=int(time.time())
......
"""Standard management interface support
$Id: Management.py,v 1.8 1997/12/18 16:45:30 jeffrey Exp $"""
$Id: Management.py,v 1.9 1997/12/19 19:08:21 jim Exp $"""
__version__='$Revision: 1.8 $'[11:-2]
__version__='$Revision: 1.9 $'[11:-2]
import sys,Globals
from Dialogs import MessageDialog
from Globals import HTMLFile
from Undo import UndoSupport
from ImageFile import ImageFile
class Management(UndoSupport):
"""Management support"""
# cute little tab images
tabs_rtab=ImageFile('www/rtab.gif', globals())
tabs_ltab=ImageFile('www/ltab.gif', globals())
manage =HTMLFile('manage', globals())
manage_menu =HTMLFile('menu', globals())
......@@ -23,4 +18,3 @@ class Management(UndoSupport):
manage_copyright=HTMLFile('copyright', globals())
manage_options =()
PyPoweredSmall_Gif=ImageFile('www/PythonPoweredSmall.gif', globals())
......@@ -81,7 +81,7 @@ Creations, 910 Princess Anne Street, Suite 300, Fredericksburg, VA 22401.
<A NAME="PYTHON">
<H3>
<img src="PyPoweredSmall_Gif">
<img src="<!--#var SCRIPT_NAME-->/p_/PyPoweredSmall_Gif">
This software is powered by <a href="http://www.python.org/">Python</a>!
</H3>
<p>Copyright &copy; 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
......
......@@ -6,8 +6,8 @@
<!--#if expr="_vars['PATH_INFO'][-(_.len(action)):]==action"-->
<TD ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#FFFFFF">
<FONT SIZE="-1">
<IMG ALIGN="LEFT" HSPACE="0" SRC="tabs_ltab">
<IMG ALIGN="RIGHT" HSPACE="0" SRC="tabs_rtab">
<IMG ALIGN="LEFT" HSPACE="0" SRC="<!--#var SCRIPT_NAME-->/p_/ltab">
<IMG ALIGN="RIGHT" HSPACE="0" SRC="<!--#var SCRIPT_NAME-->/p_/rtab">
<STRONG>
<!--#if action-->
<A HREF="<!--#var action-->"><!--#var label--></A>
......@@ -21,8 +21,8 @@
<!--#else-->
<TD ALIGN="CENTER" VALIGN="TOP" BGCOLOR="#EFEFEF">
<FONT SIZE="-1">
<IMG ALIGN="LEFT" HSPACE="0" SRC="tabs_ltab">
<IMG ALIGN="RIGHT" HSPACE="0" SRC="tabs_rtab">
<IMG ALIGN="LEFT" HSPACE="0" SRC="<!--#var SCRIPT_NAME-->/p_/ltab">
<IMG ALIGN="RIGHT" HSPACE="0" SRC="<!--#var SCRIPT_NAME-->/p_/rtab">
<!--#if action-->
<A HREF="<!--#var action-->"><!--#var label--></A>
<!--#else action-->
......@@ -40,7 +40,7 @@
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<IMG SRC="<!--#var icon-->"
<IMG SRC="<!--#var SCRIPT_NAME-->/<!--#var icon-->"
ALT="<!--#var meta_type-->" BORDER="0">
<STRONG>
<!--#if meta_type-->
......
......@@ -7,7 +7,7 @@
<TR>
<TD VALIGN="TOP" NOWRAP>
<A HREF="manage_main" TARGET="manage_main">
<IMG SRC="<!--#var icon-->" BORDER="0"
<IMG SRC="<!--#var SCRIPT_NAME-->/<!--#var icon-->" BORDER="0"
ALT="Click to open this item"></A>
<STRONG>
<A HREF="manage_main" TARGET="manage_main">
......@@ -19,7 +19,7 @@
</TABLE>
<!--#tree sort=title_or_id nowrap=1-->
<A HREF="<!--#var tree-item-url-->/manage_main" TARGET="manage_main">
<IMG SRC="<!--#var tree-item-url-->/<!--#var icon-->" BORDER="0"
<IMG SRC="<!--#var SCRIPT_NAME-->/<!--#var icon-->" BORDER="0"
ALT="Click to open this item"></A>
<A HREF="<!--#var tree-item-url-->/manage_main" TARGET="manage_main">
<!--#var id-->
......
<HTML>
<HEAD>
<TITLE><!--#var title--></TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555" ALINK="#77003B">
<FONT SIZE="+2">Compact Database</FONT>
<P>
<FORM ACTION="<!--#var PARENT_URL-->/manage_pack" METHOD="POST">
<TABLE CELLPADDING="4">
<TR>
<TD VALIGN="TOP" COLSPAN="2">
The transactional nature of this application causes multiple versions of
certain types of data to be stored in it's database. While this system
allows powerful error recovery abilities, over time this data can take
up a lot of disk space, so you should occasionally compact the database.
<P>
Compacting the database makes it smaller by removing &quot;snapshots&quot;
of the application's state which are older than the date you select from
the list below. You can also select &quot;Remove all old revisions&quot;,
which will make the database as small as possible and remove all old
revisions from the database.
</TD>
</TR>
<TR>
<!--#if revert_points-->
<TD ALIGN="LEFT" VALIGN="TOP"><B>Remove revisions older than:</B></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="start_time" SIZE="5">
<OPTION VALUE="">Remove all old revisions</OPTION>
<!--#in revert_points-->
<OPTION><!--#var sequence-item--></OPTION>
<!--#/in revert_points-->
</SELECT><BR>
<INPUT TYPE="SUBMIT" VALUE=" Compact Database ">
</TD>
<!--#else revert_points-->
<TD COLSPAN="2">
<I>No old revisions currently exist in the database.</I>
</TD>
<!--#/if revert_points-->
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
......@@ -11,8 +11,8 @@
__doc__='''Application support
$Id: Application.py,v 1.32 1997/12/19 17:04:21 jim Exp $'''
__version__='$Revision: 1.32 $'[11:-2]
$Id: Application.py,v 1.33 1997/12/19 19:11:15 jim Exp $'''
__version__='$Revision: 1.33 $'[11:-2]
import Globals,Folder,os,regex,sys
......@@ -21,6 +21,7 @@ from DateTime import DateTime
from AccessControl.User import UserFolder
from App.ApplicationManager import ApplicationManager
from ImageFile import ImageFile
class Application(Folder.Folder):
title ='Principia'
......@@ -37,6 +38,26 @@ class Application(Folder.Folder):
"Shared Principia information"
__roles__=None
folder=ImageFile('www/Folder_icon.gif', globals())
image =ImageFile('www/Image_icon.gif', globals())
file =ImageFile('www/File_icon.gif', globals())
doc =ImageFile('www/Document_icon.gif', globals())
UserFolder=ImageFile('AccessControl/www/UserFolder_icon.gif')
User_icon =ImageFile('AccessControl/www/User_icon.gif')
locked=ImageFile('www/modified.gif', globals())
pl=ImageFile('TreeDisplay/www/Plus_icon.gif')
mi=ImageFile('TreeDisplay/www/Minus_icon.gif')
rtab=ImageFile('App/www/rtab.gif')
ltab=ImageFile('App/www/ltab.gif')
ControlPanel_icon=ImageFile('OFS/www/ControlPanel_icon.gif')
PyPoweredSmall_Gif=ImageFile('App/www/PythonPoweredSmall.gif')
#up=ImageFile('www/UpFolder_icon.gif', globals())
#help=ImageFile('www/Help_icon.gif', globals())
manage_options=(
{'icon':'OFS/Folder_icon.gif', 'label':'Contents',
'action':'manage_main', 'target':'manage_main'},
......@@ -263,6 +284,9 @@ class Misc_:
##############################################################################
#
# $Log: Application.py,v $
# Revision 1.33 1997/12/19 19:11:15 jim
# updated icon management strategy
#
# Revision 1.32 1997/12/19 17:04:21 jim
# Make Products a Package.
#
......
"""Document object"""
__version__='$Revision: 1.31 $'[11:-2]
__version__='$Revision: 1.32 $'[11:-2]
from Globals import HTML, HTMLFile
from string import join,split,strip,rfind,atoi
from AccessControl.Role import RoleManager
import SimpleItem, regex
import Acquisition
from ImageFile import ImageFile
class Document(HTML, RoleManager, SimpleItem.Item_w__name__,
Acquisition.Explicit):
"""Document object"""
meta_type ='Document'
icon='DocumentIcon'
DocumentIcon=ImageFile('www/Document_icon.gif', globals())
icon='p_/doc'
__state_names__=HTML.__state_names__+('title','__roles__')
# Documents masquerade as functions:
......
"""Folder object
$Id: Folder.py,v 1.25 1997/12/18 16:45:40 jeffrey Exp $"""
$Id: Folder.py,v 1.26 1997/12/19 19:11:16 jim Exp $"""
__version__='$Revision: 1.25 $'[11:-2]
__version__='$Revision: 1.26 $'[11:-2]
from Globals import HTMLFile
......@@ -17,9 +17,6 @@ import SimpleItem
from string import rfind, lower
from content_types import content_type, find_binary, text_type
import Image
from ImageFile import ImageFile
class FolderHandler:
"""Folder object handler"""
......@@ -77,10 +74,8 @@ class Folder(ObjectManager,RoleManager,DocumentHandler,
meta_type='Folder'
id ='folder'
title ='Folder object'
icon='FolderIcon'
FolderIcon=ImageFile('www/Folder_icon.gif', globals())
icon='p_/folder'
Modified_Gif=ImageFile('www/modified.gif', globals())
_properties=({'id':'title', 'type': 'string'},)
......
"""Image object"""
__version__='$Revision: 1.15 $'[11:-2]
__version__='$Revision: 1.16 $'[11:-2]
from Persistence import Persistent
from Globals import HTMLFile
......@@ -8,14 +8,12 @@ from Globals import MessageDialog
from AccessControl.Role import RoleManager
import SimpleItem
import Acquisition
from ImageFile import ImageFile
class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
Acquisition.Implicit):
"""Image object"""
meta_type='File'
icon='FileIcon'
FileIcon=ImageFile('www/File_icon.gif', globals())
icon='p_/file'
manage_editForm =HTMLFile('imageEdit', globals(), Kind='File', kind='file')
manage_uploadForm =HTMLFile('imageUpload', globals(), Kind='File', kind='file')
......@@ -94,8 +92,7 @@ class File(Persistent,RoleManager,SimpleItem.Item_w__name__,
class Image(File):
meta_type='Image'
icon='ImageIcon'
ImageIcon=ImageFile('www/Image_icon.gif', globals())
icon='p_/image'
manage_editForm =HTMLFile('imageEdit', globals(), Kind='Image', kind='image')
manage_uploadForm =HTMLFile('imageUpload', globals(), Kind='Image', kind='image')
......
__doc__="""Object Manager
$Id: ObjectManager.py,v 1.26 1997/12/18 21:12:49 jeffrey Exp $"""
$Id: ObjectManager.py,v 1.27 1997/12/19 19:11:17 jim Exp $"""
__version__='$Revision: 1.26 $'[11:-2]
__version__='$Revision: 1.27 $'[11:-2]
from SingleThreadedTransaction import Persistent
......@@ -16,7 +16,6 @@ from urllib import quote
from DocumentTemplate import html_quote
from cgi_module_publisher import type_converters
from DateTime import DateTime
from ImageFile import ImageFile
class ObjectManager(Acquirer,Management,Persistent):
"""Generic object manager
......@@ -28,21 +27,13 @@ class ObjectManager(Acquirer,Management,Persistent):
meta_types = dynamic_meta_types = ()
id ='default'
title=''
icon='FolderIcon'
FolderIcon=ImageFile('www/Folder_icon.gif', globals())
icon='p_/folder'
_objects =()
_properties =({'id':'title', 'type': 'string'},)
manage_main =HTMLFile('main', globals())
manage_propertiesForm=HTMLFile('properties', globals())
Blank_icon=ImageFile('TreeDisplay/www/Blank_icon.gif')
Plus_icon=ImageFile('TreeDisplay/www/Plus_icon.gif')
Minus_icon=ImageFile('TreeDisplay/www/Minus_icon.gif')
UpFolderIcon=ImageFile('www/UpFolder_icon.gif', globals())
Help_icon =ImageFile('www/Help_icon.gif', globals())
manage_options=(
{'icon':icon, 'label':'Objects',
'action':'manage_main', 'target':'manage_main'},
......@@ -464,6 +455,9 @@ class ObjectManager(Acquirer,Management,Persistent):
##############################################################################
#
# $Log: ObjectManager.py,v $
# Revision 1.27 1997/12/19 19:11:17 jim
# updated icon management strategy
#
# Revision 1.26 1997/12/18 21:12:49 jeffrey
# more ImageFile tweaks
#
......
......@@ -16,13 +16,12 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
item types.
$Id: SimpleItem.py,v 1.9 1997/12/18 16:45:42 jeffrey Exp $'''
__version__='$Revision: 1.9 $'[11:-2]
$Id: SimpleItem.py,v 1.10 1997/12/19 19:11:17 jim Exp $'''
__version__='$Revision: 1.10 $'[11:-2]
import Globals
from DateTime import DateTime
from CopySupport import CopySource
from ImageFile import ImageFile
class Item(CopySource):
......@@ -30,8 +29,7 @@ class Item(CopySource):
# Name, relative to SOFTWARE_URL of icon used to display item
# in folder listings.
icon='ItemIcon'
ItemIcon=ImageFile('App/www/arrow.jpg')
icon='Product/icon'
# Meta type used for selecting all objects of a given type.
meta_type='simple item'
......@@ -39,10 +37,6 @@ class Item(CopySource):
# Default title.
title=''
# cute little tab images
tabs_rtab=ImageFile('App/www/rtab.gif')
tabs_ltab=ImageFile('App/www/ltab.gif')
manage_tabs =Globals.HTMLFile('App/manage_tabs')
manage_info =Globals.HTMLFile('App/manage_info')
manage_options=({'icon':'', 'label':'Manage',
......@@ -124,6 +118,9 @@ class Item_w__name__(Item):
##############################################################################
#
# $Log: SimpleItem.py,v $
# Revision 1.10 1997/12/19 19:11:17 jim
# updated icon management strategy
#
# Revision 1.9 1997/12/18 16:45:42 jeffrey
# changeover to new ImageFile and HTMLFile handling
#
......
......@@ -8,33 +8,19 @@
#
##############################################################################
__doc__='''OFS
$Id: __init__.py,v 1.3 1997/11/11 19:26:37 jim Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
$Id: __init__.py,v 1.4 1997/12/19 19:11:18 jim Exp $'''
__version__='$Revision: 1.4 $'[11:-2]
import Session, DraftFolder
__.meta_types=(
{'name':'Draft Folder', 'action':'manage_addDraftFolderForm'},
{'name':'Session', 'action':'manage_addSessionForm'},
{'name':'File', 'action':'manage_addFileForm'},
{'name':'Image', 'action':'manage_addImageForm'},
{'name':'Folder', 'action':'manage_addFolderForm'},
{'name':'Document', 'action':'manage_addDocumentForm'},
)
__.methods={
'manage_addSessionForm': Session.addForm,
'manage_addSession': Session.add,
'manage_addDraftFolderForm': DraftFolder.addForm,
'manage_addDraftFolder': DraftFolder.add,
}
p_={}
##############################################################################
#
# $Log: __init__.py,v $
# Revision 1.4 1997/12/19 19:11:18 jim
# updated icon management strategy
#
# Revision 1.3 1997/11/11 19:26:37 jim
# Added DraftFolder.
#
......
......@@ -20,7 +20,7 @@
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<!--#var id-->/manage_main">
<IMG SRC="<!--#var SCRIPT_NAME-->/misc_/<!--#var icon-->"
<IMG SRC="<!--#var SCRIPT_NAME-->/<!--#var icon-->"
ALT="Click to open this item" BORDER="0"></A>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
......@@ -31,7 +31,7 @@
<!--#/if title-->
</A>
<!--#if modified_in_session-->
<IMG SRC="Modified_Gif"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
ALT="This item has been modified in a session">
<!--#/if modified_in_session-->
</TD>
......
......@@ -8,8 +8,8 @@
#
##############################################################################
__doc__='''OFS
$Id: __init__.py,v 1.2 1997/12/19 17:06:22 jim Exp $'''
__version__='$Revision: 1.2 $'[11:-2]
$Id: __init__.py,v 1.3 1997/12/19 19:14:15 jim Exp $'''
__version__='$Revision: 1.3 $'[11:-2]
import Session, DraftFolder
from ImageFile import ImageFile
......@@ -31,18 +31,17 @@ methods={
}
misc_={
'image': ImageFile('images/Image_icon.gif', globals()),
'file': ImageFile('images/File_icon.gif', globals()),
'doc': ImageFile('images/Document_icon.gif', globals()),
'draft': ImageFile('images/DraftFolder.gif', globals()),
'sup': ImageFile('images/DraftFolderControl.gif', globals()),
'session': ImageFile('images/session.gif', globals()),
'folder': ImageFile('images/folder.gif', globals()),
}
##############################################################################
#
# $Log: __init__.py,v $
# Revision 1.3 1997/12/19 19:14:15 jim
# updated icon management strategy
#
# Revision 1.2 1997/12/19 17:06:22 jim
# moved Sessions and Daft folders here.
#
......
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