Commit fd212244 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add the property sheet SimpleItem.

Add many getter methods to sort lists.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@989 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0fcfeb8
...@@ -308,6 +308,7 @@ class BusinessTemplate(XMLObject): ...@@ -308,6 +308,7 @@ class BusinessTemplate(XMLObject):
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject , PropertySheet.XMLObject
, PropertySheet.SimpleItem
, PropertySheet.CategoryCore , PropertySheet.CategoryCore
, PropertySheet.BusinessTemplate , PropertySheet.BusinessTemplate
) )
...@@ -335,10 +336,10 @@ Une ligne tarifaire.""" ...@@ -335,10 +336,10 @@ Une ligne tarifaire."""
, 'permissions' : ( , 'permissions' : (
Permissions.View, ) Permissions.View, )
} }
, { 'id' : 'list' , { 'id' : 'history'
, 'name' : 'Object Contents' , 'name' : 'History'
, 'category' : 'object_action' , 'category' : 'object_view'
, 'action' : 'folder_contents' , 'action' : 'history_view'
, 'permissions' : ( , 'permissions' : (
Permissions.View, ) Permissions.View, )
} }
...@@ -354,11 +355,11 @@ Une ligne tarifaire.""" ...@@ -354,11 +355,11 @@ Une ligne tarifaire."""
, 'category' : 'object_view' , 'category' : 'object_view'
, 'action' : 'metadata_view' , 'action' : 'metadata_view'
, 'permissions' : ( , 'permissions' : (
Permissions.View, ) Permissions.ManageProperties, )
} }
, { 'id' : 'translate' , { 'id' : 'translate'
, 'name' : 'Translate' , 'name' : 'Translate'
, 'category' : 'object_action' , 'category' : 'object_exchange'
, 'action' : 'translation_template_view' , 'action' : 'translation_template_view'
, 'permissions' : ( , 'permissions' : (
Permissions.TranslateContent, ) Permissions.TranslateContent, )
...@@ -366,12 +367,13 @@ Une ligne tarifaire.""" ...@@ -366,12 +367,13 @@ Une ligne tarifaire."""
) )
} }
def getTemplateCatalogMethodIdList(self): def _getOrderedList(self, id):
""" """
We have to set this method because we want an We have to set this method because we want an
ordered list ordered list
""" """
result = getattr(self,'template_catalog_method_id',()) #LOG('BuisinessTemplate _getOrderedList', 0, 'id = %s' % repr(id))
result = getattr(self,id,())
if result is None: result = () if result is None: result = ()
if result != (): if result != ():
result = list(result) result = list(result)
...@@ -379,6 +381,54 @@ Une ligne tarifaire.""" ...@@ -379,6 +381,54 @@ Une ligne tarifaire."""
result = tuple(result) result = tuple(result)
return result return result
def getTemplateCatalogMethodIdList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_catalog_method_id')
def getTemplateBaseCategoryList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_base_category')
def getTemplateWorkflowIdList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_workflow_id')
def getTemplatePortalTypeIdList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_portal_type_id')
def getTemplateActionPathList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_action_path')
def getTemplateSkinIdList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_skin_id')
def getTemplateModuleIdList(self):
"""
We have to set this method because we want an
ordered list
"""
return self._getOrderedList('template_module_id')
def initInstance(self): def initInstance(self):
self._object_archive = PersistentMapping() self._object_archive = PersistentMapping()
......
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