src/pyams_content/shared/site/__init__.py
changeset 1384 cdf63a1c7dc9
parent 1207 a97f2023131a
equal deleted inserted replaced
1383:2cfeb340dacf 1384:cdf63a1c7dc9
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 from zope.interface import implementer, provider
    13 from zope.interface import implementer, provider
    16 from zope.schema.fieldproperty import FieldProperty
    14 from zope.schema.fieldproperty import FieldProperty
    17 
    15 
    18 from pyams_content.component.illustration import IIllustrationTarget, ILinkIllustrationTarget
    16 from pyams_content.component.illustration import IIllustrationTarget, ILinkIllustrationTarget
    19 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget
    17 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget
    20 from pyams_content.component.theme.interfaces import ITagsTarget, IThemesTarget
    18 from pyams_content.component.theme.interfaces import ITagsTarget, IThemesTarget
    21 from pyams_content.features.preview.interfaces import IPreviewTarget
    19 from pyams_content.features.preview.interfaces import IPreviewTarget
    22 from pyams_content.features.review.interfaces import IReviewTarget
    20 from pyams_content.features.review.interfaces import IReviewTarget
    23 from pyams_content.shared.common import IWfSharedContentFactory, SharedContent, WfSharedContent, register_content_type
    21 from pyams_content.shared.common import IWfSharedContentFactory, SharedContent, WfSharedContent, \
    24 from pyams_content.shared.site.interfaces import ISiteElementNavigation, ISiteTopic, IWfSiteTopic, IWfSiteTopicFactory, \
    22     register_content_type
    25     SITE_TOPIC_CONTENT_NAME, SITE_TOPIC_CONTENT_TYPE
    23 from pyams_content.shared.common.types import WfTypedSharedContentMixin
       
    24 from pyams_content.shared.site.interfaces import ISiteElementNavigation, ISiteTopic, IWfSiteTopic, \
       
    25     IWfSiteTopicFactory, SITE_TOPIC_CONTENT_NAME, SITE_TOPIC_CONTENT_TYPE
    26 from pyams_utils.adapter import adapter_config
    26 from pyams_utils.adapter import adapter_config
    27 from pyams_workflow.interfaces import IWorkflow, IWorkflowState, IWorkflowVersions
    27 from pyams_workflow.interfaces import IWorkflow, IWorkflowState, IWorkflowVersions
    28 
    28 
    29 
    29 
       
    30 __docformat__ = 'restructuredtext'
       
    31 
       
    32 
    30 @implementer(IWfSiteTopic, IIllustrationTarget, ILinkIllustrationTarget, IParagraphContainerTarget,
    33 @implementer(IWfSiteTopic, IIllustrationTarget, ILinkIllustrationTarget, IParagraphContainerTarget,
    31              ITagsTarget, IThemesTarget, IPreviewTarget, IReviewTarget)
    34              ITagsTarget, IThemesTarget, IPreviewTarget, IReviewTarget)
    32 class WfSiteTopic(WfSharedContent):
    35 class WfSiteTopic(WfSharedContent, WfTypedSharedContentMixin):
    33     """Base site topic"""
    36     """Base site topic"""
    34 
    37 
    35     content_type = SITE_TOPIC_CONTENT_TYPE
    38     content_type = SITE_TOPIC_CONTENT_TYPE
    36     content_name = SITE_TOPIC_CONTENT_NAME
    39     content_name = SITE_TOPIC_CONTENT_NAME
    37 
    40 
    38     references = FieldProperty(IWfSiteTopic['references'])
    41     references = FieldProperty(IWfSiteTopic['references'])
       
    42     data_type = FieldProperty(IWfSiteTopic['data_type'])
    39 
    43 
    40 register_content_type(WfSiteTopic)
    44 register_content_type(WfSiteTopic)
    41 
    45 
    42 
    46 
    43 @provider(IWfSiteTopicFactory)
    47 @provider(IWfSiteTopicFactory)