|
1 # |
|
2 # Copyright (c) 2008-2018 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 from zope.interface import Interface |
|
16 from zope.schema import Choice |
|
17 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm |
|
18 |
|
19 from pyams_default_theme import _ |
|
20 |
|
21 |
|
22 GALLERY_THUMBNAILS = ( |
|
23 {'id': '', 'title': _("Device selection")}, |
|
24 {'id': 'pano', 'title': _("Panoramic selection")}, |
|
25 {'id': 'portrait', 'title': _("Portrait selection")}, |
|
26 {'id': 'square', 'title': _("Square selection")} |
|
27 ) |
|
28 |
|
29 GALLERY_THUMBNAILS_VOCABULARY = SimpleVocabulary([SimpleTerm(item['id'], title=item['title']) |
|
30 for item in GALLERY_THUMBNAILS]) |
|
31 |
|
32 |
|
33 class IGalleryDefaultRendererSettings(Interface): |
|
34 """Gallery default renderer settings""" |
|
35 |
|
36 thumbnails_selection = Choice(title=_("Thumbnails selection"), |
|
37 description=_("Selection used to display images thumbnails"), |
|
38 vocabulary=GALLERY_THUMBNAILS_VOCABULARY, |
|
39 required=False, |
|
40 default='') |