1 | from zope import schema |
---|
2 | from zope.interface import Interface |
---|
3 | |
---|
4 | from quintagroup.dropdownmenu import _ |
---|
5 | |
---|
6 | |
---|
7 | class IDropDownMenuSettings(Interface): |
---|
8 | """Global dropdown menu settings. This describes records stored in the |
---|
9 | configuration registry and obtainable via plone.registry. |
---|
10 | """ |
---|
11 | |
---|
12 | show_content_tabs = schema.Bool( |
---|
13 | title=_(u"Show content tabs"), |
---|
14 | description=_(u"Use this setting to enable or disable content structure " |
---|
15 | u"based (autogenerated) portal tabs."), |
---|
16 | default=True) |
---|
17 | |
---|
18 | show_nonfolderish_tabs = schema.Bool( |
---|
19 | title=_(u"Show non-folderish content tabs"), |
---|
20 | description=_(u"Use this setting to enable or disable non-folderish " |
---|
21 | u"content structure based (autogenerated) portal tabs. " |
---|
22 | u"This setting doesn't make sense in case Show content " |
---|
23 | u"tabs is switched off."), |
---|
24 | default=True) |
---|
25 | |
---|
26 | content_before_actions_tabs = schema.Bool( |
---|
27 | title=_(u"Show content tabs before portal_actions tabs"), |
---|
28 | description=_(u"By default portal_actons based tabs are placed before " |
---|
29 | u"those autogenerated from content structure. Check this " |
---|
30 | u"option to revert the behaviour."), |
---|
31 | default=True) |
---|
32 | |
---|
33 | content_tabs_level = schema.Int( |
---|
34 | title=_(u"Content tabs level"), |
---|
35 | description=_(u"How many folders should be included before the " |
---|
36 | u"nested menu stops. 0 means no limit. 1 only includes " |
---|
37 | u"the root folder."), |
---|
38 | default=0) |
---|
39 | |
---|
40 | show_actions_tabs = schema.Bool( |
---|
41 | title=_(u"Show actions tabs"), |
---|
42 | description=_(u"Use this setting to enable or disable portal_actions " |
---|
43 | u"based portal tabs."), |
---|
44 | default=True) |
---|
45 | |
---|
46 | actions_tabs_level = schema.Int( |
---|
47 | title=_(u"Actions tabs level"), |
---|
48 | description=_(u"How many folders should be included before the " |
---|
49 | u"nested menu stops. 0 means no limit. 1 only includes " |
---|
50 | u"the root folder."), |
---|
51 | default=0) |
---|
52 | |
---|
53 | actions_category = schema.TextLine( |
---|
54 | title=_(u"Portal actions category"), |
---|
55 | description=_(u"Root portal actions tool's category name to extract " |
---|
56 | u"tabs from."), |
---|
57 | default=u"portal_tab") |
---|
58 | |
---|
59 | nested_category_prefix = schema.TextLine( |
---|
60 | title=_(u"Nested category prefix"), |
---|
61 | description=_(u"Because portal_actions category object couldn't serve as" |
---|
62 | u" action itself we need to create appropriate action " |
---|
63 | u"for it. Prefix and sufix strings are used to make up " |
---|
64 | u"id for category while linking action to action category." |
---|
65 | u"E.g.: action id is 'index_html', prefix is 'pre_', sufix" |
---|
66 | u" is equal to '_sub' then category object with id equal " |
---|
67 | u"to 'pre_index_html_sub' will be looked up on the same " |
---|
68 | u"level to get nested menu for 'index_html' action."), |
---|
69 | default=u"") |
---|
70 | |
---|
71 | nested_category_sufix = schema.TextLine( |
---|
72 | title=_(u"Nested category sufix"), |
---|
73 | description=_(u"Sufix part of the category id to be looked up during " |
---|
74 | u"linking with action."), |
---|
75 | default=u"_sub") |
---|