--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/component/paragraph/portlet/interfaces.py Tue Nov 06 14:40:22 2018 +0100
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2008-2018 Thierry Florac <tflorac AT ulthar.net>
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import packages
+from zope.schema import Bool, Choice, List, Set
+
+from pyams_content import _
+# import interfaces
+from pyams_content.component.paragraph.interfaces import PARAGRAPH_FACTORIES_VOCABULARY
+from pyams_portal.interfaces import IPortletSettings
+
+
+class IParagraphContainerPortletSettings(IPortletSettings):
+ """Paragraphs container portlet settings interface"""
+
+ paragraphs = List(title=_("Selected paragraphs"),
+ description=_("List of selected paragraphs; an empty selection means that "
+ "all paragraphs will be selectable by following filters; otherwise, "
+ "this selection will have priority"),
+ value_type=Choice(vocabulary='PyAMS content paragraphs'),
+ required=False)
+
+ factories = Set(title=_("Paragraph types"),
+ description=_("Select list of paragraph types you want to include; an empty "
+ "selection means that all paragraphs types will be selected"),
+ required=False,
+ value_type=Choice(vocabulary=PARAGRAPH_FACTORIES_VOCABULARY))
+
+ anchors_only = Bool(title=_("Anchors only?"),
+ description=_("If 'yes', only paragraphs set as 'anchors' will be selected"),
+ required=True,
+ default=False)
+
+
+class IParagraphNavigationPortletSettings(IPortletSettings):
+ """Paragraphs container navigation settings interface"""
+
+ paragraphs = List(title=_("Selected paragraphs"),
+ description=_("List of paragraphs selected for navigation; an empty selection means that "
+ "all paragraphs will be selectable by following filters; otherwise, "
+ "this selection will have priority"),
+ value_type=Choice(vocabulary='PyAMS content paragraphs'),
+ required=False)
+
+ factories = Set(title=_("Paragraph types"),
+ description=_("Select list of paragraph types you want to use for navigation; an empty "
+ "selection means that all paragraphs types will be selected"),
+ required=False,
+ value_type=Choice(vocabulary=PARAGRAPH_FACTORIES_VOCABULARY))
+
+ anchors_only = Bool(title=_("Anchors only?"),
+ description=_("If 'no', all paragraphs will be used as navigation anchors"),
+ required=True,
+ default=True)