org.layout ========== .. py:module:: org.layout Attributes ---------- .. autoapisummary:: org.layout._T org.layout.capitalised_name Classes ------- .. autoapisummary:: org.layout.Layout org.layout.DefaultLayoutMixin org.layout.DefaultLayout org.layout.DefaultMailLayoutMixin org.layout.DefaultMailLayout org.layout.AdjacencyListMixin org.layout.AdjacencyListLayout org.layout.SettingsLayout org.layout.PageLayout org.layout.NewsLayout org.layout.EditorLayout org.layout.FormEditorLayout org.layout.FormSubmissionLayout org.layout.FormCollectionLayout org.layout.SurveySubmissionWindowLayout org.layout.SurveySubmissionLayout org.layout.SurveyCollectionLayout org.layout.FormDocumentLayout org.layout.PersonCollectionLayout org.layout.PersonLayout org.layout.TicketsLayout org.layout.ArchivedTicketsLayout org.layout.TicketLayout org.layout.TicketNoteLayout org.layout.TicketChatMessageLayout org.layout.TextModulesLayout org.layout.TextModuleLayout org.layout.ResourcesLayout org.layout.FindYourSpotLayout org.layout.ResourceRecipientsLayout org.layout.ResourceRecipientsFormLayout org.layout.ResourceLayout org.layout.ReservationLayout org.layout.AllocationRulesLayout org.layout.AllocationEditFormLayout org.layout.EventLayoutMixin org.layout.OccurrencesLayout org.layout.OccurrenceLayout org.layout.EventLayout org.layout.NewsletterLayout org.layout.RecipientLayout org.layout.ImageSetCollectionLayout org.layout.ImageSetLayout org.layout.UserManagementLayout org.layout.UserLayout org.layout.UserGroupCollectionLayout org.layout.UserGroupLayout org.layout.ExportCollectionLayout org.layout.PaymentProviderLayout org.layout.PaymentCollectionLayout org.layout.MessageCollectionLayout org.layout.DirectoryCollectionLayout org.layout.DirectoryEntryMixin org.layout.DirectoryEntryCollectionLayout org.layout.DirectoryEntryLayout org.layout.PublicationLayout org.layout.DashboardLayout org.layout.GeneralFileCollectionLayout org.layout.ImageFileCollectionLayout org.layout.ExternalLinkLayout org.layout.HomepageLayout Module Contents --------------- .. py:data:: _T .. py:data:: capitalised_name .. py:class:: Layout(model: Any, request: onegov.core.request.CoreRequest) Bases: :py:obj:`onegov.core.layout.ChameleonLayout`, :py:obj:`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 :class:`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. .. py:attribute:: app :type: onegov.org.app.OrgApp Returns the application behind the request. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: date_long_without_year_format :value: 'E d. MMMM' .. py:attribute:: datetime_long_without_year_format :value: 'E d. MMMM HH:mm' .. py:attribute:: datetime_short_format :value: 'E d.MM.Y HH:mm' .. py:attribute:: event_format :value: 'EEEE, d. MMMM YYYY' .. py:attribute:: event_short_format :value: 'EE d. MMMM YYYY' .. py:attribute:: isodate_format :value: 'y-M-d' .. py:method:: has_model_permission(permission: type[onegov.core.security.permissions.Intent] | None) -> bool .. py:property:: name :type: str Takes the class name of the layout and generates a name which can be used as a class. .. py:property:: org :type: onegov.org.models.Organisation An alias for self.request.app.org. .. py:property:: primary_color :type: str .. py:property:: favicon_apple_touch_url :type: str | None .. py:property:: favicon_pinned_tab_safari_url :type: str | None .. py:property:: favicon_win_url :type: str | None .. py:property:: favicon_mac_url :type: str | None .. py:property:: default_map_view :type: dict[str, Any] .. py:property:: svg :type: chameleon.PageTemplateFile .. py:property:: font_awesome_path :type: str .. py:property:: sentry_init_path :type: str .. py:method:: static_file_path(path: str) -> str .. py:method:: with_hashtags(text: str | None) -> markupsafe.Markup | None .. py:property:: page_id :type: str Returns the unique page id of the rendered page. Used to have a useful id in the body element for CSS/JS. .. py:property:: body_classes :type: collections.abc.Iterator[str] Yields a list of body classes used on the body. .. py:property:: top_navigation :type: collections.abc.Sequence[onegov.core.elements.Link] | None Returns a list of :class:`onegov.org.elements.Link` objects. Those links are used for the top navigation. If nothing is returned, no top navigation is displayed. .. py:property:: breadcrumbs :type: collections.abc.Sequence[onegov.core.elements.Link] | None Returns a list of :class:`onegov.org.elements.Link` objects. Those links are used for the breadcrumbs. If nothing is returned, no top breadcrumbs are displayed. .. py:property:: sidebar_links :type: collections.abc.Sequence[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A list of links shown in the sidebar, used for navigation. .. py:property:: editbar_links :type: collections.abc.Sequence[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:property:: locales :type: list[tuple[str, str]] .. py:property:: file_upload_url :type: str Returns the url to the file upload action. .. py:property:: file_upload_json_url :type: str Adds the json url for file uploads. .. py:property:: file_list_url :type: str Adds the json url for file lists. .. py:property:: image_upload_url :type: str Returns the url to the image upload action. .. py:property:: image_upload_json_url :type: str Adds the json url for image uploads. .. py:property:: image_list_url :type: str Adds the json url for image lists. .. py:property:: sitecollection_url :type: str Adds the json url for internal links lists. .. py:property:: homepage_url :type: str Returns the url to the main page. .. py:property:: search_url :type: str Returns the url to the search page. .. py:property:: suggestions_url :type: str Returns the url to the suggestions json view. .. py:property:: events_url :type: str .. py:property:: directories_url :type: str .. py:property:: news_url :type: str .. py:property:: newsletter_url :type: str .. py:method:: login_to_url(to: str | None, skip: bool = False) -> str .. py:method:: login_from_path() -> str .. py:method:: export_formatter(format: str) -> collections.abc.Callable[[object], Any] Returns a formatter function which takes a value and returns the value ready for export. .. py:method:: thumbnail_url(url: str | None) -> str | None 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. .. py:property:: custom_links :type: list[tuple[str, str]] .. py:method:: include_editor() -> None .. py:method:: include_code_editor() -> None .. py:method:: file_data_download_link(file_data: dict[str, Any] | None) -> str | None .. py:method:: file_data_file(file_data: dict[str, Any] | None) -> onegov.file.File | None .. py:method:: field_download_link(field: wtforms.Field) -> list[str | None] | str | None .. py:method:: field_file(field: wtforms.Field) -> list[onegov.file.File | None] | onegov.file.File | None .. py:property:: move_person_url_template :type: str .. py:method:: get_user_color(username: str) -> str .. py:method:: get_user_title(username: str) -> str .. py:method:: to_timezone(date: datetime.datetime, timezone: sedate.types.TzInfoOrName) -> datetime.datetime .. py:method:: format_time_range(start: datetime.datetime | datetime.time, end: datetime.datetime | datetime.time) -> str .. py:method:: format_date_range(start: datetime.date | datetime.datetime, end: datetime.date | datetime.datetime) -> str .. py:method:: format_datetime_range(start: datetime.datetime, end: datetime.datetime, with_year: bool = False) -> str .. py:method:: format_timedelta(delta: datetime.timedelta) -> str .. py:method:: format_seconds(seconds: float) -> str .. py:method:: format_vat(amount: numbers.Number | decimal.Decimal | float | None, currency: str = 'CHF') -> str Takes the given amount and currency returning the VAT string if the VAT rate is set in the organization settings. The VAT string can be placed right after a price value. .. py:method:: format_phone_number(phone_number: str) -> str .. py:method:: password_reset_url(user: onegov.user.User | None) -> str | None .. py:method:: linkify(text: str) -> markupsafe.Markup linkify(text: None) -> None .. py:method:: linkify_field(field: wtforms.Field, rendered: markupsafe.Markup) -> markupsafe.Markup .. py:property:: file_link_target :type: str | None Use with tal:attributes='target layout.file_link_target' .. py:attribute:: file_extension_fa_icon_mapping .. py:method:: get_fa_file_icon(filename: str) -> str 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. .. py:class:: DefaultLayoutMixin .. py:attribute:: model :type: Any .. py:method:: hide_from_robots() -> None 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. .. py:class:: DefaultLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`Layout`, :py:obj:`DefaultLayoutMixin` The default layout meant for the public facing parts of the site. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: edit_mode :type: bool .. py:method:: show_label(field: wtforms.Field) -> bool .. py:property:: breadcrumbs :type: collections.abc.Sequence[onegov.core.elements.Link] | None Returns the breadcrumbs for the current page. .. py:method:: exclude_invisible(items: collections.abc.Iterable[_T]) -> collections.abc.Sequence[_T] .. py:property:: root_pages :type: tuple[onegov.org.request.PageMeta, Ellipsis] .. py:property:: top_navigation :type: collections.abc.Sequence[onegov.core.elements.Link] | None Returns a list of :class:`onegov.org.elements.Link` objects. Those links are used for the top navigation. If nothing is returned, no top navigation is displayed. .. py:property:: qr_endpoint :type: str .. py:property:: editmode_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup | onegov.core.elements.Button] .. py:class:: DefaultMailLayoutMixin .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:method:: unsubscribe_link(username: str) -> str .. py:method:: paragraphify(text: str) -> markupsafe.Markup .. py:class:: DefaultMailLayout(model: Any, request: onegov.core.request.CoreRequest) Bases: :py:obj:`Layout`, :py:obj:`DefaultMailLayoutMixin` A special layout for creating HTML E-Mails. .. py:property:: base :type: chameleon.PageTemplateFile Returns the layout, which defines the base layout of all pages. See ``templates/layout.pt``. .. py:property:: macros :type: onegov.core.templates.MacrosLookup Returns the macros, which offer often used html constructs. See ``templates/macros.pt``. .. py:property:: contact_html :type: markupsafe.Markup 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. .. py:class:: AdjacencyListMixin Provides layouts for models inheriting from :class:`onegov.core.orm.abstract.AdjacencyList` .. py:attribute:: model :type: onegov.core.orm.abstract.AdjacencyList .. py:property:: sortable_url_template :type: str .. py:method:: get_breadcrumbs(item: onegov.core.orm.abstract.AdjacencyList) -> collections.abc.Iterator[onegov.core.elements.Link] Yields the breadcrumbs for the given adjacency list item. .. py:method:: get_sidebar(type: str | None = None) -> collections.abc.Iterator[onegov.core.elements.Link | onegov.core.elements.LinkGroup] Yields the sidebar for the given adjacency list item. .. py:class:: AdjacencyListLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout`, :py:obj:`AdjacencyListMixin` The default layout meant for the public facing parts of the site. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:class:: SettingsLayout(model: Any, request: onegov.org.request.OrgRequest, setting: str | None = None) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: setting :value: None .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: PageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`AdjacencyListLayout` The default layout meant for the public facing parts of the site. .. py:property:: og_image_source :type: str | None .. py:property:: breadcrumbs :type: collections.abc.Sequence[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: sidebar_links :type: collections.abc.Sequence[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A list of links shown in the sidebar, used for navigation. .. py:class:: NewsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`AdjacencyListLayout` The default layout meant for the public facing parts of the site. .. py:property:: og_image_source :type: str | None .. py:property:: breadcrumbs :type: collections.abc.Sequence[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: EditorLayout(model: onegov.org.models.Editor, request: onegov.org.request.OrgRequest, site_title: str | None) Bases: :py:obj:`AdjacencyListLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: site_title .. py:attribute:: edit_mode :value: True .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: FormEditorLayout(model: AnyFormDefinitionOrCollection, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: AnyFormDefinitionOrCollection .. py:class:: FormSubmissionLayout(model: onegov.form.FormSubmission | onegov.form.FormDefinition, request: onegov.org.request.OrgRequest, title: str | None = None) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.form.FormSubmission | onegov.form.FormDefinition .. py:attribute:: title .. py:property:: form :type: onegov.form.FormDefinition .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: can_delete_form :type: bool .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: FormCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: external_forms :type: onegov.org.models.external_link.ExternalLinkCollection .. py:property:: form_definitions :type: onegov.form.FormCollection .. py:property:: document_forms :type: onegov.org.models.document_form.FormDocumentCollection .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: SurveySubmissionWindowLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: SurveySubmissionLayout(model: onegov.form.models.definition.SurveySubmission | onegov.form.models.definition.SurveyDefinition, request: onegov.org.request.OrgRequest, title: str | None = None) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.form.models.definition.SurveySubmission | onegov.form.models.definition.SurveyDefinition .. py:attribute:: title .. py:property:: form :type: onegov.form.models.definition.SurveyDefinition .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: SurveyCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: survey_definitions :type: onegov.form.collection.SurveyCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: FormDocumentLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: PersonCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: PersonLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: collection :type: onegov.people.PersonCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: TicketsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: ArchivedTicketsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: TicketLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.ticket.Ticket .. py:property:: collection :type: onegov.ticket.TicketCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:property:: has_submission_files :type: bool .. py:class:: TicketNoteLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, title: str, ticket: None = None) TicketNoteLayout(model: Any, request: onegov.org.request.OrgRequest, title: str, ticket: onegov.ticket.Ticket) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: ticket :type: onegov.ticket.Ticket .. py:attribute:: title .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: TicketChatMessageLayout(model: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, internal: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.ticket.Ticket .. py:attribute:: internal :value: False .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: internal_breadcrumbs :type: list[onegov.core.elements.Link] .. py:property:: public_breadcrumbs :type: list[onegov.core.elements.Link] .. py:class:: TextModulesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: TextModuleLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: collection :type: onegov.chat.TextModuleCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: ResourcesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: external_resources :type: onegov.org.models.external_link.ExternalLinkCollection .. py:property:: resources_url :type: str .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: FindYourSpotLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: ResourceRecipientsLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: ResourceRecipientsFormLayout(model: Any, request: onegov.org.request.OrgRequest, title: str) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: title .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: ResourceLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.reservation.Resource .. py:property:: collection :type: onegov.reservation.ResourceCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: ReservationLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) Bases: :py:obj:`ResourceLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: editbar_links :value: None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: AllocationRulesLayout(model: onegov.reservation.Resource, request: onegov.org.request.OrgRequest) Bases: :py:obj:`ResourceLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: AllocationEditFormLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` Same as the resource layout, but with different editbar links, because there's not really an allocation view, but there are allocation forms. .. py:property:: collection :type: onegov.reservation.ResourceCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: EventLayoutMixin .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:method:: format_recurrence(recurrence: str | None) -> str Returns a human readable version of an RRULE used by us. .. py:method:: event_deletable(event: onegov.event.Event) -> bool .. py:class:: OccurrencesLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout`, :py:obj:`EventLayoutMixin` The default layout meant for the public facing parts of the site. .. py:attribute:: app :type: onegov.org.app.OrgApp Returns the application behind the request. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:property:: og_description :type: str .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: OccurrenceLayout(model: onegov.event.Occurrence, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout`, :py:obj:`EventLayoutMixin` The default layout meant for the public facing parts of the site. .. py:attribute:: app :type: onegov.org.app.OrgApp Returns the application behind the request. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: model :type: onegov.event.Occurrence .. py:property:: collection :type: onegov.event.OccurrenceCollection .. py:property:: og_description :type: str | None .. py:property:: og_image :type: onegov.file.File | None File object to use for the site image. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: EventLayout(model: onegov.event.Event, request: onegov.org.request.OrgRequest) Bases: :py:obj:`EventLayoutMixin`, :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: app :type: onegov.org.app.OrgApp Returns the application behind the request. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: model :type: onegov.event.Event .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: NewsletterLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: collection :type: onegov.newsletter.NewsletterCollection .. py:property:: recipients :type: onegov.newsletter.RecipientCollection .. py:property:: is_collection :type: bool .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: RecipientLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: ImageSetCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: ImageSetLayout(model: onegov.org.models.ImageSet, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.org.models.ImageSet .. py:property:: collection :type: onegov.org.models.ImageSetCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: UserManagementLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: UserLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.user.User .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: UserGroupCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: UserGroupLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.user.UserGroup .. py:property:: collection :type: onegov.user.UserGroupCollection[onegov.user.UserGroup] .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: ExportCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: PaymentProviderLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: PaymentCollectionLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: MessageCollectionLayout(model: Any, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: DirectoryCollectionLayout(model: onegov.directory.DirectoryCollection[Any] | onegov.directory.DirectoryEntryCollection[Any], request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:attribute:: model :type: onegov.directory.DirectoryCollection[Any] | onegov.directory.DirectoryEntryCollection[Any] .. py:property:: og_description :type: str .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: DirectoryEntryMixin .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: model :type: onegov.org.models.ExtendedDirectoryEntry | onegov.org.models.directory.ExtendedDirectoryEntryCollection .. py:attribute:: custom_body_attributes :type: dict[str, Any] .. py:method:: init_markers() -> None .. py:property:: directory :type: onegov.org.models.ExtendedDirectory .. py:property:: thumbnail_field_id :type: str | None .. py:method:: thumbnail_file_id(entry: onegov.org.models.ExtendedDirectoryEntry) -> str | None .. py:method:: thumbnail_link(entry: onegov.org.models.ExtendedDirectoryEntry) -> str | None .. py:method:: thumbnail_file(entry: onegov.org.models.ExtendedDirectoryEntry) -> onegov.file.File | None .. py:class:: DirectoryEntryCollectionLayout(model: onegov.org.models.directory.ExtendedDirectoryEntryCollection, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout`, :py:obj:`DirectoryEntryMixin` The default layout meant for the public facing parts of the site. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: model :type: onegov.org.models.directory.ExtendedDirectoryEntryCollection .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:method:: get_pub_link(text: str, filter: str | None = None, toggle_active: bool = True) -> onegov.core.elements.Link .. py:property:: publication_filters :type: dict[str, str] .. py:property:: publication_filter_title :type: str .. py:property:: publication_links :type: collections.abc.Iterator[onegov.core.elements.Link] .. py:class:: DirectoryEntryLayout(model: onegov.org.models.ExtendedDirectoryEntry, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout`, :py:obj:`DirectoryEntryMixin` The default layout meant for the public facing parts of the site. .. py:attribute:: request :type: onegov.org.request.OrgRequest .. py:attribute:: model :type: onegov.org.models.ExtendedDirectoryEntry .. py:method:: show_label(field: wtforms.Field) -> bool .. py:property:: og_image :type: onegov.file.File | None File object to use for the site image. .. py:property:: og_description :type: str | None .. py:property:: thumbnail_field_ids :type: list[str] .. py:method:: field_download_link(field: wtforms.Field) -> list[str | None] | str | None .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:method:: linkify(text: str) -> markupsafe.Markup linkify(text: None) -> None .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: PublicationLayout(model: Any, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: DashboardLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: breadcrumbs :type: list[onegov.core.elements.Link] Returns the breadcrumbs for the current page. .. py:class:: GeneralFileCollectionLayout(model: Any, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:class:: ImageFileCollectionLayout(model: Any, request: onegov.org.request.OrgRequest) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:class:: ExternalLinkLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:class:: HomepageLayout(model: Any, request: onegov.org.request.OrgRequest, edit_mode: bool = False) Bases: :py:obj:`DefaultLayout` The default layout meant for the public facing parts of the site. .. py:property:: editbar_links :type: list[onegov.core.elements.Link | onegov.core.elements.LinkGroup] | None A of :class:`onegov.org.elements.LinkGroup` classes. Each of them will be shown in the top editbar, with the group title being the dropdown title. .. py:property:: sortable_url_template :type: str