allow suppression of states portlet via flag 'hideStatesPortlet' in view

This commit is contained in:
Helmut Merz 2014-08-12 13:13:22 +02:00
parent d07daca284
commit 68af0010aa
2 changed files with 3 additions and 0 deletions

View file

@ -140,6 +140,7 @@ class BaseView(GenericView, I18NView):
icon = None
modeName = 'view'
isToplevel = False
hideStatesPortlet = False
def __init__(self, context, request):
context = baseObject(context)

View file

@ -50,6 +50,8 @@ statefulActions = ('classification_quality',
def registerStatesPortlet(controller, view, statesDefs,
region='portlet_right', priority=98):
if view.hideStatesPortlet:
return
cm = controller.macros
stfs = [component.getAdapter(view.context, IStateful, name=std)
for std in statesDefs]