from onegov.agency import _
from onegov.agency.collections import ExtendedAgencyCollection
from onegov.agency.collections import ExtendedPersonCollection
from onegov.core.elements import Link
from onegov.org.custom import get_global_tools as get_global_tools_base
from onegov.org.layout import DefaultLayout
from onegov.org.models import Organisation
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterator
from onegov.agency.request import AgencyRequest
from onegov.core.elements import LinkGroup
[docs]
def get_top_navigation(request: 'AgencyRequest') -> 'Iterator[Link]':
yield Link(
text=_('People'),
url=request.class_link(ExtendedPersonCollection)
)
yield Link(
text=_('Agencies'),
url=request.class_link(ExtendedAgencyCollection)
)
yield from DefaultLayout(request.app.org, request).top_navigation or ()