org.layout

Attributes

_T

capitalised_name

Classes

Layout

Contains methods to render a page inheriting from layout.pt.

DefaultLayoutMixin

DefaultLayout

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

DefaultMailLayoutMixin

DefaultMailLayout

A special layout for creating HTML E-Mails.

AdjacencyListMixin

Provides layouts for models inheriting from

AdjacencyListLayout

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

SettingsLayout

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

PageLayout

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

NewsLayout

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

EditorLayout

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

FormEditorLayout

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

FormSubmissionLayout

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

FormCollectionLayout

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

SurveySubmissionWindowLayout

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

SurveySubmissionLayout

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

SurveyCollectionLayout

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

PersonCollectionLayout

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

PersonLayout

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

TicketsLayout

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

ArchivedTicketsLayout

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

TicketLayout

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

TicketNoteLayout

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

TicketChatMessageLayout

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

TextModulesLayout

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

TextModuleLayout

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

ResourcesLayout

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

FindYourSpotLayout

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

ResourceRecipientsLayout

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

ResourceRecipientsFormLayout

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

ResourceLayout

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

ReservationLayout

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

AllocationRulesLayout

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

AllocationEditFormLayout

Same as the resource layout, but with different editbar links, because

EventLayoutMixin

OccurrencesLayout

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

OccurrenceLayout

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

EventLayout

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

NewsletterLayout

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

RecipientLayout

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

ImageSetCollectionLayout

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

ImageSetLayout

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

UserManagementLayout

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

UserLayout

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

UserGroupCollectionLayout

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

UserGroupLayout

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

ExportCollectionLayout

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

PaymentProviderLayout

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

PaymentCollectionLayout

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

MessageCollectionLayout

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

DirectoryCollectionLayout

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

DirectoryEntryMixin

DirectoryEntryCollectionLayout

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

DirectoryEntryLayout

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

PublicationLayout

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

DashboardLayout

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

GeneralFileCollectionLayout

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

ImageFileCollectionLayout

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

ExternalLinkLayout

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

HomepageLayout

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

Module Contents

org.layout._T[source]
org.layout.capitalised_name[source]
class org.layout.Layout(model: Any, request: onegov.core.request.CoreRequest)[source]

Bases: onegov.core.layout.ChameleonLayout, onegov.org.open_graph.OpenGraphMixin

Contains methods to render a page inheriting from layout.pt.

All pages inheriting from layout.pt rely on this class being present as ‘layout’ variable:

@OrgApp.html(model=Example, template='example.pt', permission=Public)
   def view_example(self, request):
       return { 'layout': DefaultLayout(self, request) }

It is meant to be extended for different parts of the site. For example, the DefaultLayout includes the top navigation defined by onegov.page.

It’s possible though to have a different part of the website use a completely different top navigation. For that, a new Layout class inheriting from this one should be added.

app: onegov.org.app.OrgApp[source]

Returns the application behind the request.

request: onegov.org.request.OrgRequest[source]
date_long_without_year_format = 'E d. MMMM'[source]
datetime_long_without_year_format = 'E d. MMMM HH:mm'[source]
datetime_short_format = 'E d.MM.Y HH:mm'[source]
event_format = 'EEEE, d. MMMM YYYY'[source]
event_short_format = 'EE d. MMMM YYYY'[source]
isodate_format = 'y-M-d'[source]
has_model_permission(permission: type[onegov.core.security.permissions.Intent] | None) bool[source]
property name: str[source]

Takes the class name of the layout and generates a name which can be used as a class.

property org: onegov.org.models.Organisation[source]

An alias for self.request.app.org.

property primary_color: str[source]
property favicon_apple_touch_url: str | None[source]
property favicon_pinned_tab_safari_url: str | None[source]
property favicon_win_url: str | None[source]
property favicon_mac_url: str | None[source]
property default_map_view: dict[str, Any][source]
property svg: chameleon.PageTemplateFile[source]
property font_awesome_path: str[source]
property sentry_init_path: str[source]
static_file_path(path: str) str[source]
with_hashtags(text: str | None) markupsafe.Markup | None[source]
property page_id: str[source]

Returns the unique page id of the rendered page. Used to have a useful id in the body element for CSS/JS.

property body_classes: Iterator[str][source]

Yields a list of body classes used on the body.

property top_navigation: Sequence[Link] | None[source]

Returns a list of onegov.org.elements.Link objects. Those links are used for the top navigation.

If nothing is returned, no top navigation is displayed.

property breadcrumbs: Sequence[Link] | None[source]

Returns a list of onegov.org.elements.Link objects. Those links are used for the breadcrumbs.

If nothing is returned, no top breadcrumbs are displayed.

