--- a/src/pyams_content/component/gallery/file.py Wed May 30 11:23:41 2018 +0200
+++ b/src/pyams_content/component/gallery/file.py Wed May 30 15:13:25 2018 +0200
@@ -48,9 +48,9 @@
class GalleryFile(Persistent, Contained):
"""Gallery file info"""
+ _data = FileProperty(IGalleryFile['data'])
title = FieldProperty(IGalleryFile['title'])
alt_title = FieldProperty(IGalleryFile['alt_title'])
- _data = FileProperty(IGalleryFile['data'])
description = FieldProperty(IGalleryFile['description'])
author = FieldProperty(IGalleryFile['author'])
author_comments = FieldProperty(IGalleryFile['author_comments'])
--- a/src/pyams_content/component/gallery/interfaces/__init__.py Wed May 30 11:23:41 2018 +0200
+++ b/src/pyams_content/component/gallery/interfaces/__init__.py Wed May 30 15:13:25 2018 +0200
@@ -44,6 +44,10 @@
class IGalleryFile(IGalleryItem):
"""Gallery file marker interface"""
+ data = MediaField(title=_("Image or video data"),
+ description=_("Image or video content"),
+ required=True)
+
title = I18nTextLineField(title=_("Legend"),
required=False)
@@ -51,10 +55,6 @@
description=_("Alternate title used to describe media content"),
required=False)
- data = MediaField(title=_("Image or video data"),
- description=_("Image or video content"),
- required=True)
-
description = I18nTextField(title=_("Description"),
required=False)
--- a/src/pyams_content/component/gallery/zmi/interfaces.py Wed May 30 11:23:41 2018 +0200
+++ b/src/pyams_content/component/gallery/zmi/interfaces.py Wed May 30 15:13:25 2018 +0200
@@ -33,6 +33,10 @@
class IGalleryMediasAddFields(Interface):
"""Gallery medias add fields"""
+ medias_data = FileField(title=_("Images or videos data"),
+ description=_("You can upload a single file or choose to upload a whole ZIP archive"),
+ required=True)
+
author = TextLine(title=_("Author"),
description=_("Name of document's author"),
required=False)
@@ -40,7 +44,3 @@
author_comments = I18nTextField(title=_("Author comments"),
description=_("Comments relatives to author's rights management"),
required=False)
-
- medias_data = FileField(title=_("Images or videos data"),
- description=_("You can upload a single file or choose to upload a whole ZIP archive"),
- required=True)