13 __docformat__ = 'restructuredtext' |
13 __docformat__ = 'restructuredtext' |
14 |
14 |
15 |
15 |
16 # import standard library |
16 # import standard library |
17 |
17 |
|
18 from zope.interface import Interface |
|
19 from zope.schema import URI, Choice, TextLine |
|
20 |
|
21 from pyams_content import _ |
18 # import interfaces |
22 # import interfaces |
19 from pyams_content.component.paragraph import IBaseParagraph |
23 from pyams_content.component.paragraph import IBaseParagraph |
20 from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, ISharedContent |
24 from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, ISharedContent |
21 from pyams_sequence.interfaces import IInternalReferencesList |
|
22 |
|
23 # import packages |
25 # import packages |
24 from pyams_file.schema import ImageField |
26 from pyams_file.schema import ImageField |
|
27 from pyams_i18n.schema import I18nTextLineField |
|
28 from pyams_sequence.interfaces import IInternalReferencesList |
25 from pyams_sequence.schema import InternalReferencesListField |
29 from pyams_sequence.schema import InternalReferencesListField |
26 from zope.interface import Interface |
|
27 from zope.schema import URI, Choice |
|
28 |
|
29 from pyams_content import _ |
|
30 |
|
31 |
30 |
32 LOGO_CONTENT_TYPE = 'logo' |
31 LOGO_CONTENT_TYPE = 'logo' |
33 LOGO_CONTENT_NAME = _("Logo") |
32 LOGO_CONTENT_NAME = _("Logo") |
34 |
33 |
35 |
34 |
42 |
41 |
43 |
42 |
44 class IWfLogo(IWfSharedContent): |
43 class IWfLogo(IWfSharedContent): |
45 """Logo interface""" |
44 """Logo interface""" |
46 |
45 |
|
46 title = I18nTextLineField(title=_("Title"), |
|
47 description=_("Full name of logo organization"), |
|
48 required=True) |
|
49 |
|
50 acronym = TextLine(title=_("Acronym"), |
|
51 description=_("Matching logo acronym, without spaces or separators"), |
|
52 required=False) |
|
53 |
|
54 url = URI(title=_("Target URL"), |
|
55 description=_("URL used to access external resource"), |
|
56 required=False) |
|
57 |
47 image = ImageField(title=_("Image (colored)"), |
58 image = ImageField(title=_("Image (colored)"), |
48 description=_("Image data"), |
59 description=_("Image data"), |
49 required=True) |
60 required=True) |
50 |
61 |
51 monochrome_image = ImageField(title=_("Image (monochrome)"), |
62 monochrome_image = ImageField(title=_("Image (monochrome)"), |
52 description=_("An alternate image which can be used by some " |
63 description=_("An alternate image which can be used by some " |
53 "presentation templates"), |
64 "presentation templates"), |
54 required=False) |
65 required=False) |
55 |
|
56 url = URI(title=_("Target URL"), |
|
57 description=_("URL used to access external resource"), |
|
58 required=False) |
|
59 |
66 |
60 |
67 |
61 class IWfLogoFactory(Interface): |
68 class IWfLogoFactory(Interface): |
62 """Logo factory interface""" |
69 """Logo factory interface""" |
63 |
70 |