A list of links shown in the sidebar, used for navigation.

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.

property locales: list[tuple[str, str]][source]
property file_upload_url: str[source]

Returns the url to the file upload action.

property file_upload_json_url: str[source]

Adds the json url for file uploads.

property file_list_url: str[source]

Adds the json url for file lists.

property image_upload_url: str[source]

Returns the url to the image upload action.

property image_upload_json_url: str[source]

Adds the json url for image uploads.

property image_list_url: str[source]

Adds the json url for image lists.

property sitecollection_url: str[source]

Adds the json url for internal links lists.

property homepage_url: str[source]

Returns the url to the main page.

property search_url: str[source]

Returns the url to the search page.

property suggestions_url: str[source]

Returns the url to the suggestions json view.

property events_url: str[source]
property directories_url: str[source]
property news_url: str[source]
property newsletter_url: str[source]
login_to_url(to: str | None, skip: bool = False) str[source]
login_from_path() str[source]
export_formatter(format: str) Callable[[object], Any][source]

Returns a formatter function which takes a value and returns the value ready for export.

thumbnail_url(url: str | None) str | None[source]

Takes the given url and returns the thumbnail url for it.

Uses some rough heuristic to determine if a url is actually served by onegov.file or not. May possibly fail.

include_editor() None[source]
include_code_editor() None[source]
file_data_file(file_data: dict[str, Any] | None) onegov.file.File | None[source]
field_file(field: wtforms.Field) list[onegov.file.File | None] | onegov.file.File | None[source]
property move_person_url_template: str[source]
get_user_color(username: str) str[source]
get_user_title(username: str) str[source]
to_timezone(date: datetime.datetime, timezone: sedate.types.TzInfoOrName) datetime.datetime[source]
format_time_range(start: datetime.datetime | datetime.time, end: datetime.datetime | datetime.time) str[source]
format_date_range(start: datetime.date | datetime.datetime, end: datetime.date | datetime.datetime) str[source]
format_datetime_range(start: datetime.datetime, end: datetime.datetime, with_year: bool = False) str[source]
format_timedelta(delta: datetime.timedelta) str[source]
format_seconds(seconds: float) str[source]
password_reset_url(user: User | None) str | None[source]
linkify(text: str) markupsafe.Markup[source]
linkify(text: None) None
linkify_field(field: wtforms.Field, rendered: markupsafe.Markup) markupsafe.Markup[source]

Use with tal:attributes=’target layout.file_link_target’

file_extension_fa_icon_mapping[source]
get_fa_file_icon(filename: str) str[source]

Returns the font awesome file icon name for the given file according its extension.

NOTE: Currently, org and town6 are using different font awesome versions, hence this only works for town6.

class org.layout.DefaultLayoutMixin[source]
model: Any[source]
hide_from_robots() None[source]

Returns a X-Robots-Tag:noindex header on secret pages.

This is probably not where you would expect this to happen, but it ensures that this works on all pages without having to jump through hoops.

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

Bases: Layout, DefaultLayoutMixin

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

request: onegov.org.request.OrgRequest[source]
edit_mode: bool[source]
show_label(field: wtforms.Field) bool[source]
property breadcrumbs: Sequence[Link] | None[source]

Returns the breadcrumbs for the current page.

exclude_invisible(items: Iterable[_T]) Sequence[_T][source]
property root_pages: tuple[onegov.org.request.PageMeta, Ellipsis][source]
property top_navigation: Sequence[Link] | None[source]

Returns a list of onegov.org.elements.Link objects. Those links are used for the top navigation.

If nothing is returned, no top navigation is displayed.

property qr_endpoint: str[source]
class org.layout.DefaultMailLayoutMixin[source]
request: onegov.org.request.OrgRequest[source]
paragraphify(text: str) markupsafe.Markup[source]
class org.layout.DefaultMailLayout(model: Any, request: onegov.core.request.CoreRequest)[source]

Bases: Layout, DefaultMailLayoutMixin

A special layout for creating HTML E-Mails.

property base: chameleon.PageTemplateFile[source]

Returns the layout, which defines the base layout of all pages.

See templates/layout.pt.

property macros: onegov.core.templates.MacrosLookup[source]

Returns the macros, which offer often used html constructs. See templates/macros.pt.

property contact_html: markupsafe.Markup[source]

Returns the contacts html, but instead of breaking it into multiple lines (like on the site footer), this version puts it all on one line.

class org.layout.AdjacencyListMixin[source]

Provides layouts for models inheriting from onegov.core.orm.abstract.AdjacencyList

model: onegov.core.orm.abstract.AdjacencyList[source]
property sortable_url_template: str[source]
get_breadcrumbs(item: onegov.core.orm.abstract.AdjacencyList) Iterator[Link][source]

