Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions news/+use_ajax.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IClassicUISchema: Add new control panel.

Add new ``IClassicUISchema`` control panel schema with its ``plone.use_ajax_main_template`` setting.

When ``plone.use_ajax_main_template`` is enabled, and if we are in an XHR
request, Plone uses the AJAX main template. Note: This setting does not affect
the ``ajax_load`` query string parameter, which if set and evaluates to
``true``, will always trigger the AJAX main template.
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
version = 3.1.2.dev0
version = 4.0.0.dev0
name = plone.base
description = Plone Interface contracts, plus basic features and utilities
long_description = file: README.rst, CHANGES.rst
Expand All @@ -13,7 +13,7 @@ license = GPLv2
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Framework :: Plone :: 6.1
Framework :: Plone :: 6.2
Framework :: Plone :: Core
Framework :: Zope :: 5
License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Expand All @@ -22,6 +22,7 @@ classifiers =
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13

[options]
include_package_data = True
Expand Down
1 change: 1 addition & 0 deletions src/plone/base/interfaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .constrains import ISelectableConstrainTypes
from .content import INameFromTitle
from .controlpanel import IActionSchema
from .controlpanel import IClassicUISchema
from .controlpanel import IControlPanel
from .controlpanel import IDateAndTimeSchema
from .controlpanel import IEditingSchema
Expand Down
15 changes: 15 additions & 0 deletions src/plone/base/interfaces/controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,21 @@ def validate_category_id(data):
)


class IClassicUISchema(Interface):
use_ajax_main_template = schema.Bool(
title=_("label_use_ajax_main_template", default="Use AJAX template on XHR"),
description=_(
"help_use_ajax_main_template",
default="When enabled and if we are in an XHR request Plone uses "
"the AJAX main template. Note: This setting does not affect the "
"ajax_load query string parameter, which if set and evaluates "
"to true, will always trigger the AJAX main template.",
),
default=False,
required=False,
)


class IPloneControlPanelView(Interface):
"""A marker interface for views showing a controlpanel."""

Expand Down