diff --git a/src/iosanita/policy/interfaces.py b/src/iosanita/policy/interfaces.py index b9a0136..a083340 100644 --- a/src/iosanita/policy/interfaces.py +++ b/src/iosanita/policy/interfaces.py @@ -1,7 +1,7 @@ -from zope.publisher.interfaces.browser import IDefaultBrowserLayer from iosanita.policy import _ from plone.restapi.controlpanels.interfaces import IControlpanel from zope.interface import Interface +from zope.publisher.interfaces.browser import IDefaultBrowserLayer from zope.schema import Bool from zope.schema import List from zope.schema import SourceText diff --git a/src/iosanita/policy/restapi/configure.zcml b/src/iosanita/policy/restapi/configure.zcml index 5408a6e..e4b3d68 100644 --- a/src/iosanita/policy/restapi/configure.zcml +++ b/src/iosanita/policy/restapi/configure.zcml @@ -3,7 +3,7 @@ xmlns:plone="http://namespaces.plone.org/plone" > - + diff --git a/src/iosanita/policy/restapi/controlpanel.py b/src/iosanita/policy/restapi/controlpanel.py new file mode 100644 index 0000000..f2b71bb --- /dev/null +++ b/src/iosanita/policy/restapi/controlpanel.py @@ -0,0 +1,16 @@ +from iosanita.policy.interfaces import IIosanitaPolicyLayer +from iosanita.policy.interfaces import IIoSanitaSettings +from iosanita.policy.interfaces import IIoSanitaSettingsControlpanel +from plone.restapi.controlpanels import RegistryConfigletPanel +from zope.component import adapter +from zope.interface import implementer +from zope.interface import Interface + + +@adapter(Interface, IIosanitaPolicyLayer) +@implementer(IIoSanitaSettingsControlpanel) +class IoSanitaSettingsControlpanel(RegistryConfigletPanel): + schema = IIoSanitaSettings + configlet_id = "IoSanitaSettings" + configlet_category_id = "Products" + schema_prefix = None diff --git a/src/iosanita/policy/testing.py b/src/iosanita/policy/testing.py index e2435cf..04b37da 100644 --- a/src/iosanita/policy/testing.py +++ b/src/iosanita/policy/testing.py @@ -11,8 +11,8 @@ import collective.volto.slimheader import iosanita.contenttypes import iosanita.policy -import souper.plone import plone.app.caching +import souper.plone class TestLayer(ContentTypesTestLayer):