src/pyams_content/component/gallery/paragraph.py
changeset 356 9922023810d3
parent 252 2dafc720b378
child 363 86d1a240d4dc
equal deleted inserted replaced
355:5dce53509832 356:9922023810d3
    21 from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE
    21 from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE
    22 from pyams_i18n.interfaces import II18n, INegotiator, II18nManager
    22 from pyams_i18n.interfaces import II18n, INegotiator, II18nManager
    23 
    23 
    24 # import packages
    24 # import packages
    25 from pyams_content.component.gallery import Gallery as BaseGallery
    25 from pyams_content.component.gallery import Gallery as BaseGallery
    26 from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker
    26 from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker, BaseParagraphFactory
    27 from pyams_utils.adapter import adapter_config
    27 from pyams_utils.adapter import adapter_config
    28 from pyams_utils.registry import utility_config, get_utility
    28 from pyams_utils.registry import utility_config, get_utility
    29 from pyams_utils.traversing import get_parent
    29 from pyams_utils.traversing import get_parent
    30 from zope.interface import implementer
    30 from zope.interface import implementer
    31 
    31 
    39     icon_class = 'fa-picture-o'
    39     icon_class = 'fa-picture-o'
    40     icon_hint = _("Images gallery")
    40     icon_hint = _("Images gallery")
    41 
    41 
    42 
    42 
    43 @utility_config(name='Gallery', provides=IParagraphFactory)
    43 @utility_config(name='Gallery', provides=IParagraphFactory)
    44 class GalleryFactory(object):
    44 class GalleryFactory(BaseParagraphFactory):
    45     """Gallery paragraph factory"""
    45     """Gallery paragraph factory"""
    46 
    46 
    47     name = _("Images gallery")
    47     name = _("Images gallery")
    48     content_type = Gallery
    48     content_type = Gallery
    49 
    49