51
54
def show_help_menu(req):
52
55
"""Show the help menu."""
54
56
# Set request attributes
55
57
req.content_type = "text/html"
56
58
req.write_html_head_foot = True
59
req.write('<div id="ivle_padding">\n')
60
req.write("<h1>Help</h1>\n")
60
ctx = genshi.template.Context()
62
62
# Write a list of links to all apps with help modules
64
64
# Tab apps, in order of tabs
65
65
for appurl in ivle.conf.apps.apps_in_tabs:
66
66
app = ivle.conf.apps.app_url[appurl]
68
req.write(' <li><a href="%s">%s</a></li>\n'
69
% (os.path.join(util.make_path("help"), appurl), app.name))
69
new_app['appurl'] = os.path.join(util.make_path("help"), appurl)
70
new_app['name'] = app.name
71
ctx['apps'].append(new_app)
71
req.write(' <li><a href="%s">Terms of Service</a></li>\n'
72
% (util.make_path("tos")))
73
ctx['tos'] = util.make_path("tos")
75
loader = genshi.template.TemplateLoader(".", auto_reload=True)
76
tmpl = loader.load(util.make_local_path("apps/help/template.html"))
77
req.write(tmpl.generate(ctx).render('html')) #'xhtml', doctype='xhtml'))
76
79
def show_help_app(req, app):
77
80
"""Show help for an application."""