2009-06-29 07:06:01 -05:00
|
|
|
<!codeHeader!>
|
|
|
|
from AccessControl import ClassSecurityInfo
|
2009-11-11 13:22:13 -06:00
|
|
|
from DateTime import DateTime
|
2009-06-29 07:06:01 -05:00
|
|
|
from Products.Archetypes.atapi import *
|
|
|
|
from Products.CMFCore.utils import UniqueObject
|
|
|
|
import Products.<!applicationName!>.config
|
|
|
|
from appy.gen.plone25.mixins.ToolMixin import ToolMixin
|
|
|
|
from Extensions.appyWrappers import AbstractWrapper, <!wrapperClass!>
|
|
|
|
|
|
|
|
schema = Schema((<!fields!>
|
|
|
|
),)
|
2010-08-05 11:23:17 -05:00
|
|
|
fullSchema = OrderedBaseFolderSchema.copy() + schema.copy()
|
2009-06-29 07:06:01 -05:00
|
|
|
|
2010-11-30 10:41:18 -06:00
|
|
|
class <!toolName!>(ToolMixin, UniqueObject, OrderedBaseFolder):
|
2009-06-29 07:06:01 -05:00
|
|
|
'''Tool for <!applicationName!>.'''
|
|
|
|
security = ClassSecurityInfo()
|
|
|
|
__implements__ = (getattr(UniqueObject,'__implements__',()),) + (getattr(OrderedBaseFolder,'__implements__',()),)
|
|
|
|
|
|
|
|
archetype_name = '<!toolName!>'
|
|
|
|
meta_type = '<!toolName!>'
|
|
|
|
portal_type = '<!toolName!>'
|
|
|
|
allowed_content_types = ()
|
|
|
|
filter_content_types = 0
|
|
|
|
global_allow = 0
|
|
|
|
#content_icon = '<!toolName!>.gif'
|
2009-10-18 07:52:27 -05:00
|
|
|
immediate_view = 'skyn/view'
|
|
|
|
default_view = 'skyn/view'
|
2009-06-29 07:06:01 -05:00
|
|
|
suppl_views = ()
|
|
|
|
typeDescription = "<!toolName!>"
|
|
|
|
typeDescMsgId = '<!toolName!>_edit_descr'
|
|
|
|
i18nDomain = '<!applicationName!>'
|
2010-10-14 07:43:56 -05:00
|
|
|
allMetaTypes = <!metaTypes!>
|
2009-06-29 07:06:01 -05:00
|
|
|
wrapperClass = <!wrapperClass!>
|
|
|
|
schema = fullSchema
|
|
|
|
schema["id"].widget.visible = False
|
|
|
|
schema["title"].widget.visible = False
|
2009-10-18 07:52:27 -05:00
|
|
|
# When browsing into the tool, the 'configure' portlet should be displayed.
|
2009-06-29 07:06:01 -05:00
|
|
|
left_slots = ['here/portlet_prefs/macros/portlet']
|
|
|
|
right_slots = []
|
2009-08-11 04:01:17 -05:00
|
|
|
for elem in dir(ToolMixin):
|
|
|
|
if not elem.startswith('__'): security.declarePublic(elem)
|
2009-06-29 07:06:01 -05:00
|
|
|
|
|
|
|
# Tool constructor has no id argument, the id is fixed.
|
|
|
|
def __init__(self, id=None):
|
|
|
|
OrderedBaseFolder.__init__(self, '<!toolInstanceName!>')
|
|
|
|
self.setTitle('<!applicationName!>')
|
|
|
|
<!commonMethods!>
|
|
|
|
<!methods!>
|
|
|
|
registerType(<!toolName!>, '<!applicationName!>')
|