browser.breadcrumbs - Breadcrumbs

Components to get breadcrumbs for any object.

class waeup.kofa.browser.breadcrumbs.AdministrationBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for administration areas of University instances.

__doc__ = 'A breadcrumb for administration areas of University instances.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
title = u'Administration'
viewname = 'administration'
class waeup.kofa.browser.breadcrumbs.Breadcrumb(context)[source]

Bases: grokcore.component.components.Adapter

A most general breadcrumb generator.

__doc__ = 'A most general breadcrumb generator.\n '
__implemented__ = <implementedBy waeup.kofa.browser.breadcrumbs.Breadcrumb>
__init__(context)[source]

Turn a context into a breadcrumb.

__module__ = 'waeup.kofa.browser.breadcrumbs'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
_parent = 0
_request = None
_title = None
parent

Get the contexts parent object and viewname or None.

parent_viewname = 'index'
target
title

Get a title for a context.

viewname = 'index'
class waeup.kofa.browser.breadcrumbs.BreadcrumbContainer(context)[source]

Bases: grokcore.component.components.Adapter

An adapter to adapt grok views to list of breadcrumbs.

__doc__ = 'An adapter to adapt grok views to list of breadcrumbs.\n '
__init__(context)[source]
__iter__()[source]

Allow iteration.

__module__ = 'waeup.kofa.browser.breadcrumbs'
_breadcrumbs = None
getList()[source]

Get the (ordered) list of breadcrumbs liked to the context view.

class waeup.kofa.browser.breadcrumbs.CertificateBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.FacultyBreadcrumb

A breadcrumb for certificates.

__doc__ = 'A breadcrumb for certificates.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
class waeup.kofa.browser.breadcrumbs.CertificateCourseBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

We don’t want course container breadcrumbs.

__doc__ = " We don't want course container breadcrumbs.\n "
__module__ = 'waeup.kofa.browser.breadcrumbs'
title
class waeup.kofa.browser.breadcrumbs.CertificatesContainerBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

We don’t want course container breadcrumbs.

__doc__ = " We don't want course container breadcrumbs.\n "
__implemented__ = <implementedBy waeup.kofa.browser.breadcrumbs.CertificatesContainerBreadcrumb>
__module__ = 'waeup.kofa.browser.breadcrumbs'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
class waeup.kofa.browser.breadcrumbs.ConfigurationContainerBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for the configuration container.

__doc__ = 'A breadcrumb for the configuration container.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
parent_viewname = 'administration'
title = u'Portal Configuration'
class waeup.kofa.browser.breadcrumbs.CourseBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.FacultyBreadcrumb

A breadcrumb for courses.

__doc__ = 'A breadcrumb for courses.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
class waeup.kofa.browser.breadcrumbs.CoursesContainerBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

We don’t want course container breadcrumbs.

__doc__ = " We don't want course container breadcrumbs.\n "
__implemented__ = <implementedBy waeup.kofa.browser.breadcrumbs.CoursesContainerBreadcrumb>
__module__ = 'waeup.kofa.browser.breadcrumbs'
__provides__

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.

For example:

>>> from zope.interface import Interface
>>> class IFooFactory(Interface):
...     pass
>>> class IFoo(Interface):
...     pass
>>> class C(object):
...     implements(IFoo)
...     classProvides(IFooFactory)
>>> [i.getName() for i in C.__provides__]
['IFooFactory']
>>> [i.getName() for i in C().__provides__]
['IFoo']
class waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for data centers.

__doc__ = 'A breadcrumb for data centers.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
parent_viewname = 'administration'
title = u'Data Center'
class waeup.kofa.browser.breadcrumbs.DepartmentBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.FacultyBreadcrumb

A breadcrumb for departments.

__doc__ = 'A breadcrumb for departments.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
class waeup.kofa.browser.breadcrumbs.ExportsBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for exports.

__doc__ = 'A breadcrumb for exports.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
target = None
title = u'Student Data Exports'
class waeup.kofa.browser.breadcrumbs.FacultiesContainerBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for faculty containers.

__doc__ = 'A breadcrumb for faculty containers.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
title = u'Academics'
class waeup.kofa.browser.breadcrumbs.FacultyBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for faculties.

__doc__ = 'A breadcrumb for faculties.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
title
class waeup.kofa.browser.breadcrumbs.PortalSettingsBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for the manage view of universities.

Here we need a special parent() implementation, because the parent object is not a real parent (the University object has no valid parent in terms of breadcrumbs). Instead it is the administration view of the same context the manage page itself is bound to.

__doc__ = 'A breadcrumb for the manage view of universities.\n\n Here we need a special `parent()` implementation, because the\n parent object is not a real parent (the University object has no\n valid parent in terms of breadcrumbs). Instead it is the\n ``administration`` view of the same context the ``manage`` page\n itself is bound to.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
parent

Return the ‘administration’ view of our context as parent.

title = u'Portal Settings'
class waeup.kofa.browser.breadcrumbs.ReportsBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for reports.

__doc__ = 'A breadcrumb for reports.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
parent_viewname = 'administration'
target = None
title = u'Reports'
class waeup.kofa.browser.breadcrumbs.SessionConfigurationBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for the configuration container.

__doc__ = 'A breadcrumb for the configuration container.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
title
class waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for university index pages.

__doc__ = 'A breadcrumb for university index pages.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
parent = None
title = u'Home'
class waeup.kofa.browser.breadcrumbs.UsersContainerBreadcrumb(context)[source]

Bases: waeup.kofa.browser.breadcrumbs.Breadcrumb

A breadcrumb for user containers.

__doc__ = 'A breadcrumb for user containers.\n '
__module__ = 'waeup.kofa.browser.breadcrumbs'
parent_viewname = 'administration'
title = u'Officers'
waeup.kofa.browser.breadcrumbs.getBreadcrumb(obj, viewname=None)[source]

Get a breadcrumb for an object and a viewname.

If there is no breadcrumb defined for such a combination, a breadcrumb for the index view will be looked up.

waeup.kofa.browser.breadcrumbs.getBreadcrumbList(obj, viewname)[source]

Get an ordered list of breadcrumbs for an object and a viewname.

Ignorables are excluded from the result.

waeup.kofa.browser.breadcrumbs.getBreadcrumbListForView(view)[source]

Get an ordered list of breadcrumbs a certain view.

Ignorables are excluded from the result.