allow suppression of states portlet via flag 'hideStatesPortlet' in view
This commit is contained in:
		
							parent
							
								
									d07daca284
								
							
						
					
					
						commit
						68af0010aa
					
				
					 2 changed files with 3 additions and 0 deletions
				
			
		|  | @ -140,6 +140,7 @@ class BaseView(GenericView, I18NView): | ||||||
|     icon = None |     icon = None | ||||||
|     modeName = 'view' |     modeName = 'view' | ||||||
|     isToplevel = False |     isToplevel = False | ||||||
|  |     hideStatesPortlet = False | ||||||
| 
 | 
 | ||||||
|     def __init__(self, context, request): |     def __init__(self, context, request): | ||||||
|         context = baseObject(context) |         context = baseObject(context) | ||||||
|  |  | ||||||
|  | @ -50,6 +50,8 @@ statefulActions = ('classification_quality', | ||||||
| 
 | 
 | ||||||
| def registerStatesPortlet(controller, view, statesDefs, | def registerStatesPortlet(controller, view, statesDefs, | ||||||
|                           region='portlet_right', priority=98): |                           region='portlet_right', priority=98): | ||||||
|  |     if view.hideStatesPortlet: | ||||||
|  |         return | ||||||
|     cm = controller.macros |     cm = controller.macros | ||||||
|     stfs = [component.getAdapter(view.context, IStateful, name=std) |     stfs = [component.getAdapter(view.context, IStateful, name=std) | ||||||
|                 for std in statesDefs] |                 for std in statesDefs] | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue