1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
# -*- coding: iso-8859-1 -*-
"""
ATSchemaEditorNG
(C) 2003,2004, Andreas Jung, ZOPYX Software Development and Consulting
and Contributors
D-72070 T�bingen, Germany
Contact: andreas@andreas-jung.com
License: see LICENSE.txt
$Id: __init__.py 977 2004-12-28 10:50:15Z ajung $
"""
from Products.CMFCore.DirectoryView import registerDirectory
from config import SKINS_DIR, GLOBALS
registerDirectory(SKINS_DIR, GLOBALS)
# make refresh possible
from SchemaEditor import SchemaEditor
from ParentManagedSchema import ParentManagedSchema
import Products.CMFCore
from Products.Archetypes import process_types
from Products.Archetypes.public import listTypes
from config import *
from Products.CMFCore.CMFCorePermissions import AddPortalContent
def initialize(context):
import examples.content
content_types, constructors, ftis = process_types(listTypes(PKG_NAME),
PKG_NAME)
import SchemaEditorTool as SET
context.registerClass(
SET.SchemaEditorTool,
permission='Add SchemaEditorTool',
constructors=(SET.manage_addSchemaEditorToolForm, SET.manage_addSchemaEditorTool),
icon='www/index.gif'
)
Products.CMFCore.utils.ContentInit(
'%s Example Content' % PKG_NAME,
content_types = content_types,
permission = AddPortalContent,
extra_constructors = constructors,
fti = ftis,
).initialize(context)
|