| 1 | from Globals import package_home |
|---|
| 2 | from Products.CMFCore import utils, CMFCorePermissions, DirectoryView |
|---|
| 3 | from Products.CMFPlone.PloneUtilities import ToolInit |
|---|
| 4 | from Products.Archetypes.public import * |
|---|
| 5 | from Products.Archetypes import listTypes |
|---|
| 6 | from Products.Archetypes.utils import capitalize |
|---|
| 7 | |
|---|
| 8 | import os, os.path |
|---|
| 9 | |
|---|
| 10 | # Get configuration data, permissions |
|---|
| 11 | from Products.ATGoogleMaps.config import * |
|---|
| 12 | |
|---|
| 13 | # Register skin directories so they can be added to portal_skins |
|---|
| 14 | DirectoryView.registerDirectory('skins', GLOBALS) |
|---|
| 15 | DirectoryView.registerDirectory('skins/googlemaps', GLOBALS) |
|---|
| 16 | |
|---|
| 17 | def initialize(context): |
|---|
| 18 | |
|---|
| 19 | # Import the type, which results in registerType() being called |
|---|
| 20 | from content import GMap, GMarker |
|---|
| 21 | |
|---|
| 22 | # initialize the content, including types and add permissions |
|---|
| 23 | content_types, constructors, ftis = process_types( |
|---|
| 24 | listTypes(PROJECTNAME), |
|---|
| 25 | PROJECTNAME) |
|---|
| 26 | |
|---|
| 27 | utils.ContentInit( |
|---|
| 28 | PROJECTNAME + ' Content', |
|---|
| 29 | content_types = content_types, |
|---|
| 30 | permission = DEFAULT_ADD_CONTENT_PERMISSION, |
|---|
| 31 | extra_constructors = constructors, |
|---|
| 32 | fti = ftis, |
|---|
| 33 | ).initialize(context) |
|---|