Commit 00d63d2a authored by 's avatar

Changed embedded dtml to new syntax.

parent 126c3c87
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
target='_top') target='_top')
</PRE>""" </PRE>"""
__version__='$Revision: 1.5 $'[11:-2] __version__='$Revision: 1.6 $'[11:-2]
from Globals import HTML from Globals import HTML
...@@ -111,13 +111,11 @@ from Globals import HTML ...@@ -111,13 +111,11 @@ from Globals import HTML
MessageDialog = HTML(""" MessageDialog = HTML("""
<HTML> <HTML>
<HEAD> <HEAD>
<TITLE><!--#var title--></TITLE> <TITLE><dtml-var title></TITLE>
</HEAD> </HEAD>
<BODY BGCOLOR="#FFFFFF"> <BODY BGCOLOR="#FFFFFF">
<FORM ACTION="<!--#var action-->" METHOD="GET" <FORM ACTION="<dtml-var action>" METHOD="GET" <dtml-if
<!--#if target--> target>TARGET="<dtml-var target>"</dtml-if>>
TARGET="<!--#var target-->"
<!--#/if target-->>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="10"> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="10">
<TR> <TR>
<TD VALIGN="TOP"> <TD VALIGN="TOP">
...@@ -127,7 +125,7 @@ MessageDialog = HTML(""" ...@@ -127,7 +125,7 @@ MessageDialog = HTML("""
<TD VALIGN="TOP"> <TD VALIGN="TOP">
<BR><BR> <BR><BR>
<CENTER> <CENTER>
<!--#var message--> <dtml-var message>
</CENTER> </CENTER>
</TD> </TD>
</TR> </TR>
......
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.115 1999/10/21 14:08:08 jim Exp $''' $Id: Application.py,v 1.116 1999/11/03 16:05:20 brian Exp $'''
__version__='$Revision: 1.115 $'[11:-2] __version__='$Revision: 1.116 $'[11:-2]
import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_
...@@ -109,17 +109,17 @@ from zLOG import LOG, ERROR ...@@ -109,17 +109,17 @@ from zLOG import LOG, ERROR
_standard_error_msg='''\ _standard_error_msg='''\
<!--#var standard_html_header--> <dtml-var standard_html_header>
<!--#if error_message--> <dtml-if error_message>
<!--#var error_message--> <dtml-var error_message>
<!--#else--> <dtml-else>
<TABLE BORDER="0" WIDTH="100%"> <TABLE BORDER="0" WIDTH="100%">
<TR VALIGN="TOP"> <TR VALIGN="TOP">
<TD WIDTH="10%" ALIGN="CENTER"> <TD WIDTH="10%" ALIGN="CENTER">
<IMG SRC="<!--#var BASE1-->/p_/ZButton" ALT="Zope"> <IMG SRC="<dtml-var BASE1>/p_/ZButton" ALT="Zope">
</TD> </TD>
<TD WIDTH="90%"> <TD WIDTH="90%">
...@@ -128,8 +128,8 @@ _standard_error_msg='''\ ...@@ -128,8 +128,8 @@ _standard_error_msg='''\
</P> </P>
<P> <P>
<STRONG>Error Type: <!--#var error_type--></STRONG><BR> <STRONG>Error Type: <dtml-var error_type></STRONG><BR>
<STRONG>Error Value: <!--#var error_value--></STRONG><BR> <STRONG>Error Value: <dtml-var error_value></STRONG><BR>
</P> </P>
<HR NOSHADE> <HR NOSHADE>
...@@ -137,10 +137,10 @@ _standard_error_msg='''\ ...@@ -137,10 +137,10 @@ _standard_error_msg='''\
<P>Troubleshooting Suggestions</P> <P>Troubleshooting Suggestions</P>
<UL> <UL>
<!--#if "error_type in ('KeyError','NameError')"--> <dtml-if "error_type in ('KeyError','NameError')">
<LI>This resource may be trying to reference a <LI>This resource may be trying to reference a
nonexistent object or variable <STRONG><!--#var error_value--></STRONG>.</LI> nonexistent object or variable <STRONG><dtml-var error_value></STRONG>.</LI>
<!--#/if--> </dtml-if>
<LI>The URL may be incorrect.</LI> <LI>The URL may be incorrect.</LI>
<LI>The parameters passed to this resource may be incorrect.</LI> <LI>The parameters passed to this resource may be incorrect.</LI>
<LI>A resource that this resource relies on may be encountering an error.</LI> <LI>A resource that this resource relies on may be encountering an error.</LI>
...@@ -156,13 +156,13 @@ _standard_error_msg='''\ ...@@ -156,13 +156,13 @@ _standard_error_msg='''\
</TD></TR> </TD></TR>
</TABLE> </TABLE>
<!--#comment--> <dtml-comment>
Here, events like logging and other actions may also be performed, such as Here, events like logging and other actions may also be performed, such as
sending mail automatically to the administrator. sending mail automatically to the administrator.
<!--#/comment--> </dtml-comment>
<!--#/if--> </dtml-if>
<!--#var standard_html_footer-->''' <dtml-var standard_html_footer>'''
class Application(Globals.ApplicationDefaultPermissions, class Application(Globals.ApplicationDefaultPermissions,
...@@ -211,7 +211,7 @@ class Application(Globals.ApplicationDefaultPermissions, ...@@ -211,7 +211,7 @@ class Application(Globals.ApplicationDefaultPermissions,
self, self,
'standard_html_header', 'standard_html_header',
'Standard Html Header', 'Standard Html Header',
'<HTML><HEAD><TITLE><!--#var title_or_id-->' \ '<HTML><HEAD><TITLE><dtml-var title_or_id>' \
'</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">') '</TITLE></HEAD><BODY BGCOLOR="#FFFFFF">')
Document.manage_addDocument( Document.manage_addDocument(
self, self,
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
# #
############################################################################## ##############################################################################
__doc__="""Copy interface""" __doc__="""Copy interface"""
__version__='$Revision: 1.44 $'[11:-2] __version__='$Revision: 1.45 $'[11:-2]
import sys, string, Globals, Moniker, tempfile, ExtensionClass import sys, string, Globals, Moniker, tempfile, ExtensionClass
from marshal import loads, dumps from marshal import loads, dumps
...@@ -461,13 +461,11 @@ def _cb_decode(s): ...@@ -461,13 +461,11 @@ def _cb_decode(s):
fMessageDialog=Globals.HTML(""" fMessageDialog=Globals.HTML("""
<HTML> <HTML>
<HEAD> <HEAD>
<TITLE><!--#var title--></TITLE> <TITLE><dtml-var title></TITLE>
</HEAD> </HEAD>
<BODY BGCOLOR="#FFFFFF"> <BODY BGCOLOR="#FFFFFF">
<FORM ACTION="<!--#var action-->" METHOD="GET" <FORM ACTION="<dtml-var action>" METHOD="GET" <dtml-if
<!--#if target--> target>TARGET="<dtml-var target>"</dtml-if>>
TARGET="<!--#var target-->"
<!--#/if target-->>
<TABLE BORDER="0" WIDTH="100%%" CELLPADDING="10"> <TABLE BORDER="0" WIDTH="100%%" CELLPADDING="10">
<TR> <TR>
<TD VALIGN="TOP"> <TD VALIGN="TOP">
...@@ -477,7 +475,7 @@ fMessageDialog=Globals.HTML(""" ...@@ -477,7 +475,7 @@ fMessageDialog=Globals.HTML("""
<TD VALIGN="TOP"> <TD VALIGN="TOP">
<BR><BR> <BR><BR>
<CENTER> <CENTER>
<!--#var message--> <dtml-var message>
</CENTER> </CENTER>
</TD> </TD>
</TR> </TR>
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Document objects.""" """DTML Document objects."""
__version__='$Revision: 1.30 $'[11:-2] __version__='$Revision: 1.31 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
...@@ -181,12 +181,12 @@ class DTMLDocument(PropertyManager, DTMLMethod): ...@@ -181,12 +181,12 @@ class DTMLDocument(PropertyManager, DTMLMethod):
Globals.default__class_init__(DTMLDocument) Globals.default__class_init__(DTMLDocument)
default_dd_html="""<!--#var standard_html_header--> default_dd_html="""<dtml-var standard_html_header>
<h2><!--#var title_or_id--></h2> <h2><dtml-var title_or_id></h2>
<p> <p>
This is the <!--#var id--> Document. This is the <dtml-var id> Document.
</p> </p>
<!--#var standard_html_footer-->""" <dtml-var standard_html_footer>"""
addForm=HTMLFile('documentAdd', globals()) addForm=HTMLFile('documentAdd', globals())
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Method objects.""" """DTML Method objects."""
__version__='$Revision: 1.34 $'[11:-2] __version__='$Revision: 1.35 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower from string import join,split,strip,rfind,atoi,lower
...@@ -372,11 +372,13 @@ def decapitate(html, RESPONSE=None, ...@@ -372,11 +372,13 @@ def decapitate(html, RESPONSE=None,
return html return html
default_dm_html="""<!--#var standard_html_header--> default_dm_html="""<dtml-var standard_html_header>
<H2><!--#var title_or_id--> <!--#var document_title--></H2> <h2><dtml-var title_or_id> <dtml-var document_title></h2>
<P>This is the <!--#var document_id--> Document in <p>
the <!--#var title_and_id--> Folder.</P> This is the <dtml-var document_id> Document
<!--#var standard_html_footer-->""" in the <dtml-var title_and_id> Folder.
</p>
<dtml-var standard_html_footer>"""
addForm=HTMLFile('methodAdd', globals()) addForm=HTMLFile('methodAdd', globals())
......
...@@ -82,8 +82,8 @@ ...@@ -82,8 +82,8 @@
# attributions are listed in the accompanying credits file. # attributions are listed in the accompanying credits file.
# #
############################################################################## ##############################################################################
__rcs_id__='$Id: SendMailTag.py,v 1.6 1999/03/22 20:39:53 brian Exp $' __rcs_id__='$Id: SendMailTag.py,v 1.7 1999/11/03 16:09:14 brian Exp $'
__version__='$Revision: 1.6 $'[11:-2] __version__='$Revision: 1.7 $'[11:-2]
from MailHost import MailBase from MailHost import MailBase
from DocumentTemplate.DT_Util import * from DocumentTemplate.DT_Util import *
...@@ -94,13 +94,13 @@ import string ...@@ -94,13 +94,13 @@ import string
class SendMailTag: class SendMailTag:
'''the send mail tag, used like thus: '''the send mail tag, used like thus:
<!--#sendmail someMailHostID--> <dtml-sendmail someMailHostID>
to: person@their.machine.com to: person@their.machine.com
from: me@mymachine.net from: me@mymachine.net
subject: just called to say... subject: just called to say...
boy howdy! boy howdy!
<!--#/sendmail--> </dtml-sendmail>
Text between the sendmail and /sendmail tags is processed Text between the sendmail and /sendmail tags is processed
by the MailHost machinery and delivered. There must be at least by the MailHost machinery and delivered. There must be at least
......
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