src/pyams_content/component/illustration/interfaces/__init__.py
changeset 352 a84cf36e9d1b
parent 206 90e3fa165ce1
child 363 86d1a240d4dc
equal deleted inserted replaced
351:ce073b17b943 352:a84cf36e9d1b
    15 
    15 
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.component.paragraph.interfaces import IBaseParagraph
    19 from pyams_content.component.paragraph.interfaces import IBaseParagraph
    20 from pyams_i18n.schema import I18nTextLineField, I18nThumbnailImageField, I18nTextField
    20 from pyams_i18n.schema import I18nTextLineField, I18nThumbnailImageField, I18nTextField, I18nThumbnailMediaField
    21 from zope.annotation.interfaces import IAttributeAnnotatable
    21 from zope.annotation.interfaces import IAttributeAnnotatable
    22 from zope.contentprovider.interfaces import IContentProvider
    22 from zope.contentprovider.interfaces import IContentProvider
    23 
    23 
    24 # import packages
    24 # import packages
    25 from zope.interface import Interface, Attribute
    25 from zope.interface import Interface, Attribute
    51 
    51 
    52     author = TextLine(title=_("Author"),
    52     author = TextLine(title=_("Author"),
    53                       description=_("Name of picture's author"),
    53                       description=_("Name of picture's author"),
    54                       required=False)
    54                       required=False)
    55 
    55 
    56     data = I18nThumbnailImageField(title=_("Image data"),
    56     data = I18nThumbnailMediaField(title=_("Image or video data"),
    57                                    description=_("Image content"),
    57                                    description=_("Image or video content"),
    58                                    required=False)
    58                                    required=False)
    59 
    59 
    60     filename = TextLine(title=_("Save file as..."),
    60     filename = TextLine(title=_("Save file as..."),
    61                         description=_("Name under which the file will be saved"),
    61                         description=_("Name under which the file will be saved"),
    62                         required=False)
    62                         required=False)
    63 
    63 
    64     renderer = Choice(title=_("Image style"),
    64     renderer = Choice(title=_("Illustration template"),
       
    65                       description=_("Presentation template used for illustration"),
    65                       vocabulary='PyAMS illustration renderers')
    66                       vocabulary='PyAMS illustration renderers')
    66 
    67 
    67     language = Choice(title=_("Language"),
    68     language = Choice(title=_("Language"),
    68                       description=_("File's content language"),
    69                       description=_("File's content language"),
    69                       vocabulary="PyAMS base languages",
    70                       vocabulary="PyAMS base languages",
    81 
    82 
    82 
    83 
    83 class IIllustrationParagraph(IIllustration, IBaseParagraph):
    84 class IIllustrationParagraph(IIllustration, IBaseParagraph):
    84     """Illustration paragraph"""
    85     """Illustration paragraph"""
    85 
    86 
    86     data = I18nThumbnailImageField(title=_("Image data"),
    87     data = I18nThumbnailMediaField(title=_("Image or video data"),
    87                                    description=_("Image content"),
    88                                    description=_("Image or video content"),
    88                                    required=True)
    89                                    required=True)
    89 
    90 
    90     filename = TextLine(title=_("Save file as..."),
    91     filename = TextLine(title=_("Save file as..."),
    91                         description=_("Name under which the file will be saved"),
    92                         description=_("Name under which the file will be saved"),
    92                         required=False)
    93                         required=False)