translator_directory.layout

Classes

DefaultLayout

The default layout meant for the public facing parts of the site.

TranslatorLayout

The default layout meant for the public facing parts of the site.

EditTranslatorLayout

The default layout meant for the public facing parts of the site.

ReportTranslatorChangesLayout

The default layout meant for the public facing parts of the site.

ApplyTranslatorChangesLayout

The default layout meant for the public facing parts of the site.

MailTemplatesLayout

The default layout meant for the public facing parts of the site.

TranslatorCollectionLayout

The default layout meant for the public facing parts of the site.

AddTranslatorLayout

The default layout meant for the public facing parts of the site.

TranslatorDocumentsLayout

The default layout meant for the public facing parts of the site.

LanguageCollectionLayout

The default layout meant for the public facing parts of the site.

LanguageLayout

The default layout meant for the public facing parts of the site.

EditLanguageLayout

The default layout meant for the public facing parts of the site.

AddLanguageLayout

The default layout meant for the public facing parts of the site.

AccreditationLayout

The default layout meant for the public facing parts of the site.

RequestAccreditationLayout

The default layout meant for the public facing parts of the site.

GrantAccreditationLayout

The default layout meant for the public facing parts of the site.

RefuseAccreditationLayout

The default layout meant for the public facing parts of the site.

Module Contents

class translator_directory.layout.DefaultLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: onegov.org.layout.DefaultLayout

The default layout meant for the public facing parts of the site.

request: onegov.translator_directory.request.TranslatorAppRequest[source]
static linkify(text: str | None) str[source]
static format_languages(languages: Iterable[Language] | None) str[source]
format_gender(gender: onegov.translator_directory.models.translator.Gender) str[source]
static format_drive_distance(number: float | None) str[source]
format_boolean(val: bool | None) str[source]
format_admission(val: onegov.translator_directory.models.translator.AdmissionState) str[source]
show(attribute_name: str) bool[source]

Some attributes on the translator are hidden for less privileged users

color_class(count: int) str | None[source]

Depending how rare a language is offered by translators, apply a color code using the returned css class

format_prof_guild(key: str) str[source]
format_interpreting_type(key: str) str[source]
class translator_directory.layout.TranslatorLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

file_collection() onegov.translator_directory.collections.documents.TranslatorDocumentCollection[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.EditTranslatorLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: TranslatorLayout

The default layout meant for the public facing parts of the site.

title() str[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.ReportTranslatorChangesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: TranslatorLayout

The default layout meant for the public facing parts of the site.

title() str[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.ApplyTranslatorChangesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: TranslatorLayout

The default layout meant for the public facing parts of the site.

title() str[source]

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.MailTemplatesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: TranslatorLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.TranslatorCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

title() str[source]
breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class translator_directory.layout.AddTranslatorLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: TranslatorCollectionLayout

The default layout meant for the public facing parts of the site.

title() str[source]
breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class translator_directory.layout.TranslatorDocumentsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

breadcrumbs() list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

upload_url() str[source]
class translator_directory.layout.LanguageCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class translator_directory.layout.LanguageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.EditLanguageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: LanguageLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class translator_directory.layout.AddLanguageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: LanguageLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

A of onegov.org.elements.LinkGroup classes. Each of them will be shown in the top editbar, with the group title being the dropdown title.

class translator_directory.layout.AccreditationLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.RequestAccreditationLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.GrantAccreditationLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class translator_directory.layout.RefuseAccreditationLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

The default layout meant for the public facing parts of the site.

property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.