8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
10 # FOR A PARTICULAR PURPOSE. |
10 # FOR A PARTICULAR PURPOSE. |
11 # |
11 # |
12 |
12 |
|
13 from zope.interface import Interface |
|
14 from zope.schema import Bool, Choice, Int |
|
15 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary |
|
16 |
|
17 |
13 __docformat__ = 'restructuredtext' |
18 __docformat__ = 'restructuredtext' |
14 |
|
15 from zope.interface import Interface |
|
16 from zope.schema import Bool, Int, Choice |
|
17 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm |
|
18 |
19 |
19 from pyams_default_theme import _ |
20 from pyams_default_theme import _ |
20 |
21 |
21 |
22 |
22 VIEW_ITEMS_THUMBNAILS = ( |
23 VIEW_ITEMS_THUMBNAILS = ( |
31 |
32 |
32 class IViewItemsPortletVerticalRendererSettings(Interface): |
33 class IViewItemsPortletVerticalRendererSettings(Interface): |
33 """View items portlet vertical renderer settings interface""" |
34 """View items portlet vertical renderer settings interface""" |
34 |
35 |
35 display_illustrations = Bool(title=_("Display illustrations?"), |
36 display_illustrations = Bool(title=_("Display illustrations?"), |
36 description=_("If 'no', view contents will not display illustrations"), |
37 description=_("If 'no', view contents will not display " |
|
38 "illustrations"), |
37 required=True, |
39 required=True, |
38 default=True) |
40 default=True) |
39 |
41 |
40 thumbnails_selection = Choice(title=_("Thumbnails selection"), |
42 thumbnails_selection = Choice(title=_("Thumbnails selection"), |
41 description=_("Selection used to display images thumbnails"), |
43 description=_("Selection used to display images thumbnails"), |
42 vocabulary=VIEW_ITEMS_THUMBNAILS_VOCABULARY, |
44 vocabulary=VIEW_ITEMS_THUMBNAILS_VOCABULARY, |
43 required=True, |
45 required=True, |
44 default='pano') |
46 default='pano') |
45 |
47 |
46 display_breadcrumbs = Bool(title=_("Display breadcrumbs?"), |
48 display_breadcrumbs = Bool(title=_("Display breadcrumbs?"), |
47 description=_("If 'no', view items breadcrumbs will not be displayed"), |
49 description=_("If 'no', view items breadcrumbs will not be " |
|
50 "displayed"), |
48 required=True, |
51 required=True, |
49 default=True) |
52 default=True) |
50 |
53 |
51 display_tags = Bool(title=_("Display tags?"), |
54 display_tags = Bool(title=_("Display tags?"), |
52 description=_("If 'no', view items tags will not be displayed"), |
55 description=_("If 'no', view items tags will not be displayed"), |
70 thumbnails_selection = Choice(title=_("Thumbnails selection"), |
73 thumbnails_selection = Choice(title=_("Thumbnails selection"), |
71 description=_("Selection used to display images thumbnails"), |
74 description=_("Selection used to display images thumbnails"), |
72 vocabulary=VIEW_ITEMS_THUMBNAILS_VOCABULARY, |
75 vocabulary=VIEW_ITEMS_THUMBNAILS_VOCABULARY, |
73 required=True, |
76 required=True, |
74 default='portrait') |
77 default='portrait') |
|
78 |
|
79 |
|
80 class IViewItemsPortletSummaryRendererSettings(Interface): |
|
81 """View items portlet summary renderer settings interface""" |
|
82 |
|
83 display_illustrations = Bool(title=_("Display illustrations?"), |
|
84 description=_("If 'no', view contents will not display " |
|
85 "illustrations"), |
|
86 required=True, |
|
87 default=True) |
|
88 |
|
89 thumbnails_selection = Choice(title=_("Thumbnails selection"), |
|
90 description=_("Selection used to display images thumbnails"), |
|
91 vocabulary=VIEW_ITEMS_THUMBNAILS_VOCABULARY, |
|
92 required=True, |
|
93 default='pano') |
|
94 |
|
95 paginate = Bool(title=_("Paginate?"), |
|
96 description=_("If 'no', results pagination will be disabled"), |
|
97 required=True, |
|
98 default=True) |
|
99 |
|
100 page_size = Int(title=_("Page size"), |
|
101 description=_("Number of items per page, if pagination is enabled"), |
|
102 required=False, |
|
103 default=9) |