equal
deleted
inserted
replaced
10 # FOR A PARTICULAR PURPOSE. |
10 # FOR A PARTICULAR PURPOSE. |
11 # |
11 # |
12 |
12 |
13 __docformat__ = 'restructuredtext' |
13 __docformat__ = 'restructuredtext' |
14 |
14 |
|
15 from zope.interface import Interface |
|
16 from zope.schema import Choice, TextLine |
15 |
17 |
16 # import standard library |
18 from pyams_content.component.association.interfaces import IAssociationContainerTarget, IAssociationItem |
17 |
19 from pyams_i18n.schema import I18nAudioField, I18nFileField, I18nTextField, I18nTextLineField, I18nThumbnailImageField, \ |
18 # import interfaces |
20 I18nVideoField |
19 from pyams_content.component.association.interfaces import IAssociationItem, IAssociationContainerTarget |
|
20 |
|
21 # import packages |
|
22 from pyams_i18n.schema import I18nTextLineField, I18nTextField, I18nFileField, I18nThumbnailImageField, \ |
|
23 I18nVideoField, I18nAudioField |
|
24 from zope.schema import TextLine, Choice |
|
25 |
21 |
26 from pyams_content import _ |
22 from pyams_content import _ |
27 |
23 |
28 |
24 |
29 EXTFILE_CONTAINER_KEY = 'pyams_content.extfile' |
25 EXTFILE_CONTAINER_KEY = 'pyams_content.extfile' |
31 |
27 |
32 |
28 |
33 class IBaseExtFile(IAssociationItem): |
29 class IBaseExtFile(IAssociationItem): |
34 """Base external file interface""" |
30 """Base external file interface""" |
35 |
31 |
36 title = I18nTextLineField(title=_("Alternate title"), |
32 title = I18nTextLineField(title=_("Download link label"), |
37 description=_("File title, as shown in front-office"), |
33 description=_("Label of download link, as shown in front-office"), |
38 required=False) |
34 required=False) |
39 |
35 |
40 description = I18nTextField(title=_("Description"), |
36 description = I18nTextField(title=_("Description"), |
41 description=_("File description displayed by front-office template"), |
37 description=_("File description displayed by front-office template"), |
42 required=False) |
38 required=False) |
91 required=True) |
87 required=True) |
92 |
88 |
93 |
89 |
94 class IExtFileContainerTarget(IAssociationContainerTarget): |
90 class IExtFileContainerTarget(IAssociationContainerTarget): |
95 """External files container marker interface""" |
91 """External files container marker interface""" |
|
92 |
|
93 |
|
94 # |
|
95 # External files management |
|
96 # |
|
97 |
|
98 EXTFILE_MANAGER_INFO_KEY = 'pyams_content.extfile.manager' |
|
99 |
|
100 |
|
101 class IExtFileManagerInfo(Interface): |
|
102 """External file manager interface""" |
|
103 |
|
104 default_title_prefix = I18nTextLineField(title=_("Default title prefix"), |
|
105 description=_("If used, this prefix will be automatically added to " |
|
106 "download link's label of all files"), |
|
107 required=False) |