Commit 50b8d21f authored by Amos Latteier's avatar Amos Latteier

fixed help sys headers and footers, tutorial topic order.

parent bbe18532
...@@ -149,6 +149,8 @@ class HelpSys(Acquisition.Implicit, ObjectManager, Item, Persistent): ...@@ -149,6 +149,8 @@ class HelpSys(Acquisition.Implicit, ObjectManager, Item, Persistent):
search=HTMLFile('search', globals()) search=HTMLFile('search', globals())
results=HTMLFile('results', globals()) results=HTMLFile('results', globals())
main=HTML("""<html></html>""") main=HTML("""<html></html>""")
standard_html_header=HTMLFile('menu_header', globals())
standard_html_footer=HTMLFile('menu_footer', globals())
button=HTMLFile('button', globals()) button=HTMLFile('button', globals())
......
<dtml-var standard_html_header> <dtml-var standard_html_header>
<dtml-call "REQUEST.set('MANAGE_TABS_NO_BANNER',1)"> <dtml-call "REQUEST.set('MANAGE_TABS_NO_BANNER',1)">
<dtml-var manage_tabs> <dtml-var manage_tabs>
<h2>Contents</h2>
<dtml-tree> <dtml-tree>
<dtml-if "meta_type =='Help Topic'"> <dtml-if "meta_type =='Help Topic'">
...@@ -11,4 +10,6 @@ ...@@ -11,4 +10,6 @@
</dtml-if> </dtml-if>
</dtml-tree> </dtml-tree>
<dtml-var standard_html_footer> <dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header> <dtml-var standard_html_header>
<dtml-call "REQUEST.set('MANAGE_TABS_NO_BANNER',1)"> <dtml-call "REQUEST.set('MANAGE_TABS_NO_BANNER',1)">
<dtml-call "REQUEST.set('management_view', 'Search')">
<dtml-var manage_tabs> <dtml-var manage_tabs>
<h2>Search Results</h2>
<p>Help topics matching <b><dtml-var SearchableText></b>:</p>
<p> <p>
<dtml-in "searchResults(REQUEST)"> <dtml-in "searchResults(REQUEST)">
<a href="<dtml-var SCRIPT_NAME><dtml-var url>" target="help_main"><dtml-var title_or_id></a><br> <a href="<dtml-var SCRIPT_NAME><dtml-var url>" target="help_main"><dtml-var title_or_id></a><br>
<dtml-else> <dtml-else>
<em>No help topics were found matching <b><dtml-var SearchableText></b>.</em> <em>No matches.</em>
</dtml-in> </dtml-in>
</p> </p>
<dtml-var standard_html_footer> <dtml-var standard_html_footer>
\ No newline at end of file
<dtml-var standard_html_header> <dtml-var standard_html_header>
<dtml-call "REQUEST.set('MANAGE_TABS_NO_BANNER',1)"> <dtml-call "REQUEST.set('MANAGE_TABS_NO_BANNER',1)">
<dtml-var manage_tabs> <dtml-var manage_tabs>
<h2>Search</h2>
<p> <p>
<form action="results" method="GET"> <form action="results" method="GET">
Search terms Search terms
...@@ -9,4 +9,4 @@ Search terms ...@@ -9,4 +9,4 @@ Search terms
<input type="submit" value=" Search "> <input type="submit" value=" Search ">
</form> </form>
</p> </p>
<dtml-var standard_html_footer> <dtml-var standard_html_footer>
\ No newline at end of file
...@@ -122,7 +122,8 @@ def initialize(context): ...@@ -122,7 +122,8 @@ def initialize(context):
# create glossary # create glossary
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('glossary', 'Zope Tutorial Glossary', text) glossary=TutorialTopic.TutorialTopic('tutorialGlossary', 'Zope Tutorial Glossary', text)
context.registerHelpTopic('tutorialGlossary', glossary)
# create lessons # create lessons
f=open(lesson_path) f=open(lesson_path)
...@@ -147,8 +148,6 @@ def initialize(context): ...@@ -147,8 +148,6 @@ def initialize(context):
break break
f.close() f.close()
# register glossary last
context.registerHelpTopic('glossary', glossary)
# Glossary functions # Glossary functions
...@@ -163,7 +162,7 @@ def glossaryTerm(match): ...@@ -163,7 +162,7 @@ def glossaryTerm(match):
""" """
name=match.group(1) name=match.group(1)
if name in terms: if name in terms:
return """<a href="../glossary#%s">%s</a>""" % \ return """<a href="../tutorialGlossary#%s">%s</a>""" % \
(quote_plus(name), html_quote(name)) (quote_plus(name), html_quote(name))
return """[%s]""" % name return """[%s]""" % name
......
<dtml-unless "id=='tutorialGlossary'">
<dtml-call "REQUEST.set('ids', aq_parent.objectIds())"> <dtml-call "REQUEST.set('ids', aq_parent.objectIds())">
<dtml-call "ids.remove('glossary')"> <dtml-call "ids.remove('tutorialGlossary')">
<dtml-call "REQUEST.set('i', ids.index(id))"> <dtml-call "REQUEST.set('i', ids.index(id))">
<table width="100%" border="0" padding="0" spacing="0"> <table width="100%" border="0" padding="0" spacing="0">
...@@ -22,4 +23,8 @@ ...@@ -22,4 +23,8 @@
</dtml-if> </dtml-if>
</dtml-unless> </dtml-unless>
</td></tr></table> </td></tr></table>
\ No newline at end of file </dtml-unless>
Zope Tutorial 1.0a5 Zope Tutorial 1.0
\ No newline at end of file
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