1 | # -*- coding: utf-8 -*- |
---|
2 | from zope import schema |
---|
3 | from zope.interface import Interface |
---|
4 | |
---|
5 | from plone.theme.interfaces import IDefaultPloneLayer |
---|
6 | |
---|
7 | from quintagroup.dropdownmenu import _ |
---|
8 | |
---|
9 | |
---|
10 | class IDropDownMenuLayer(IDefaultPloneLayer): |
---|
11 | """Request marker installed via browserlayer.xml. |
---|
12 | """ |
---|
13 | |
---|
14 | |
---|
15 | class IDropDownMenuSettings(Interface): |
---|
16 | """Global dropdown menu settings. This describes records stored in the |
---|
17 | configuration registry and obtainable via plone.registry. |
---|
18 | """ |
---|
19 | |
---|
20 | show_icons = schema.Bool( |
---|
21 | title=_(u"Show tabs icons"), |
---|
22 | description=_(u"Use this setting to switch on/off icons for menu " |
---|
23 | u"items."), |
---|
24 | default=False) |
---|
25 | |
---|
26 | show_content_tabs = schema.Bool( |
---|
27 | title=_(u"Show navigation strategy based dropdown menu"), |
---|
28 | description=_(u"Use this setting to switch on/off navigation " |
---|
29 | u"strategy built dropdown menu"), |
---|
30 | default=True) |
---|
31 | |
---|
32 | show_nonfolderish_tabs = schema.Bool( |
---|
33 | title=_(u"Show non-folderish menu items"), |
---|
34 | description=_(u"Use this setting to switch on/off non-folderish " |
---|
35 | u"objects in navigation strategy based dropdown menu"), |
---|
36 | default=True) |
---|
37 | |
---|
38 | content_before_actions_tabs = schema.Bool( |
---|
39 | title=_(u"Show content tabs before portal_actions tabs"), |
---|
40 | description=_(u""), |
---|
41 | default=False) |
---|
42 | |
---|
43 | content_tabs_level = schema.Int( |
---|
44 | title=_(u"Navigation strategy dropdown menu depth"), |
---|
45 | description=_(u"How many levels folders to list after the " |
---|
46 | u"top level."), |
---|
47 | default=0) |
---|
48 | |
---|
49 | show_actions_tabs = schema.Bool( |
---|
50 | title=_(u"Show actions tabs"), |
---|
51 | description=_(u"Use this setting to enable/disable portal_actions " |
---|
52 | u"based dropdown menu"), |
---|
53 | default=True) |
---|
54 | |
---|
55 | actions_tabs_level = schema.Int( |
---|
56 | title=_(u"Actions dropdown menu depth"), |
---|
57 | description=_(u"How many levels of portal_actions to list after the " |
---|
58 | u"top level."), |
---|
59 | default=0) |
---|
60 | |
---|
61 | actions_category = schema.TextLine( |
---|
62 | title=_(u"Root portal actions category"), |
---|
63 | description=_(u"Root category id of portal_actions based dropdown " |
---|
64 | u"menu tree"), |
---|
65 | default=u"portal_tabs") |
---|
66 | |
---|
67 | nested_category_prefix = schema.TextLine( |
---|
68 | title=_(u"Nested category prefix"), |
---|
69 | description=_(u"Prefix of category id, used to bind category " |
---|
70 | u"with action"), |
---|
71 | default=u"", |
---|
72 | required=False) |
---|
73 | |
---|
74 | nested_category_sufix = schema.TextLine( |
---|
75 | title=_(u"Nested category sufix"), |
---|
76 | description=_(u"Sufix of category id, used to bind category " |
---|
77 | u"with action"), |
---|
78 | default=u"_sub", |
---|
79 | required=False) |
---|