--- a/src/pyams_content/component/gallery/interfaces/__init__.py Sun Feb 11 12:11:05 2018 +0100
+++ b/src/pyams_content/component/gallery/interfaces/__init__.py Thu Feb 15 15:08:29 2018 +0100
@@ -17,15 +17,15 @@
# import interfaces
from pyams_content.component.paragraph.interfaces import IBaseParagraph
+from pyams_content.features.renderer.interfaces import IRenderedContent
from zope.container.interfaces import IOrderedContainer
-from zope.contentprovider.interfaces import IContentProvider
# import packages
from pyams_file.schema import MediaField, AudioField
from pyams_i18n.schema import I18nTextLineField, I18nTextField
from zope.annotation.interfaces import IAttributeAnnotatable
from zope.container.constraints import contains, containers
-from zope.interface import Interface, Attribute
+from zope.interface import Interface
from zope.schema import Bool, TextLine, Choice
from pyams_content import _
@@ -34,11 +34,15 @@
GALLERY_CONTAINER_KEY = 'pyams_content.gallery'
-class IGalleryFile(Interface):
- """Gallery file marker interface"""
+class IGalleryItem(Interface):
+ """Gallery item base interface"""
containers('.IGallery')
+
+class IGalleryFile(IGalleryItem):
+ """Gallery file marker interface"""
+
title = I18nTextLineField(title=_("Legend"),
required=False)
@@ -83,7 +87,7 @@
default=True)
-class IBaseGallery(IOrderedContainer, IAttributeAnnotatable):
+class IBaseGallery(IOrderedContainer, IAttributeAnnotatable, IRenderedContent):
"""Base gallery interface"""
title = I18nTextLineField(title=_("Title"),
@@ -113,13 +117,7 @@
class IGallery(IBaseGallery):
"""Gallery interface"""
- contains(IGalleryFile)
-
-
-class IGalleryRenderer(IContentProvider):
- """Gallery renderer utility interface"""
-
- label = Attribute("Renderer label")
+ contains(IGalleryItem)
class IGalleryTarget(IAttributeAnnotatable):