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
2 changes: 1 addition & 1 deletion .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ template = "default"
commit-id = "a129b375"

[pyproject]
dependencies_ignores = "['Products.LinguaPlone.interfaces.ITranslatable', 'collective.akismet', 'collective.z3cform.norobots', 'plone.formwidget.captcha', 'plone.formwidget.recaptcha', 'plone.formwidget.hcaptcha', 'plone.contentrules', 'plone.app.contentrules', 'plone.stringinterp', 'plone.app.collection']"
dependencies_ignores = "['Products.LinguaPlone.interfaces.ITranslatable', 'collective.akismet', 'collective.z3cform.norobots', 'plone.formwidget.captcha', 'plone.formwidget.recaptcha', 'plone.formwidget.hcaptcha', 'plone.contentrules', 'plone.app.contentrules', 'plone.restapi', 'plone.stringinterp', 'plone.app.collection']"

[tox]
constraints_file = "https://dist.plone.org/release/6.1-dev/constraints.txt"
1 change: 1 addition & 0 deletions news/250.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Volto control panel. @rohnsha0
8 changes: 8 additions & 0 deletions plone/app/discussion/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,12 @@
permission="cmf.ManagePortal"
/>

<!-- Volto-compatible REST API control panel -->
<configure zcml:condition="installed plone.restapi">
<adapter
factory=".restapi.DiscussionControlPanel"
name="discussion"
/>
</configure>

</configure>
29 changes: 29 additions & 0 deletions plone/app/discussion/browser/restapi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""REST API integration for plone.app.discussion.

This module contains REST API control panel adapters that are only
registered when plone.restapi is available.
"""

from ..interfaces import _
from ..interfaces import IDiscussionSettings
from plone.restapi.controlpanels import RegistryConfigletPanel
from zope.component import adapter
from zope.interface import Interface


try:
from plone.restapi.interfaces import IControlpanelLayer
except ImportError:
IControlpanelLayer = Interface


@adapter(Interface, IControlpanelLayer)
class DiscussionControlPanel(RegistryConfigletPanel):
"""Volto-compatible REST API control panel for discussion settings."""

schema = IDiscussionSettings
schema_prefix = None
configlet_id = "discussion"
configlet_category_id = "plone-content"
title = _("Discussion")
group = "Content"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Zope = [
]
python-dateutil = ['dateutil']
pytest-plone = ['pytest', 'zope.pytestlayer', 'plone.testing', 'plone.app.testing']
ignore-packages = ['Products.LinguaPlone.interfaces.ITranslatable', 'collective.akismet', 'collective.z3cform.norobots', 'plone.formwidget.captcha', 'plone.formwidget.recaptcha', 'plone.formwidget.hcaptcha', 'plone.contentrules', 'plone.app.contentrules', 'plone.stringinterp', 'plone.app.collection']
ignore-packages = ['Products.LinguaPlone.interfaces.ITranslatable', 'collective.akismet', 'collective.z3cform.norobots', 'plone.formwidget.captcha', 'plone.formwidget.recaptcha', 'plone.formwidget.hcaptcha', 'plone.contentrules', 'plone.app.contentrules', 'plone.restapi', 'plone.stringinterp', 'plone.app.collection']

##
# Add extra configuration options in .meta.toml:
Expand Down