[Zope-Checkins] CVS: Zope2 - TutorialTopic.py:1.10 __init__.py:1.9 glossary.stx:1.4

Amos Latteier amos@digicool.com
Tue, 3 Jul 2001 19:32:43 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/Products/ZopeTutorial
In directory korak.digicool.com:/tmp/cvs-serv13820

Modified Files:
	TutorialTopic.py __init__.py glossary.stx 
Log Message:
Continued tutorial fixes. Now it's really fixed ;-). This should complete the fixes made necessary by STXNG.



--- Updated File TutorialTopic.py in package Zope2 --
--- TutorialTopic.py	2001/07/03 22:20:46	1.9
+++ TutorialTopic.py	2001/07/03 23:32:42	1.10
@@ -172,6 +172,31 @@
 >Show lesson examples</a> in another window.
 </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):
         """
         Returns the URL to a API documentation for a given class.
@@ -187,8 +212,6 @@
         """
         url="%s/Control_Panel/Products/OFSP/Help/dtml-%s.stx" % (REQUEST['SCRIPT_NAME'], tag)
         return '<a href="%s">DTML Reference</a>' % url
-
-    tutorialNavigation=DTMLFile('dtml/tutorialNav', globals())
 
 
 addTutorialForm=DTMLFile('dtml/tutorialAdd', globals())

--- Updated File __init__.py in package Zope2 --
--- __init__.py	2001/06/14 21:01:22	1.8
+++ __init__.py	2001/07/03 23:32:43	1.9
@@ -123,7 +123,8 @@
     text=open(glossary_path).read()
     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)
 
     # create lessons

--- Updated File glossary.stx in package Zope2 --
--- glossary.stx	2001/06/21 23:14:54	1.3
+++ glossary.stx	2001/07/03 23:32:43	1.4
@@ -1,11 +1,13 @@
 Glossary
 
   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
-  Documentation Project</a> site and the <a
-  href="http://www.zope.org/Documentation" target="_blank">documentation area</a> on Zope.org.
+  For Zope documentation try the <a href="http://zdp.zope.org"
+  target="_blank">Zope Documentation Project</a> site and the <a
+  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
   date time object given a string.
@@ -17,8 +19,8 @@
   results in web pages.
 
     For more information on DTML see the <a
-    href="http://www.zope.org/Members/michel/ZB/DTML.dtml" target="_blank">DTML
-    chapter</a> of The Zope Book.
+    href="http://www.zope.org/Members/michel/ZB/DTML.dtml"
+    target="_blank">DTML chapter</a> of The Zope Book.
 
   [DTML Document] -- A Zope object for a web page.
   You can use DTML tags in a DTML document.
@@ -27,7 +29,7 @@
     href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
     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
   be inserted into a web page. You can use DTML tags in a DTML Method.
@@ -36,7 +38,7 @@
     href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
     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
   does not place a copy of the object in the clipboard.
@@ -105,7 +107,7 @@
     href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
     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
   browser. This is commonly used to provide personalization for a web site. 
@@ -121,7 +123,7 @@
     href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
     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.
   When you view a Folder the index_html object will be displayed
@@ -131,7 +133,7 @@
   [Mail Host] -- A Zope object that allows you 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.
   
@@ -145,7 +147,7 @@
     href="http://www.zope.org/Members/michel/ZB/BasicObject.dtml"
     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
   convention this object displays an HTML header.
@@ -166,5 +168,5 @@
     href="http://www.zope.org/Members/michel/ZB/RelationalDatabases.dtml"
     target="_blank">Relational Database chapter</a> of The Zope Book.
 
-    <dtml-var "apiLink('ZSQLMethods'+'.ZSQLMethod.ZSQLMethod', REQUEST)">
+    <dtml-var "apiLink('ZSQLMethods.ZSQLMethod.ZSQLMethod', REQUEST)">