Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 """Initialize CMFDiffTool Product"""
00002 
00003 import sys
00004 from Products.CMFCore.DirectoryView import registerDirectory
00005 from Products.CMFCore import utils
00006 from Products.CMFCore.permissions import AddPortalContent
00007 
00008 import Products.CMFDiffTool.CMFDiffTool
00009 import Products.CMFDiffTool.FieldDiff
00010 import Products.CMFDiffTool.TextDiff
00011 import Products.CMFDiffTool.ListDiff
00012 import Products.CMFDiffTool.BinaryDiff
00013 import Products.CMFDiffTool.ChangeSet
00014 import Products.CMFDiffTool.CMFDTHtmlDiff
00015 import Products.CMFDiffTool.ATCompoundDiff
00016 
00017 this_module = sys.modules[ __name__ ]
00018 product_globals = globals()
00019 tools = ( CMFDiffTool.CMFDiffTool,)
00020 
00021 contentConstructors = (ChangeSet.manage_addChangeSet,)
00022 contentClasses = (ChangeSet.ChangeSet,)
00023 
00024 # Make the skins available as DirectoryViews
00025 registerDirectory('skins', globals())
00026 registerDirectory('skins/ChangeSet', globals())
00027 
00028 CMFDiffTool.registerDiffType(BinaryDiff.BinaryDiff)
00029 CMFDiffTool.registerDiffType(FieldDiff.FieldDiff)
00030 CMFDiffTool.registerDiffType(ListDiff.ListDiff)
00031 CMFDiffTool.registerDiffType(TextDiff.TextDiff)
00032 CMFDiffTool.registerDiffType(CMFDTHtmlDiff.CMFDTHtmlDiff)
00033 CMFDiffTool.registerDiffType(ATCompoundDiff.ATCompoundDiff)
00034 
00035 def initialize(context):
00036     utils.ToolInit('CMF Diff Tool',
00037                     tools = tools,
00038                     icon='tool.gif' 
00039                     ).initialize( context )
00040 
00041     utils.ContentInit(ChangeSet.ChangeSet.meta_type,
00042                       content_types = contentClasses,
00043                       extra_constructors = contentConstructors,
00044                       permission = AddPortalContent).initialize(context)