Added support for any media in illustrations
authorThierry Florac <thierry.florac@onf.fr>
Mon, 05 Feb 2018 17:03:10 +0100
changeset 352 a84cf36e9d1b
parent 351 ce073b17b943
child 353 4839285629d1
Added support for any media in illustrations
src/pyams_content/component/illustration/interfaces/__init__.py
--- a/src/pyams_content/component/illustration/interfaces/__init__.py	Mon Feb 05 17:01:56 2018 +0100
+++ b/src/pyams_content/component/illustration/interfaces/__init__.py	Mon Feb 05 17:03:10 2018 +0100
@@ -17,7 +17,7 @@
 
 # import interfaces
 from pyams_content.component.paragraph.interfaces import IBaseParagraph
-from pyams_i18n.schema import I18nTextLineField, I18nThumbnailImageField, I18nTextField
+from pyams_i18n.schema import I18nTextLineField, I18nThumbnailImageField, I18nTextField, I18nThumbnailMediaField
 from zope.annotation.interfaces import IAttributeAnnotatable
 from zope.contentprovider.interfaces import IContentProvider
 
@@ -53,15 +53,16 @@
                       description=_("Name of picture's author"),
                       required=False)
 
-    data = I18nThumbnailImageField(title=_("Image data"),
-                                   description=_("Image content"),
+    data = I18nThumbnailMediaField(title=_("Image or video data"),
+                                   description=_("Image or video content"),
                                    required=False)
 
     filename = TextLine(title=_("Save file as..."),
                         description=_("Name under which the file will be saved"),
                         required=False)
 
-    renderer = Choice(title=_("Image style"),
+    renderer = Choice(title=_("Illustration template"),
+                      description=_("Presentation template used for illustration"),
                       vocabulary='PyAMS illustration renderers')
 
     language = Choice(title=_("Language"),
@@ -83,8 +84,8 @@
 class IIllustrationParagraph(IIllustration, IBaseParagraph):
     """Illustration paragraph"""
 
-    data = I18nThumbnailImageField(title=_("Image data"),
-                                   description=_("Image content"),
+    data = I18nThumbnailMediaField(title=_("Image or video data"),
+                                   description=_("Image or video content"),
                                    required=True)
 
     filename = TextLine(title=_("Save file as..."),