org.layout
Attributes
Classes
Contains methods to render a page inheriting from layout.pt. |
|
The default layout meant for the public facing parts of the site. |
|
A special layout for creating HTML E-Mails. |
|
Provides layouts for models inheriting from |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
Same as the resource layout, but with different editbar links, because |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
|
The default layout meant for the public facing parts of the site. |
Module Contents
- 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.
- 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 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.
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.
- property sidebar_links: Sequence[Link | LinkGroup] | None[source]
A list of links shown in the sidebar, used for navigation.
- property editbar_links: Sequence[BaseLink | LinkGroup] | None[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.
- 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.
- 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]
- 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.
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.
- 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
.
- class org.layout.AdjacencyListMixin[source]
Provides layouts for models inheriting from
onegov.core.orm.abstract.AdjacencyList
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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]
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- property breadcrumbs: list[onegov.core.elements.Link][source]
Returns the breadcrumbs for the current page.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- class org.layout.EventLayoutMixin[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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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]
- 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.
- property breadcrumbs: list[onegov.core.elements.Link][source]
Returns the breadcrumbs for the current page.
- property editbar_links: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup][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.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.
- 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.
- 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.
- 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.
- 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.