from zope import schema from zope.interface import Interface from quintagroup.dropdownmenu import _ class IDropDownMenuSettings(Interface): """Global dropdown menu settings. This describes records stored in the configuration registry and obtainable via plone.registry. """ show_content_tabs = schema.Bool( title=_(u"Show content tabs"), description=_(u"Use this setting to enable or disable content structure " u"based (autogenerated) portal tabs."), default=True) show_nonfolderish_tabs = schema.Bool( title=_(u"Show non-folderish content tabs"), description=_(u"Use this setting to enable or disable non-folderish " u"content structure based (autogenerated) portal tabs. " u"This setting doesn't make sense in case Show content " u"tabs is switched off."), default=True) content_before_actions_tabs = schema.Bool( title=_(u"Show content tabs before portal_actions tabs"), description=_(u"By default portal_actons based tabs are placed before " u"those autogenerated from content structure. Check this " u"option to revert the behaviour."), default=True) content_tabs_level = schema.Int( title=_(u"Content tabs level"), description=_(u"How many folders should be included before the " u"nested menu stops. 0 means no limit. 1 only includes " u"the root folder."), default=0) show_actions_tabs = schema.Bool( title=_(u"Show actions tabs"), description=_(u"Use this setting to enable or disable portal_actions " u"based portal tabs."), default=True) actions_tabs_level = schema.Int( title=_(u"Actions tabs level"), description=_(u"How many folders should be included before the " u"nested menu stops. 0 means no limit. 1 only includes " u"the root folder."), default=0) actions_category = schema.TextLine( title=_(u"Portal actions category"), description=_(u"Root portal actions tool's category name to extract " u"tabs from."), default=u"portal_tab") nested_category_prefix = schema.TextLine( title=_(u"Nested category prefix"), description=_(u"Because portal_actions category object couldn't serve as" u" action itself we need to create appropriate action " u"for it. Prefix and sufix strings are used to make up " u"id for category while linking action to action category." u"E.g.: action id is 'index_html', prefix is 'pre_', sufix" u" is equal to '_sub' then category object with id equal " u"to 'pre_index_html_sub' will be looked up on the same " u"level to get nested menu for 'index_html' action."), default=u"") nested_category_sufix = schema.TextLine( title=_(u"Nested category sufix"), description=_(u"Sufix part of the category id to be looked up during " u"linking with action."), default=u"_sub")