Moved 'author' into IBasicIllustration form IIllustration; Updated BasicIllustration and Illustration also dev-dc
authorDamien Correia
Thu, 06 Sep 2018 11:33:49 +0200
branchdev-dc
changeset 932 8e9a1496c2ba
parent 931 a2f3b82f93c3
child 933 b53fe7dcb4a0
Moved 'author' into IBasicIllustration form IIllustration; Updated BasicIllustration and Illustration also
src/pyams_content/component/illustration/__init__.py
src/pyams_content/component/illustration/interfaces/__init__.py
--- a/src/pyams_content/component/illustration/__init__.py	Thu Sep 06 11:27:55 2018 +0200
+++ b/src/pyams_content/component/illustration/__init__.py	Thu Sep 06 11:33:49 2018 +0200
@@ -52,9 +52,10 @@
 class BasicIllustration(Persistent, Contained):
     """Illustration persistent class"""
 
-    _data = I18nFileProperty(IIllustration['data'])
-    title = FieldProperty(IIllustration['title'])
-    alt_title = FieldProperty(IIllustration['alt_title'])
+    _data = I18nFileProperty(IBasicIllustration['data'])
+    title = FieldProperty(IBasicIllustration['title'])
+    alt_title = FieldProperty(IBasicIllustration['alt_title'])
+    author = FieldProperty(IBasicIllustration['author'])
 
     @property
     def data(self):
@@ -94,7 +95,6 @@
     """Illustration persistent class"""
 
     description = FieldProperty(IIllustration['description'])
-    author = FieldProperty(IIllustration['author'])
     renderer = FieldProperty(IIllustration['renderer'])
 
 
--- a/src/pyams_content/component/illustration/interfaces/__init__.py	Thu Sep 06 11:27:55 2018 +0200
+++ b/src/pyams_content/component/illustration/interfaces/__init__.py	Thu Sep 06 11:33:49 2018 +0200
@@ -57,6 +57,10 @@
                                   description=_("Alternate title used to describe image content"),
                                   required=False)
 
+    author = TextLine(title=_("Author"),
+                      description=_("Name of picture's author"),
+                      required=False)
+
 
 class IIllustration(IBasicIllustration, IRenderedContent):
     """Illustration paragraph"""
@@ -65,10 +69,6 @@
                                 description=_("Illustration description displayed in front-office templates"),
                                 required=False)
 
-    author = TextLine(title=_("Author"),
-                      description=_("Name of picture's author"),
-                      required=False)
-
     renderer = Choice(title=_("Illustration template"),
                       description=_("Presentation template used for illustration"),
                       vocabulary=ILLUSTRATION_RENDERERS,