7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
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 |
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 |
|
13 __docformat__ = 'restructuredtext' |
|
14 |
12 from zope.interface import Interface |
15 from zope.interface import Interface |
|
16 from zope.schema import Bool, Choice, Set |
13 |
17 |
14 from pyams_content.interfaces import MANAGER_ROLE, GUEST_ROLE |
18 from pyams_content.interfaces import GUEST_ROLE, MANAGER_ROLE |
|
19 from pyams_content.shared.common.interfaces import CONTENT_TYPES_VOCABULARY |
|
20 from pyams_content.shared.common.interfaces.types import ALL_DATA_TYPES_VOCABULARY |
|
21 from pyams_content.shared.site.interfaces import IBaseSiteItem, ISiteElement |
|
22 from pyams_content.shared.view import IWfView |
|
23 from pyams_content.shared.view.interfaces import RELEVANCE_ORDER, USER_VIEW_ORDER_VOCABULARY |
15 from pyams_i18n.schema import I18nTextLineField |
24 from pyams_i18n.schema import I18nTextLineField |
16 from pyams_portal.interfaces import DESIGNER_ROLE |
25 from pyams_portal.interfaces import DESIGNER_ROLE |
17 from pyams_security.schema import PrincipalsSet |
26 from pyams_security.schema import PrincipalsSet |
18 |
|
19 |
|
20 __docformat__ = 'restructuredtext' |
|
21 |
|
22 from zope.schema import Choice, Set, Bool |
|
23 |
|
24 from pyams_content.shared.common.interfaces import CONTENT_TYPES_VOCABULARY |
|
25 from pyams_content.shared.common.interfaces.types import ALL_DATA_TYPES_VOCABULARY |
|
26 from pyams_content.shared.site.interfaces import ISiteElement, IBaseSiteItem |
|
27 from pyams_content.shared.view import IWfView |
|
28 from pyams_sequence.interfaces import ISequentialIdTarget |
27 from pyams_sequence.interfaces import ISequentialIdTarget |
29 |
28 |
30 from pyams_content import _ |
29 from pyams_content import _ |
31 |
30 |
32 |
31 |
51 |
50 |
52 |
51 |
53 class ISearchFolder(IBaseSiteItem, ISiteElement, IWfView, ISequentialIdTarget): |
52 class ISearchFolder(IBaseSiteItem, ISiteElement, IWfView, ISequentialIdTarget): |
54 """Search folder interface""" |
53 """Search folder interface""" |
55 |
54 |
|
55 order_by = Choice(title=_("Order by"), |
|
56 description=_("Property to use to sort results"), |
|
57 vocabulary=USER_VIEW_ORDER_VOCABULARY, |
|
58 required=False, |
|
59 default=RELEVANCE_ORDER) |
|
60 |
56 visible_in_list = Bool(title=_("Visible in folders list"), |
61 visible_in_list = Bool(title=_("Visible in folders list"), |
57 description=_("If 'no', folder will not be displayed into folders list"), |
62 description=_("If 'no', folder will not be displayed into folders list"), |
58 required=True, |
63 required=True, |
59 default=True) |
64 default=True) |
60 |
65 |