|
1 # |
|
2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net> |
|
3 # All Rights Reserved. |
|
4 # |
|
5 # This software is subject to the provisions of the Zope Public License, |
|
6 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
|
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
|
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
|
10 # FOR A PARTICULAR PURPOSE. |
|
11 # |
|
12 |
|
13 __docformat__ = 'restructuredtext' |
|
14 |
|
15 |
|
16 # import standard library |
|
17 |
|
18 # import interfaces |
|
19 from pyams_content.component.paragraph.interfaces import IBaseParagraph |
|
20 |
|
21 # import packages |
|
22 from pyams_file.schema import VideoField |
|
23 from pyams_i18n.schema import I18nHTMLField, I18nTextField |
|
24 from zope.schema import TextLine |
|
25 |
|
26 from pyams_content import _ |
|
27 |
|
28 |
|
29 # |
|
30 # HTML paragraph |
|
31 # |
|
32 |
|
33 class IVideoParagraph(IBaseParagraph): |
|
34 """Video paragraph""" |
|
35 |
|
36 body = I18nHTMLField(title=_("Body"), |
|
37 required=False) |
|
38 |
|
39 description = I18nTextField(title=_("Description"), |
|
40 description=_("File description displayed by front-office template"), |
|
41 required=False) |
|
42 |
|
43 author = TextLine(title=_("Author"), |
|
44 description=_("Name of document's author"), |
|
45 required=False) |
|
46 |
|
47 data = VideoField(title=_("Video data"), |
|
48 description=_("Video file content"), |
|
49 required=True) |