src/pyams_content/component/video/interfaces/__init__.py
changeset 967 1be26c1585fd
parent 918 975dba68ebd5
equal deleted inserted replaced
966:a3d8d83fb6f0 967:1be26c1585fd
    10 # FOR A PARTICULAR PURPOSE.
    10 # FOR A PARTICULAR PURPOSE.
    11 #
    11 #
    12 
    12 
    13 __docformat__ = 'restructuredtext'
    13 __docformat__ = 'restructuredtext'
    14 
    14 
    15 
       
    16 # import standard library
       
    17 
       
    18 # import interfaces
       
    19 from pyams_content.component.paragraph.interfaces import IBaseParagraph
       
    20 from zope.annotation import IAttributeAnnotatable
    15 from zope.annotation import IAttributeAnnotatable
    21 from zope.contentprovider.interfaces import IContentProvider
    16 from zope.contentprovider.interfaces import IContentProvider
    22 
       
    23 # import packages
       
    24 from pyams_i18n.schema import I18nTextField, I18nTextLineField
       
    25 from zope.interface import Interface, Attribute
    17 from zope.interface import Interface, Attribute
    26 from zope.schema import Choice, TextLine
    18 from zope.schema import Choice, TextLine
    27 
    19 
    28 from pyams_content import _
    20 from pyams_content import _
       
    21 from pyams_content.component.paragraph.interfaces import IBaseParagraph
       
    22 from pyams_i18n.schema import I18nTextField, I18nTextLineField
    29 
    23 
    30 
    24 
    31 class IExternalVideoSettings(Interface):
    25 class IExternalVideoSettings(Interface):
    32     """External video settings"""
    26     """External video settings"""
    33 
    27 
    43 
    37 
    44 
    38 
    45 class IExternalVideo(IAttributeAnnotatable):
    39 class IExternalVideo(IAttributeAnnotatable):
    46     """Base interface for external video integration"""
    40     """Base interface for external video integration"""
    47 
    41 
       
    42     author = TextLine(title=_("Author"),
       
    43                       description=_("Name of document's author"),
       
    44                       required=True)
       
    45 
    48     description = I18nTextField(title=_("Associated text"),
    46     description = I18nTextField(title=_("Associated text"),
    49                                 description=_("Video description displayed by front-office template"),
    47                                 description=_("Video description displayed by front-office template"),
    50                                 required=False)
    48                                 required=False)
    51 
       
    52     author = TextLine(title=_("Author"),
       
    53                       description=_("Name of document's author"),
       
    54                       required=True)
       
    55 
    49 
    56     provider_name = Choice(title=_("Video provider"),
    50     provider_name = Choice(title=_("Video provider"),
    57                            description=_("Name of external platform providing selected video"),
    51                            description=_("Name of external platform providing selected video"),
    58                            required=False,
    52                            required=False,
    59                            vocabulary="PyAMS video providers")
    53                            vocabulary="PyAMS video providers")