--- a/schooltool/help/browser.py 2009-05-03 19:46:22.000000000 -0700 +++ b/schooltool/help/browser.py 2009-05-05 19:19:35.000000000 -0700 @@ -34,6 +34,8 @@ from zope.app.onlinehelp.browser.tree import OnlineHelpTopicTreeView from zope.component import getMultiAdapter from zope.traversing.api import getName, getParent +from zope.i18n import translate +from zope.app import zapi def sortById(x,y): return cmp(x.id, y.id) @@ -90,6 +92,18 @@ return '\n'.join(res) + def renderLink(self, topic): + """Render a href element.""" + title = translate(topic.title, context=self.request, + default=topic.title) + if topic.parentPath: + url = zapi.joinPath(topic.parentPath, topic.id) + else: + url = topic.id + return '%s\n' % ( + self.request.getApplicationURL(), url, title) + class ContextHelpView(BrowserView): def __init__(self, context, request):