source: products/quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/interfaces.py @ 1199

Last change on this file since 1199 was 1199, checked in by piv, 15 years ago

set category sufix as optional setting, fix actions tab level functionality

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1# -*- coding: utf-8 -*-
2from zope import schema
3from zope.interface import Interface
4
5from plone.theme.interfaces import IDefaultPloneLayer
6
7from quintagroup.dropdownmenu import _
8
9
10class IDropDownMenuLayer(IDefaultPloneLayer):
11    """Request marker installed via browserlayer.xml.
12    """
13
14
15class 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 enable or disable icons for menu "
23                      u"items."),
24        default=False)
25
26    show_content_tabs = schema.Bool(
27        title=_(u"Show content tabs"),
28        description=_(u"Use this setting to enable or disable content structure "
29                      u"based (autogenerated) portal tabs."),
30        default=True)
31
32    show_nonfolderish_tabs = schema.Bool(
33        title=_(u"Show non-folderish content tabs"),
34        description=_(u"Use this setting to enable or disable non-folderish "
35                      u"content structure based (autogenerated) portal tabs. "
36                      u"This setting doesn't make sense in case Show content "
37                      u"tabs is switched off."),
38        default=True)
39
40    content_before_actions_tabs = schema.Bool(
41        title=_(u"Show content tabs before portal_actions tabs"),
42        description=_(u"By default portal_actons based tabs are placed before "
43                      u"those autogenerated from content structure. Check this "
44                      u"option to revert the behaviour."),
45        default=False)
46
47    content_tabs_level = schema.Int(
48        title=_(u"Content tabs level"),
49        description=_(u"How many folders should be included before the "
50                      u"nested menu stops. 0 means no limit. 1 only includes "
51                      u"the root folder."),
52        default=0)
53
54    show_actions_tabs = schema.Bool(
55        title=_(u"Show actions tabs"),
56        description=_(u"Use this setting to enable or disable portal_actions "
57                      u"based portal tabs."),
58        default=True)
59
60    actions_tabs_level = schema.Int(
61        title=_(u"Actions tabs level"),
62        description=_(u"How many folders should be included before the "
63                      u"nested menu stops. 0 means no limit. 1 only includes "
64                      u"the root folder."),
65        default=0)
66
67    actions_category = schema.TextLine(
68        title=_(u"Portal actions category"),
69        description=_(u"Root portal actions tool's category name to extract "
70                      u"tabs from."),
71        default=u"portal_tabs")
72
73    nested_category_prefix = schema.TextLine(
74        title=_(u"Nested category prefix"),
75        description=_(u"Because portal_actions category object couldn't serve as"
76                      u" action itself we need to create appropriate action "
77                      u"for it. Prefix and sufix strings are used to make up "
78                      u"id for category while linking action to action category."
79                      u"E.g.: action id is 'index_html', prefix is 'pre_', sufix"
80                      u" is equal to '_sub' then category object with id equal "
81                      u"to 'pre_index_html_sub' will be looked up on the same "
82                      u"level to get nested menu for 'index_html' action."),
83        default=u"",
84        required=False)
85
86    nested_category_sufix = schema.TextLine(
87        title=_(u"Nested category sufix"),
88        description=_(u"Sufix part of the category id to be looked up during "
89                      u"linking with action."),
90        default=u"_sub",
91        required=False)
Note: See TracBrowser for help on using the repository browser.