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

Last change on this file since 3627 was 3514, checked in by kroman0, 12 years ago

Pep8 fixes

  • Property svn:eol-style set to native
File size: 3.6 KB
Line 
1# -*- coding: utf-8 -*-
2from zope import schema
3from zope.interface import Interface
4
5from plone.theme.interfaces import IDefaultPloneLayer
6from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
7
8from quintagroup.dropdownmenu import _
9
10cachings = SimpleVocabulary(
11    [SimpleTerm(value=u'anonymous', title=_(u'Cache only for anonymous')),
12     SimpleTerm(value=u'all', title=_(u'Cache for all users')), ]
13)
14
15
16class IDropDownMenuLayer(IDefaultPloneLayer):
17    """Request marker installed via browserlayer.xml.
18    """
19
20
21class IDropDownMenuSettings(Interface):
22    """Global dropdown menu settings. This describes records stored in the
23    configuration registry and obtainable via plone.registry.
24    """
25
26    show_icons = schema.Bool(
27        title=_(u"Show tabs icons"),
28        description=_(u"Use this setting to switch on/off icons for menu "
29                      u"items."),
30        default=False)
31
32    show_content_tabs = schema.Bool(
33        title=_(u"Show navigation strategy based dropdown menu"),
34        description=_(u"Use this setting to switch on/off navigation "
35                      u"strategy built dropdown menu"),
36        default=True)
37
38    show_nonfolderish_tabs = schema.Bool(
39        title=_(u"Show non-folderish menu items"),
40        description=_(u"Use this setting to switch on/off non-folderish "
41                      u"objects in navigation strategy based dropdown menu"),
42        default=True)
43
44    content_before_actions_tabs = schema.Bool(
45        title=_(u"Show content tabs before portal_actions tabs"),
46        description=_(u""),
47        default=False)
48
49    content_tabs_level = schema.Int(
50        title=_(u"Navigation strategy dropdown menu depth"),
51        description=_(u"How many levels folders to list after the "
52                      u"top level."),
53        default=0)
54
55    show_actions_tabs = schema.Bool(
56        title=_(u"Show actions tabs"),
57        description=_(u"Use this setting to enable/disable portal_actions "
58                      u"based dropdown menu"),
59        default=True)
60
61    actions_tabs_level = schema.Int(
62        title=_(u"Actions dropdown menu depth"),
63        description=_(u"How many levels of portal_actions to list after the "
64                      u"top level."),
65        default=0)
66
67    actions_category = schema.TextLine(
68        title=_(u"Root portal actions category"),
69        description=_(u"Root category id of portal_actions based dropdown "
70                      u"menu tree"),
71        default=u"portal_tabs")
72
73    nested_category_prefix = schema.TextLine(
74        title=_(u"Nested category prefix"),
75        description=_(u"Prefix of category id, used to bind category "
76                      u"with action"),
77        default=u"",
78        required=False)
79
80    nested_category_sufix = schema.TextLine(
81        title=_(u"Nested category sufix"),
82        description=_(u"Sufix of category id, used to bind category "
83                      u"with action"),
84        default=u"_sub",
85        required=False)
86
87    enable_caching = schema.Bool(
88        title=_(u"Enable menu caching"),
89        description=_(u"Caching of the menu viewlet improves page rendering "
90                      u"speed."),
91        default=True)
92
93    caching_strategy = schema.Choice(
94        title=_(u"Select caching strategy"),
95        description=_(u"Caching strategy defines how the cache key will be "
96                      u"built."),
97        default="anonymous",
98        vocabulary=cachings)
99
100    mobile_menu = schema.Bool(
101        title=_(u"Display menu as select for small screens"),
102        description=_(u"Use select tag to display menu for small screens"),
103        default=False)
Note: See TracBrowser for help on using the repository browser.