Commit 0a62f41b authored by Amos Latteier's avatar Amos Latteier

Continued tutorial fixes. Now it's really fixed ;-). This should complete the...

Continued tutorial fixes. Now it's really fixed ;-). This should complete the fixes made necessary by STXNG.
parent b8659956
...@@ -172,6 +172,31 @@ onClick="javascript:window.open('%s/manage_main', 'manage_main').focus()" ...@@ -172,6 +172,31 @@ onClick="javascript:window.open('%s/manage_main', 'manage_main').focus()"
>Show lesson examples</a> in another window. >Show lesson examples</a> in another window.
</p>""" % (url, url, url) </p>""" % (url, url, url)
tutorialNavigation=DTMLFile('dtml/tutorialNav', globals())
class GlossaryTopic(TutorialTopic):
"""
A Tutorial Glossary Help Topic
"""
def __init__(self, id, title, text):
self.id=id
self.title=title
self.obj=HTML(text)
index_html=DTMLFile('dtml/glossaryView', globals())
def formatted_content(self, REQUEST):
"""
Custom stx formatting for tutorial topics
"""
text=self.obj(self, REQUEST)
text=str(StructuredText.HTML(text))
pre_pat.sub(clean_pre, text)
return text
def apiLink(self, klass, REQUEST): def apiLink(self, klass, REQUEST):
""" """
Returns the URL to a API documentation for a given class. Returns the URL to a API documentation for a given class.
...@@ -188,8 +213,6 @@ onClick="javascript:window.open('%s/manage_main', 'manage_main').focus()" ...@@ -188,8 +213,6 @@ onClick="javascript:window.open('%s/manage_main', 'manage_main').focus()"
url="%s/Control_Panel/Products/OFSP/Help/dtml-%s.stx" % (REQUEST['SCRIPT_NAME'], tag) url="%s/Control_Panel/Products/OFSP/Help/dtml-%s.stx" % (REQUEST['SCRIPT_NAME'], tag)
return '<a href="%s">DTML Reference</a>' % url return '<a href="%s">DTML Reference</a>' % url
tutorialNavigation=DTMLFile('dtml/tutorialNav', globals())
addTutorialForm=DTMLFile('dtml/tutorialAdd', globals()) addTutorialForm=DTMLFile('dtml/tutorialAdd', globals())
......
...@@ -123,7 +123,8 @@ def initialize(context): ...@@ -123,7 +123,8 @@ def initialize(context):
text=open(glossary_path).read() text=open(glossary_path).read()
text=term_pat.sub(defineTerm, text) text=term_pat.sub(defineTerm, text)
glossary=TutorialTopic.TutorialTopic('tutorialGlossary', 'Zope Tutorial Glossary', text) glossary=TutorialTopic.GlossaryTopic('tutorialGlossary',
'Zope Tutorial Glossary', text)
context.registerHelpTopic('tutorialGlossary', glossary) context.registerHelpTopic('tutorialGlossary', glossary)
# create lessons # create lessons
......
<dtml-var standard_html_header>
<style type="text/css">
PRE {
background-color : #FFFFAA;
border : thin solid;
white-space : pre;
padding-bottom : 10pt;
padding-left : 10pt;
padding-right : 10pt;
padding-top : 10pt;
}
.feedback {
font-size: 9pt;
}
.warning {
font-size: 9pt;
font-weight: bold;
color: red;
}
.information {
font-size: 9pt;
font-weight: bold;
}
</style>
<h2><dtml-var title></h2>
<dtml-var expr="formatted_content(REQUEST)">
<p class="feedback">Comments on this lesson?
<a href="mailto:docs@digicool.com?subject=<dtml-var title>">Email feedback</a>.
</p>
<dtml-var standard_html_footer>
...@@ -30,13 +30,14 @@ PRE { ...@@ -30,13 +30,14 @@ PRE {
<h2><dtml-var title></h2> <h2><dtml-var title></h2>
<dtml-var obj> <dtml-var obj>
<dtml-unless "id=='glossary'">
<hr> <hr>
<dtml-var tutorialNavigation> <dtml-var tutorialNavigation>
</dtml-unless>
<p class="feedback">Comments on this lesson? <p class="feedback">Comments on this lesson?
<a href="mailto:docs@digicool.com?subject=<dtml-var title>">Email feedback</a>. <a href="mailto:docs@digicool.com?subject=<dtml-var title>">Email feedback</a>.
</p> </p>
<dtml-var standard_html_footer> <dtml-var standard_html_footer>
Glossary Glossary
For general information about Zope <a For general information about Zope <a
href="http://www.zope.org/SiteIndex/searchForm" target="_blank">search</a> Zope.org. href="http://www.zope.org/SiteIndex/searchForm"
target="_blank">search</a> Zope.org.
For Zope documentation try the <a href="http://zdp.zope.org" target="_blank">Zope For Zope documentation try the <a href="http://zdp.zope.org"
Documentation Project</a> site and the <a target="_blank">Zope Documentation Project</a> site and the <a
href="http://www.zope.org/Documentation" target="_blank">documentation area</a> on Zope.org. href="http://www.zope.org/Documentation"
target="_blank">documentation area</a> on Zope.org.
[DateTime] -- A DTML function to get the current time or to create a [DateTime] -- A DTML function to get the current time or to create a
date time object given a string. date time object given a string.
...@@ -17,8 +19,8 @@ Glossary ...@@ -17,8 +19,8 @@ Glossary
results in web pages. results in web pages.
For more information on DTML see the <a For more information on DTML see the <a
href="http://www.zope.org/Members/michel/ZB/DTML.dtml" target="_blank">DTML href="http://www.zope.org/Members/michel/ZB/DTML.dtml"
chapter</a> of The Zope Book. target="_blank">DTML chapter</a> of The Zope Book.
[DTML Document] -- A Zope object for a web page. [DTML Document] -- A Zope object for a web page.
You can use DTML tags in a DTML document. You can use DTML tags in a DTML document.
...@@ -27,7 +29,7 @@ Glossary ...@@ -27,7 +29,7 @@ Glossary
href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml" href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
target="_blank">Basic Objects chapter</a> of The Zope Book. target="_blank">Basic Objects chapter</a> of The Zope Book.
<dtml-var "apiLink('OFSP'+'.DTMLDocument.DTMLDocument', REQUEST)"> <dtml-var "apiLink('OFSP.DTMLDocument.DTMLDocument', REQUEST)">
[DTML Method] -- A Zope object that holds a piece of content that can [DTML Method] -- A Zope object that holds a piece of content that can
be inserted into a web page. You can use DTML tags in a DTML Method. be inserted into a web page. You can use DTML tags in a DTML Method.
...@@ -36,7 +38,7 @@ Glossary ...@@ -36,7 +38,7 @@ Glossary
href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml" href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
target="_blank">Basic Objects chapter</a> of The Zope Book. target="_blank">Basic Objects chapter</a> of The Zope Book.
<dtml-var "apiLink('OFSP'+'.DTMLMethod.DTMLMethod', REQUEST)"> <dtml-var "apiLink('OFSP.DTMLMethod.DTMLMethod', REQUEST)">
[Delete] -- Remove an object from the current Folder. Unlike Cut, this [Delete] -- Remove an object from the current Folder. Unlike Cut, this
does not place a copy of the object in the clipboard. does not place a copy of the object in the clipboard.
...@@ -105,7 +107,7 @@ Glossary ...@@ -105,7 +107,7 @@ Glossary
href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml" href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
target="_blank">Basic Objects chapter</a> of The Zope Book. target="_blank">Basic Objects chapter</a> of The Zope Book.
<dtml-var "apiLink('OFSP'+'.Folder.Folder', REQUEST)"> <dtml-var "apiLink('OFSP.Folder.Folder', REQUEST)">
[HTTP Cookies] -- Cookies allow you to record information in a visitor's [HTTP Cookies] -- Cookies allow you to record information in a visitor's
browser. This is commonly used to provide personalization for a web site. browser. This is commonly used to provide personalization for a web site.
...@@ -121,7 +123,7 @@ Glossary ...@@ -121,7 +123,7 @@ Glossary
href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml" href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
target="_blank">Basic Objects chapter</a> of The Zope Book. target="_blank">Basic Objects chapter</a> of The Zope Book.
<dtml-var "apiLink('OFSP'+'.Image.Image', REQUEST)"> <dtml-var "apiLink('OFSP.Image.Image', REQUEST)">
[index_html] -- The name of the default Zope object in a Folder. [index_html] -- The name of the default Zope object in a Folder.
When you view a Folder the index_html object will be displayed When you view a Folder the index_html object will be displayed
...@@ -131,7 +133,7 @@ Glossary ...@@ -131,7 +133,7 @@ Glossary
[Mail Host] -- A Zope object that allows you to send email. [Mail Host] -- A Zope object that allows you to send email.
Use the &lt;dtml-sendmail&gt; tag to send email. Use the &lt;dtml-sendmail&gt; tag to send email.
<dtml-var "apiLink('MailHost'+'.MailHost.MailHost', REQUEST)"> <dtml-var "apiLink('MailHost.MailHost.MailHost', REQUEST)">
[Paste] -- Insert the objects from the clipboard into the current Folder. [Paste] -- Insert the objects from the clipboard into the current Folder.
...@@ -145,7 +147,7 @@ Glossary ...@@ -145,7 +147,7 @@ Glossary
href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml" href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
target="_blank">Basic Objects chapter</a> of The Zope Book. target="_blank">Basic Objects chapter</a> of The Zope Book.
<dtml-var "apiLink('OFSP'+'.PropertyManager.PropertyManager', REQUEST)"> <dtml-var "apiLink('OFSP.PropertyManager.PropertyManager', REQUEST)">
[standard_html_header] -- The standard Zope header object. By [standard_html_header] -- The standard Zope header object. By
convention this object displays an HTML header. convention this object displays an HTML header.
...@@ -166,5 +168,5 @@ Glossary ...@@ -166,5 +168,5 @@ Glossary
href="http://www.zope.org/Members/michel/ZB/RelationalDatabases.dtml" href="http://www.zope.org/Members/michel/ZB/RelationalDatabases.dtml"
target="_blank">Relational Database chapter</a> of The Zope Book. target="_blank">Relational Database chapter</a> of The Zope Book.
<dtml-var "apiLink('ZSQLMethods'+'.ZSQLMethod.ZSQLMethod', REQUEST)"> <dtml-var "apiLink('ZSQLMethods.ZSQLMethod.ZSQLMethod', REQUEST)">
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