$def with (user, parent_ou, ou, form)
$var title = _("Navigator") if ou is None else ou.name
$var tab: navigator
$code:
    hierarchy = []
    if ou:
        hierarchy = [storage(link='/navigator/ou/%s' % ou.name, caption=ou.name)]
        parent = parent_ou
        if not ou in user.organizative_units:
            while parent:
                hierarchy.append(storage(link='/navigator/ou/%s' % parent.name, caption=parent.name))
                # Do not show more hirarchy elements than needed
                if parent in user.organizative_units:
                    break
                parent = parent.parent
    hierarchy.append(storage(link='/navigator', caption=_("Root")))
    hierarchy.reverse()

$var hierarchy = hierarchy

$var hierarchy = hierarchy
$var css = ["admin.css", "navigator.css"]

<form action="" method="post">
    <fieldset>
        <legend>$parent_ou - $(ou.name if ou else '')</legend>
        $:form.render()
    </fieldset>
    <input type="submit"/>
</form>
