Commit e5ff0528 authored by Sebastien Robin's avatar Sebastien Robin

add a list of types that should not be displayed to the user


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2511 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4cf09ca2
......@@ -57,17 +57,18 @@ class ERP5TypeInformation( FactoryTypeInformation ):
'label':'Init Script'},
{'id':'filter_content_types', 'type': 'boolean', 'mode':'w',
'label':'Filter content types?'},
{'id':'hide_from_add_menu'
, 'type': 'boolean'
, 'mode':'w'
, 'label':'Hide From Had Menu'
},
{'id':'allowed_content_types'
, 'type': 'multiple selection'
, 'mode':'w'
, 'label':'Allowed content types'
, 'select_variable':'listContentTypes'
},
{'id':'hidden_content_type_list'
, 'type': 'multiple selection'
, 'mode':'w'
, 'label':'Hidden content types'
, 'select_variable':'listContentTypes'
},
{'id':'property_sheet_list'
, 'type': 'multiple selection'
, 'mode':'w'
......@@ -87,7 +88,7 @@ class ERP5TypeInformation( FactoryTypeInformation ):
init_script = ''
product = 'ERP5Type'
immediate_view = 'view'
hide_from_add_menu = False
hidden_content_type_list = ()
#
# Acquisition editing interface
......@@ -96,12 +97,12 @@ class ERP5TypeInformation( FactoryTypeInformation ):
_actions_form = DTMLFile( 'editToolsActions', _dtmldir )
security.declarePublic('hideFromAddMenu')
def hideFromAddMenu(self):
def hidenFromAddMenu(self):
"""
Return only true or false if we should
hide from add menu
"""
return self.hide_from_add_menu
return self.hiden_from_add_menu
#
......@@ -132,6 +133,13 @@ class ERP5TypeInformation( FactoryTypeInformation ):
result.sort()
return result
security.declareProtected(ERP5Permissions.AccessContentsInformation, 'getHiddenContentTypeList')
def getHiddenContentTypeList( self ):
"""
Return list of content types.
"""
return self.hidden_content_type_list
security.declareProtected(ERP5Permissions.AccessContentsInformation, 'getBaseCategoryList')
def getBaseCategoryList( self ):
result = self.portal_categories.getBaseCategoryList()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment