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