Commit 8a06860b authored by 's avatar

Added DTML Methods/Docs with properties

parent b2d051e8
......@@ -85,8 +85,8 @@
__doc__='''Application support
$Id: Application.py,v 1.84 1999/01/21 22:48:18 jim Exp $'''
__version__='$Revision: 1.84 $'[11:-2]
$Id: Application.py,v 1.85 1999/01/27 20:30:28 brian Exp $'''
__version__='$Revision: 1.85 $'[11:-2]
import Globals,Folder,os,regex,sys,App.Product, App.ProductRegistry
......@@ -157,7 +157,9 @@ class Application(Globals.ApplicationDefaultPermissions, Folder.Folder,
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())
dtmldoc=doc=ImageFile('www/dtmldoc.gif', globals())
dtmlmethod =ImageFile('www/dtmlmethod.gif', globals())
broken=ImageFile('www/broken.gif', globals())
UserFolder=ImageFile('AccessControl/www/UserFolder_icon.gif')
......
This diff is collapsed.
......@@ -105,9 +105,9 @@
Folders are the basic container objects and are analogous to directories.
$Id: Folder.py,v 1.57 1999/01/19 23:59:09 amos Exp $"""
$Id: Folder.py,v 1.58 1999/01/27 20:30:28 brian Exp $"""
__version__='$Revision: 1.57 $'[11:-2]
__version__='$Revision: 1.58 $'[11:-2]
from Globals import HTMLFile
......@@ -116,7 +116,6 @@ from PropertyManager import PropertyManager
from CopySupport import CopyContainer
from FindSupport import FindSupport
from Image import Image, File
from Document import DocumentHandler
from AccessControl.Role import RoleManager
import SimpleItem
from string import rfind, lower
......@@ -139,16 +138,11 @@ def manage_addFolder(self,id,title='',createPublic=0,createUserF=0,
i.title=title
self._setObject(id,i)
if createUserF: i.manage_addUserFolder()
if createPublic: i.manage_addDocument(id='index_html',title='')
if createPublic: i.manage_addDTMLDocument(id='index_html',title='')
if REQUEST is not None: return self.manage_main(self,REQUEST,update_menu=1)
class Folder(ObjectManager,
PropertyManager,
RoleManager,
DocumentHandler,
SimpleItem.Item,
CopyContainer,
FindSupport):
class Folder(ObjectManager, PropertyManager, RoleManager, SimpleItem.Item,
CopyContainer, FindSupport):
"""
The basic container object in Principia. Folders can hold almost all
other Principia objects.
......@@ -292,7 +286,7 @@ class PUTer(Acquisition.Explicit):
else: type=text_type(BODY)
__traceback_info__=suf, dot, name, type
if lower(type)[:5]=='text/':
return self._parent.manage_addDocument(name,'',BODY,
return self._parent.manage_addDTMLDocument(name,'',BODY,
REQUEST=REQUEST)
if lower(type)[:6]=='image/':
self._parent._setObject(name, Image(name, '', BODY,
......
......@@ -83,22 +83,10 @@
#
##############################################################################
"""Property management"""
__version__='$Revision: 1.2 $'[11:-2]
"""Property management."""
__version__='$Revision: 1.3 $'[11:-2]
## from ObjectManager import ObjectManager
## from CopySupport import CopyContainer
## from FindSupport import FindSupport
## from Image import Image, File
## from Document import DocumentHandler
## from AccessControl.Role import RoleManager
## import SimpleItem
## from string import rfind, lower
## from content_types import content_type, find_binary, text_type
## import Globals
from ZPublisher.Converters import type_converters
from Globals import HTMLFile, MessageDialog
from string import find,join,lower,split
......@@ -107,12 +95,6 @@ from DateTime import DateTime
def aq_base(ob):
if hasattr(ob, 'aq_base'):
return ob.aq_base
return ob
class PropertyManager:
"""
The PropertyManager mixin class provides an object with
......@@ -328,3 +310,9 @@ class PropertyManager:
v=getattr(self,n)
r.append({'id': n, 'input': imap[t](None,n,t,v)})
return r
def aq_base(ob):
if hasattr(ob, 'aq_base'):
return ob.aq_base
return ob
<HTML>
<HEAD>
<TITLE>Add Document</TITLE>
<TITLE>Add DTML Document</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add Document</H2>
<H2>Add DTML Document</H2>
<P>
You may create a new html document 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.
You may create a new DTML Document using the form below.
You may also choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
<FORM ACTION="manage_addDocument" METHOD="POST"
<FORM ACTION="manage_addDTMLDocument" METHOD="POST"
ENCTYPE="multipart/form-data" TARGET="manage_main">
<TABLE CELLSPACING="2">
<TR>
......
<HTML>
<HEAD>
<TITLE>Add DTML Method</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<H2>Add DTML Method</H2>
<P>
You may create a new DTML Method object using the form below.
You may also choose to upload an existing html file from your
local computer by clicking the <I>Browse</I> button.
<FORM ACTION="manage_addDTMLMethod" 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"><INPUT TYPE="TEXT" NAME="id" SIZE="40"></TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP"><EM>Title</EM></TH>
<TD ALIGN="LEFT" VALIGN="TOP"><INPUT TYPE="TEXT" NAME="title" SIZE="40"></TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP"><EM><STRONG>File</STRONG></EM></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="file" NAME="file:string" SIZE="25" VALUE="">
</TD>
</TR>
<TR><TH></TH>
<TD>
<INPUT TYPE="SUBMIT" VALUE=" Add ">
<INPUT TYPE="SUBMIT" VALUE=" Add and Edit " NAME="submit">
</TD>
</TR>
</TABLE>
</FORM>
</BODY></HTML>
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