2 from turbogears import url
3 from turbogears.controllers import Controller
4 from turbogears import identity
7 def __init__(self, base):
9 self.items = filter(lambda i: isinstance(getattr(base, i), Controller), base.__dict__)
13 return c.require.eval_with_object(identity.current)
16 option = u"""<option value="%s">%s</option>" """
20 <select OnChange="window.location=this.options[this.selectedIndex].value;">
25 s = option % ('', '-----')
27 if self._check(getattr(self.base, i)):
28 s += option % (url('/' + i), i.capitalize().replace('_', ' '))