Yields the breadcrumbs for the given adjacency list item.

get_sidebar(type: str | None = None) Iterator[Link | LinkGroup][source]

Yields the sidebar for the given adjacency list item.

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

Bases: DefaultLayout, AdjacencyListMixin

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

request: onegov.org.request.OrgRequest[source]
class org.layout.SettingsLayout(model: Any, request: onegov.org.request.OrgRequest, setting: str | None = None)[source]

Bases: DefaultLayout

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

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

Returns the breadcrumbs for the current page.

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

Bases: AdjacencyListLayout

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

property og_image_source: str | None[source]
property breadcrumbs: Sequence[Link][source]

Returns the breadcrumbs for the current page.

A list of links shown in the sidebar, used for navigation.

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

Bases: AdjacencyListLayout

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

property og_image_source: str | None[source]
property breadcrumbs: Sequence[Link][source]

Returns the breadcrumbs for the current page.

class org.layout.EditorLayout(model: onegov.org.models.Editor, request: onegov.org.request.OrgRequest, site_title: str | None)[source]

Bases: AdjacencyListLayout

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

site_title[source]
edit_mode = True[source]
property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

class org.layout.FormEditorLayout(model: FormDefinition | FormCollection | SurveyCollection | SurveyDefinition, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

model: FormDefinition | FormCollection | SurveyCollection | SurveyDefinition[source]
class org.layout.FormSubmissionLayout(model: FormSubmission | FormDefinition, request: onegov.org.request.OrgRequest, title: str | None = None)[source]

Bases: DefaultLayout

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

model: FormSubmission | FormDefinition[source]
title[source]
property form: onegov.form.FormDefinition[source]
property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

property can_delete_form: bool[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.

class org.layout.FormCollectionLayout(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.

property external_forms: onegov.org.models.external_link.ExternalLinkCollection[source]
property form_definitions: onegov.form.FormCollection[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.

class org.layout.SurveySubmissionWindowLayout(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 org.layout.SurveySubmissionLayout(model: SurveySubmission | SurveyDefinition, request: onegov.org.request.OrgRequest, title: str | None = None)[source]

Bases: DefaultLayout

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

model: SurveySubmission | SurveyDefinition[source]
title[source]
property form: onegov.form.models.definition.SurveyDefinition[source]
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 org.layout.SurveyCollectionLayout(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 survey_definitions: onegov.form.collection.SurveyCollection[source]
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 org.layout.PersonCollectionLayout(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 org.layout.PersonLayout(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 collection: onegov.people.PersonCollection[source]
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 org.layout.TicketsLayout(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 org.layout.ArchivedTicketsLayout(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 org.layout.TicketLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

model: onegov.ticket.Ticket[source]
property collection: onegov.ticket.TicketCollection[source]
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.

property has_submission_files: bool[source]
class org.layout.TicketNoteLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, title: str, ticket: None = None)[source]
class org.layout.TicketNoteLayout(model: Any, request: onegov.org.request.OrgRequest, title: str, ticket: onegov.ticket.Ticket)

Bases: DefaultLayout

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

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

Returns the breadcrumbs for the current page.

class org.layout.TicketChatMessageLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, internal: bool = False)[source]

Bases: DefaultLayout

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

model: onegov.ticket.Ticket[source]
internal = False[source]
property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

property internal_breadcrumbs: list[onegov.core.elements.Link][source]
property public_breadcrumbs: list[onegov.core.elements.Link][source]
class org.layout.TextModulesLayout(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 org.layout.TextModuleLayout(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 collection: onegov.chat.TextModuleCollection[source]
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 org.layout.ResourcesLayout(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.

property external_resources: onegov.org.models.external_link.ExternalLinkCollection[source]
property resources_url: 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.

class org.layout.FindYourSpotLayout(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 org.layout.ResourceRecipientsLayout(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 org.layout.ResourceRecipientsFormLayout(model: Any, request: onegov.org.request.OrgRequest, title: str)[source]

Bases: DefaultLayout

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

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

Returns the breadcrumbs for the current page.

class org.layout.ResourceLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

model: onegov.reservation.Resource[source]
property collection: onegov.reservation.ResourceCollection[source]
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 org.layout.ReservationLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest)[source]

Bases: ResourceLayout

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

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 org.layout.AllocationRulesLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest)[source]

Bases: ResourceLayout

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 org.layout.AllocationEditFormLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout

Same as the resource layout, but with different editbar links, because there’s not really an allocation view, but there are allocation forms.

property collection: onegov.reservation.ResourceCollection[source]
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 org.layout.EventLayoutMixin[source]
request: onegov.org.request.OrgRequest[source]
format_recurrence(recurrence: str | None) str[source]

Returns a human readable version of an RRULE used by us.

event_deletable(event: onegov.event.Event) bool[source]
class org.layout.OccurrencesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False)[source]

Bases: DefaultLayout, EventLayoutMixin

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

app: onegov.org.app.OrgApp[source]

Returns the application behind the request.

request: onegov.org.request.OrgRequest[source]
property og_description: str[source]
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 org.layout.OccurrenceLayout(model: onegov.event.Occurrence, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout, EventLayoutMixin

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

app: onegov.org.app.OrgApp[source]

Returns the application behind the request.

request: onegov.org.request.OrgRequest[source]
model: onegov.event.Occurrence[source]
property collection: onegov.event.OccurrenceCollection[source]
property og_description: str | None[source]
property og_image: onegov.file.File | None[source]

File object to use for the site image.

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 org.layout.EventLayout(model: onegov.event.Event, request: onegov.org.request.OrgRequest)[source]

Bases: EventLayoutMixin, DefaultLayout

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

app: onegov.org.app.OrgApp[source]

Returns the application behind the request.

request: onegov.org.request.OrgRequest[source]
model: onegov.event.Event[source]
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 org.layout.NewsletterLayout(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 collection: onegov.newsletter.NewsletterCollection[source]
property recipients: onegov.newsletter.RecipientCollection[source]
property is_collection: bool[source]
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 org.layout.RecipientLayout(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 org.layout.ImageSetCollectionLayout(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 org.layout.ImageSetLayout(model: onegov.org.models.ImageSet, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

model: onegov.org.models.ImageSet[source]
property collection: onegov.org.models.ImageSetCollection[source]
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 org.layout.UserManagementLayout(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 org.layout.UserLayout(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.

model: onegov.user.User[source]
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 org.layout.UserGroupCollectionLayout(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 org.layout.UserGroupLayout(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.

model: onegov.user.UserGroup[source]
property collection: onegov.user.UserGroupCollection[onegov.user.UserGroup][source]
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 org.layout.ExportCollectionLayout(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 org.layout.PaymentProviderLayout(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 org.layout.PaymentCollectionLayout(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 org.layout.MessageCollectionLayout(model: Any, request: onegov.org.request.OrgRequest)[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 org.layout.DirectoryCollectionLayout(model: DirectoryCollection[Any] | DirectoryEntryCollection[Any], request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

model: DirectoryCollection[Any] | DirectoryEntryCollection[Any][source]
property og_description: str[source]
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 org.layout.DirectoryEntryMixin[source]
request: onegov.org.request.OrgRequest[source]
model: ExtendedDirectoryEntry | ExtendedDirectoryEntryCollection[source]
custom_body_attributes: dict[str, Any][source]
init_markers() None[source]
property directory: onegov.org.models.ExtendedDirectory[source]
property thumbnail_field_id: str | None[source]
thumbnail_file_id(entry: onegov.org.models.ExtendedDirectoryEntry) str | None[source]
thumbnail_file(entry: onegov.org.models.ExtendedDirectoryEntry) onegov.file.File | None[source]
class org.layout.DirectoryEntryCollectionLayout(model: onegov.org.models.directory.ExtendedDirectoryEntryCollection, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout, DirectoryEntryMixin

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

request: onegov.org.request.OrgRequest[source]
model: onegov.org.models.directory.ExtendedDirectoryEntryCollection[source]
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.

property publication_filters: dict[str, str][source]
property publication_filter_title: str[source]
class org.layout.DirectoryEntryLayout(model: onegov.org.models.ExtendedDirectoryEntry, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout, DirectoryEntryMixin

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

request: onegov.org.request.OrgRequest[source]
model: onegov.org.models.ExtendedDirectoryEntry[source]
show_label(field: wtforms.Field) bool[source]
property og_image: onegov.file.File | None[source]

File object to use for the site image.

property og_description: str | None[source]
property thumbnail_field_ids: list[str][source]
property breadcrumbs: list[onegov.core.elements.Link][source]

Returns the breadcrumbs for the current page.

linkify(text: str) markupsafe.Markup[source]
linkify(text: None) None

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 org.layout.PublicationLayout(model: Any, request: onegov.org.request.OrgRequest)[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 org.layout.DashboardLayout(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 org.layout.GeneralFileCollectionLayout(model: Any, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

class org.layout.ImageFileCollectionLayout(model: Any, request: onegov.org.request.OrgRequest)[source]

Bases: DefaultLayout

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

class org.layout.ExternalLinkLayout(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.

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 org.layout.HomepageLayout(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.

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.

property sortable_url_template: str[source]