Skip to content

Instantly share code, notes, and snippets.

@davisagli
Created October 18, 2013 20:06
Show Gist options
  • Save davisagli/7047450 to your computer and use it in GitHub Desktop.
Save davisagli/7047450 to your computer and use it in GitHub Desktop.
Here's what configuring Plone would look like if ZCML were Python. Wonder if we can cut some of this out.
# --------------------------------------------------
# site.zcml
# --------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(package='Products.Five')
meta.redefinePermission(from_='zope2.Public', to='zope.Public')
# Load the meta
five.loadProducts(file='meta.zcml')
# Load the configuration
five.loadProducts()
# Load the configuration overrides
five.loadProductsOverrides()
zope.securityPolicy(component='AccessControl.security.SecurityPolicy')
# ----------------------------------------------------
# Products/Five/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(package='Zope2.App', file='configure.zcml')
zope.include(file='meta.zcml')
zope.include(file='permissions.zcml')
zope.include(package='.component')
zope.include(package='.browser')
zope.include(package='.skin')
zope.include(package='.utilities')
zope.include(package='.viewlet')
# ----------------------------------------------------
# Zope2/App/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(file='exclude.zcml')
zope.include(file='meta.zcml')
zope.include(package='AccessControl', file='permissions.zcml')
zope.include(package='zope.traversing')
zope.include(package='OFS ')
zope.include(package='ZPublisher')
# ----------------------------------------------------
# Zope2/App/exclude.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.exclude(package='zope.browserpage', file='meta.zcml')
zope.exclude(package='zope.browsermenu', file='meta.zcml')
zope.exclude(package='zope.browserresource', file='meta.zcml')
zope.exclude(package='zope.publisher', file='meta.zcml')
zope.exclude(package='zope.viewlet', file='meta.zcml')
# ----------------------------------------------------
# Zope2/App/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
zope.include(package='AccessControl', file='meta.zcml')
zope.include(package='OFS', file='meta.zcml')
zope.include(package='zope.component', file='meta.zcml')
zope.include(package='zope.i18n', file='meta.zcml')
with meta.directives__cm(namespace='http://namespaces.zope.org/zope'):
meta.directive(name='view', schema='zope.component.zcml.IViewDirective', handler='zope.component.zcml.view')
# ----------------------------------------------------
# AccessControl/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
zope.include(package='zope.component', file='meta.zcml')
zope.include(package='zope.security', file='meta.zcml')
with meta.directives__cm(namespace='http://namespaces.zope.org/zope'):
with meta.complexDirective__cm(name='class', schema='zope.security.metadirectives.IClassDirective', handler='.metaconfigure.ClassDirective'):
meta.subdirective(name='implements', schema='zope.security.metadirectives.IImplementsSubdirective')
meta.subdirective(name='require', schema='zope.security.metadirectives.IRequireSubdirective')
meta.subdirective(name='allow', schema='zope.security.metadirectives.IAllowSubdirective')
meta.directive(name='securityPolicy', schema='zope.security.zcml.ISecurityPolicyDirective', handler='zope.security.zcml.securityPolicy')
meta.groupingDirective(name='permission', schema='zope.security.zcml.IPermissionDirective', handler='.security.PermissionDirective')
meta.directive(name='role', usedIn='zope.security.zcml.IPermissionDirective', schema='.security.IRoleDirective', handler='.security.RoleDirective')
# ----------------------------------------------------
# zope/component/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/zope'):
meta.directive(name='interface', schema='zope.component.zcml.IInterfaceDirective', handler='zope.component.zcml.interface')
meta.directive(name='adapter', schema='zope.component.zcml.IAdapterDirective', handler='zope.component.zcml.adapter')
meta.directive(name='subscriber', schema='zope.component.zcml.ISubscriberDirective', handler='zope.component.zcml.subscriber')
meta.directive(name='utility', schema='zope.component.zcml.IUtilityDirective', handler='zope.component.zcml.utility')
meta.directive(name='view', schema='zope.component.zcml.IViewDirective', handler='zope.component.zcml.view')
meta.directive(name='resource', schema='zope.component.zcml.IResourceDirective', handler='zope.component.zcml.resource')
# ----------------------------------------------------
# zope/security/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
meta.directive(namespace='http://namespaces.zope.org/zope', name='permission', schema='.zcml.IPermissionDirective', handler='.zcml.permission')
meta.directive(name='securityPolicy', namespace='http://namespaces.zope.org/zope', schema='.zcml.ISecurityPolicyDirective', handler='.zcml.securityPolicy')
meta.directive(name='redefinePermission', namespace='http://namespaces.zope.org/meta', schema='.zcml.IRedefinePermission', handler='.zcml.redefinePermission')
with meta.directives__cm(namespace='http://namespaces.zope.org/zope'):
with meta.complexDirective__cm(name='class', schema='.metadirectives.IClassDirective', handler='.metaconfigure.ClassDirective'):
meta.subdirective(name='implements', schema='.metadirectives.IImplementsSubdirective')
meta.subdirective(name='require', schema='.metadirectives.IRequireSubdirective')
meta.subdirective(name='allow', schema='.metadirectives.IAllowSubdirective')
meta.subdirective(name='factory', schema='.metadirectives.IFactorySubdirective')
meta.groupingDirective(name='module', namespace='http://namespaces.zope.org/zope', schema='.metadirectives.IModule', handler='zope.configuration.config.GroupingContextDecorator')
meta.directive(name='allow', namespace='http://namespaces.zope.org/zope', schema='.metadirectives.IAllow', handler='.metaconfigure.allow')
meta.directive(name='require', namespace='http://namespaces.zope.org/zope', schema='.metadirectives.IRequire', handler='.metaconfigure.require')
# ----------------------------------------------------
# OFS/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/five'):
meta.directive(name='loadProducts', schema='zope.configuration.xmlconfig.IInclude', handler='.metaconfigure.loadProducts')
meta.directive(name='loadProductsOverrides', schema='zope.configuration.xmlconfig.IInclude', handler='.metaconfigure.loadProductsOverrides')
meta.directive(name='deprecatedManageAddDelete', schema='.metadirectives.IDeprecatedManageAddDeleteDirective', handler='.metaconfigure.deprecatedManageAddDelete')
meta.directive(name='registerClass', schema='.metadirectives.IRegisterClassDirective', handler='.metaconfigure.registerClass')
meta.directive(name='registerPackage', schema='.metadirectives.IRegisterPackageDirective', handler='.metaconfigure.registerPackage')
# ----------------------------------------------------
# zope/i18n/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/i18n'):
meta.directive(name='registerTranslations', schema='zope.i18n.zcml.IRegisterTranslationsDirective', handler='zope.i18n.zcml.registerTranslations')
# ----------------------------------------------------
# AccessControl/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='Zope2'):
with zope.permission__cm(id='zope2.Public', title='Public, everyone can access'):
zope.role(name='Anonymous')
zope.permission(id='zope2.Private', title='Private, only accessible from trusted code')
zope.permission(id='zope2.AccessContentsInformation', title='Access contents information')
zope.permission(id='zope2.ChangeImagesFiles', title='Change Images and Files')
zope.permission(id='zope2.ChangeConfig', title='Change configuration')
zope.permission(id='zope2.ChangePermissions', title='Change permissions')
zope.permission(id='zope2.CopyOrMove', title='Copy or Move')
zope.permission(id='zope2.DefinePermissions', title='Define permissions')
zope.permission(id='zope2.DeleteObjects', title='Delete objects')
zope.permission(id='zope2.FTPAccess', title='FTP access')
zope.permission(id='zope2.ImportExport', title='Import/Export objects')
zope.permission(id='zope2.ManageProperties', title='Manage properties')
zope.permission(id='zope2.ManageUsers', title='Manage users')
zope.permission(id='zope2.Undo', title='Undo changes')
zope.permission(id='zope2.View', title='View')
zope.permission(id='zope2.ViewHistory', title='View History')
zope.permission(id='zope2.ViewManagementScreens', title='View management screens')
zope.permission(id='zope2.WebDAVLock', title='WebDAV Lock items')
zope.permission(id='zope2.WebDAVUnlock', title='WebDAV Unlock items')
zope.permission(id='zope2.WebDAVAccess', title='WebDAV access')
# ----------------------------------------------------
# zope/traversing/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope.adapter(for_='*', factory='zope.traversing.adapters.Traverser', provides='zope.traversing.interfaces.ITraverser')
zope.adapter(for_='*', factory='zope.traversing.adapters.DefaultTraversable', provides='zope.traversing.interfaces.ITraversable')
zope.adapter(name='etc', provides='zope.traversing.interfaces.ITraversable', for_='*', factory='zope.traversing.namespace.etc')
zope.adapter(name='etc', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.etc')
zope.adapter(name='attribute', provides='zope.traversing.interfaces.ITraversable', for_='*', factory='zope.traversing.namespace.attr')
zope.adapter(name='attribute', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.attr')
zope.adapter(name='adapter', provides='zope.traversing.interfaces.ITraversable', for_='*', factory='zope.traversing.namespace.adapter')
zope.adapter(name='adapter', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.adapter')
zope.adapter(name='item', provides='zope.traversing.interfaces.ITraversable', for_='*', factory='zope.traversing.namespace.item')
zope.adapter(name='item', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.item')
zope.adapter(name='acquire', provides='zope.traversing.interfaces.ITraversable', for_='*', factory='zope.traversing.namespace.acquire')
zope.adapter(name='acquire', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.acquire')
zope.adapter(name='view', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.view')
zope.adapter(name='resource', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.resource')
zope.adapter(name='lang', provides='zope.traversing.interfaces.ITraversable', for_='*', factory='zope.traversing.namespace.lang')
zope.adapter(name='lang', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.lang')
zope.adapter(name='skin', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.skin')
zope.adapter(name='vh', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.vh')
# The debug namespace allows acess to things that should not normally be
# visible (e.g. file system read acces).
#
# See issue 507 for the rationale of binding this to developer-mode only.
#
if config.eval_condition('have devmode'):
zope.adapter(name='debug', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='zope.traversing.namespace.debug')
# ----------------------------------------------------
# OFS/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(file='deprecated.zcml')
zope.include(file='event.zcml')
# ----------------------------------------------------
# OFS/deprecated.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
five.deprecatedManageAddDelete(class_='OFS.userfolder.BasicUserFolder')
five.deprecatedManageAddDelete(class_='HelpSys.HelpTopic.HelpTopicBase')
five.deprecatedManageAddDelete(class_='OFS.Cache.CacheManager')
five.deprecatedManageAddDelete(class_='Products.Sessions.BrowserIdManager.BrowserIdManager')
five.deprecatedManageAddDelete(class_='Products.Sessions.SessionDataManager.SessionDataManager')
five.deprecatedManageAddDelete(class_='Products.SiteAccess.VirtualHostMonster.VirtualHostMonster')
five.deprecatedManageAddDelete(class_='Products.SiteAccess.SiteRoot.Traverser')
five.deprecatedManageAddDelete(class_='Products.SiteErrorLog.SiteErrorLog.SiteErrorLog')
five.deprecatedManageAddDelete(class_='Products.ZCatalog.CatalogAwareness.CatalogAware')
five.deprecatedManageAddDelete(class_='Products.ZCatalog.CatalogPathAwareness.CatalogAware')
# ----------------------------------------------------
# OFS/event.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# Enable object event dispatcher
zope.include(package='zope.component')
# Adapter giving sublocations for ObjectManagers, used
# by dispatchToSublocations
zope.adapter(factory='.subscribers.ObjectManagerSublocations')
# dispatch IObjectWillBeMovedEvent with "bottom-up" semantics
zope.subscriber(handler='.subscribers.dispatchObjectWillBeMovedEvent')
# dispatch IObjectMovedEvent with "top-down" semantics
zope.subscriber(handler='.subscribers.dispatchObjectMovedEvent')
# dispatch IObjectClonedEvent with "top-down" semantics
zope.subscriber(handler='.subscribers.dispatchObjectClonedEvent')
# dispatch IObjectCopiedEvent with "top-down" semantics
zope.subscriber(handler='.subscribers.dispatchObjectCopiedEvent')
# ----------------------------------------------------
# zope/component/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.subscriber(handler='.event.objectEventNotify')
zope.subscriber(handler='.registry.dispatchUtilityRegistrationEvent')
zope.subscriber(handler='.registry.dispatchAdapterRegistrationEvent')
zope.subscriber(handler='.registry.dispatchSubscriptionAdapterRegistrationEvent')
zope.subscriber(handler='.registry.dispatchHandlerRegistrationEvent')
# ----------------------------------------------------
# ZPublisher/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(file='i18n.zcml')
zope.include(file='publisher.zcml')
# ----------------------------------------------------
# ZPublisher/i18n.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.utility(provides='zope.i18n.interfaces.INegotiator', component='zope.i18n.negotiator.negotiator')
zope.adapter(for_='zope.publisher.interfaces.http.IHTTPRequest', provides='zope.i18n.interfaces.IUserPreferredLanguages', factory='zope.publisher.browser.BrowserLanguages')
zope.adapter(for_='zope.publisher.interfaces.http.IHTTPRequest', provides='zope.i18n.interfaces.IUserPreferredCharsets', factory='zope.publisher.http.HTTPCharsets')
# ----------------------------------------------------
# ZPublisher/publisher.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.interface(interface='zope.publisher.interfaces.browser.IBrowserSkinType')
zope.interface(interface='zope.publisher.interfaces.browser.IDefaultBrowserLayer', type='zope.publisher.interfaces.browser.IBrowserSkinType')
with zope.class__cm(class_='ZPublisher.HTTPRequest.HTTPRequest'):
zope.implements(interface='zope.annotation.interfaces.IAttributeAnnotatable')
zope.adapter(name='default', factory='zope.publisher.browser.getDefaultSkin', for_='zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.publisher.interfaces.IDefaultSkin')
# ----------------------------------------------------
# Products/Five/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
zope.include(package='Zope2.App', file='meta.zcml')
zope.include(package='.browser', file='meta.zcml')
with meta.directives__cm(namespace='http://namespaces.zope.org/five'):
# specific to Five
meta.directive(name='sizable', schema='.fivedirectives.ISizableDirective', handler='.sizeconfigure.sizable')
meta.directive(name='pagesFromDirectory', schema='.fivedirectives.IPagesFromDirectoryDirective', handler='.fiveconfigure.pagesFromDirectory')
# Deprecated, use the class directive instead.
meta.directive(name='implements', schema='.fivedirectives.IImplementsDirective', handler='.fiveconfigure.implements')
# ----------------------------------------------------
# Products/Five/browser/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/browser'):
# browser menus
meta.directive(name='menu', schema='zope.browsermenu.metadirectives.IMenuDirective', handler='zope.browsermenu.metaconfigure.menuDirective')
with meta.complexDirective__cm(name='menuItems', schema='zope.browsermenu.metadirectives.IMenuItemsDirective', handler='zope.browsermenu.metaconfigure.menuItemsDirective'):
meta.subdirective(name='menuItem', schema='zope.browsermenu.metadirectives.IMenuItemSubdirective')
meta.directive(name='menuItem', schema='zope.browsermenu.metadirectives.IMenuItemDirective', handler='zope.browsermenu.metaconfigure.menuItemDirective')
meta.directive(name='addMenuItem', schema='zope.browsermenu.metadirectives.IAddMenuItemDirective', handler='zope.browsermenu.metaconfigure.addMenuItem')
# browser views
with meta.complexDirective__cm(name='view', schema='.metaconfigure.IFiveViewDirective', handler='.metaconfigure.view'):
meta.subdirective(name='page', schema='zope.browserpage.metadirectives.IViewPageSubdirective')
meta.subdirective(name='defaultPage', schema='zope.browserpage.metadirectives.IViewDefaultPageSubdirective')
meta.directive(name='defaultView', schema='zope.publisher.zcml.IDefaultViewDirective', handler='zope.publisher.zcml.defaultView')
# browser pages
meta.directive(name='page', schema='zope.browserpage.metadirectives.IPageDirective', handler='.metaconfigure.page')
with meta.complexDirective__cm(name='pages', schema='zope.browserpage.metadirectives.IPagesDirective', handler='.metaconfigure.pages'):
meta.subdirective(name='page', schema='zope.browserpage.metadirectives.IPagesPageSubdirective')
# browser resources
meta.directive(name='resource', schema='zope.browserresource.metadirectives.IResourceDirective', handler='.metaconfigure.resource')
meta.directive(name='resourceDirectory', schema='zope.browserresource.metadirectives.IResourceDirectoryDirective', handler='.metaconfigure.resourceDirectory')
# misc. directives
meta.directive(name='defaultSkin', schema='zope.publisher.zcml.IDefaultSkinDirective', handler='zope.publisher.zcml.defaultSkin')
# ----------------------------------------------------
# Products/Five/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='Five'):
zope.permission(id='five.ManageSite', title='Manage Five local sites')
# ----------------------------------------------------
# Products/Five/component/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(factory='.siteManagerAdapter')
zope.subscriber(for_='zope.location.interfaces.ISite zope.traversing.interfaces.IBeforeTraverseEvent', handler='zope.site.site.threadSiteSubscriber')
zope.subscriber(for_='zope.publisher.interfaces.IEndRequestEvent', handler='zope.site.site.clearThreadSiteSubscriber')
browser.page(for_='OFS.interfaces.IObjectManager', name='components.html', class_='.browser.ObjectManagerSiteView', template='components.pt', permission='five.ManageSite')
# ----------------------------------------------------
# Products/Five/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.interface(interface='zope.browsermenu.interfaces.IMenuItemType')
zope.include(package='OFS', file='absoluteurl.zcml')
with browser.view__cm(for_='OFS.interfaces.IObjectManager', name='+', class_='.adding.ContentAdding', permission='zope2.ViewManagementScreens'):
browser.page(name='index.html', template='adding.pt')
browser.page(name='action.html', attribute='action')
zope.adapter(for_='OFS.interfaces.IObjectManager', factory='.adding.ObjectManagerNameChooser', provides='zope.container.interfaces.INameChooser')
# Menu access
browser.page(for_='*', name='view_get_menu', permission='zope.Public', class_='zope.browsermenu.menu.MenuAccessView', allowed_interface='zope.browsermenu.interfaces.IMenuAccessView')
# ----------------------------------------------------
# OFS/absoluteurl.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='absolute_url', class_='.absoluteurl.AbsoluteURL', permission='zope.Public', allowed_interface='zope.traversing.browser.interfaces.IAbsoluteURL')
zope.view(for_='*', factory='.absoluteurl.AbsoluteURL', type='zope.publisher.interfaces.http.IHTTPRequest', permission='zope.Public', provides='zope.traversing.browser.interfaces.IAbsoluteURL')
browser.page(for_='.interfaces.ITraversable', name='absolute_url', class_='.absoluteurl.OFSTraversableAbsoluteURL', permission='zope.Public', allowed_interface='zope.traversing.browser.interfaces.IAbsoluteURL')
zope.view(for_='.interfaces.ITraversable', factory='.absoluteurl.OFSTraversableAbsoluteURL', type='zope.publisher.interfaces.http.IHTTPRequest', permission='zope.Public', provides='zope.traversing.browser.interfaces.IAbsoluteURL')
browser.page(for_='.interfaces.IApplication', name='absolute_url', class_='.absoluteurl.RootAbsoluteURL', permission='zope.Public', allowed_interface='zope.traversing.browser.interfaces.IAbsoluteURL')
zope.view(for_='.interfaces.IApplication', factory='.absoluteurl.RootAbsoluteURL', type='zope.publisher.interfaces.http.IHTTPRequest', permission='zope.Public', provides='zope.traversing.browser.interfaces.IAbsoluteURL')
# ----------------------------------------------------
# Products/Five/skin/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='standard_macros', permission='zope2.View', class_='.standardmacros.StandardMacros', allowed_interface='zope.interface.common.mapping.IItemMapping')
browser.page(for_='*', template='five_template.pt', name='five_template', permission='zope.Public')
# ----------------------------------------------------
# Products/Five/utilities/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='.browser')
zope.adapter(for_='*', provides='.interfaces.IMarkerInterfaces', factory='.marker.MarkerInterfacesAdapter', permission='zope2.ManageProperties')
# ----------------------------------------------------
# Products/Five/utilities/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='edit-markers.html', template='edit_markers.pt', class_='Products.Five.utilities.browser.marker.EditView', permission='zope2.ManageProperties')
browser.page(for_='*', name='manage_interfaces', template='manage_interfaces.pt', class_='Products.Five.utilities.browser.marker.EditView', permission='zope2.ManageProperties')
# ----------------------------------------------------
# Products/Five/viewlet/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(file='meta.zcml')
zope.interface(interface='zope.viewlet.interfaces.IViewletManager')
zope.interface(interface='zope.viewlet.interfaces.IViewletManager')
# ----------------------------------------------------
# Products/Five/viewlet/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/browser'):
meta.directive(name='viewlet', schema='zope.viewlet.metadirectives.IViewletDirective', handler='.metaconfigure.viewletDirective')
meta.directive(name='viewletManager', schema='zope.viewlet.metadirectives.IViewletManagerDirective', handler='.metaconfigure.viewletManagerDirective')
# ----------------------------------------------------
# Products/CMFCore/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
meta.directive(name='registerDirectory', namespace='http://namespaces.zope.org/cmf', schema='.zcml.IRegisterDirectoryDirective', handler='.zcml.registerDirectory')
# ----------------------------------------------------
# Products/CMFDefault/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='five.formlib', file='meta.zcml')
# ----------------------------------------------------
# five/formlib/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/browser'):
with meta.complexDirective__cm(name='editform', schema='zope.app.form.browser.metadirectives.IEditFormDirective', handler='.metaconfigure.EditFormDirective'):
meta.subdirective(name='widget', schema='zope.app.form.browser.metadirectives.IWidgetSubdirective')
with meta.complexDirective__cm(name='addform', schema='zope.app.form.browser.metadirectives.IAddFormDirective', handler='.metaconfigure.AddFormDirective'):
meta.subdirective(name='widget', schema='zope.app.form.browser.metadirectives.IWidgetSubdirective')
# ----------------------------------------------------
# Products/CMFPlone/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
# Register a feature; once this is in place, you can do
#
# zcml:condition="have plone-4"
#
# to register Plone 4-specific configuration
#
meta.provides(feature='plone-4')
meta.provides(feature='plone-41')
meta.provides(feature='plone-42')
meta.provides(feature='plone-43')
# Exclude directives need to be executed before the ZCML file would
# be loaded. Doing this during the meta.zcml phase ensures this.
# The functionality in the following packages is not used and might
# interfere with Plone's own.
zope.exclude(package='Products.CMFDefault.browser', file='configure.zcml')
zope.exclude(package='Products.CMFDefault.formlib', file='configure.zcml')
zope.exclude(package='Products.CMFDefault.upgrade', file='configure.zcml')
zope.include(package='Products.CMFCore', file='meta.zcml')
zope.include(package='Products.GenericSetup', file='meta.zcml')
zope.include(package='plone.app.portlets', file='meta.zcml')
# wicked
if config.eval_condition('installed wicked'):
zope.include(package='wicked.fieldevent', file='meta.zcml')
# z3c.autoinclude's `includePlugins` directive finds
# and executes ZCML files from any installed packages
# that provide an entry point to declare themselves a
# plone plugin
zope.include(package='z3c.autoinclude', file='meta.zcml')
if config.eval_condition('not-have disable-autoinclude'):
zope.includePlugins(package='plone', file='meta.zcml')
# ----------------------------------------------------
# Products/GenericSetup/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/genericsetup'):
meta.directive(name='registerProfile', schema='.zcml.IRegisterProfileDirective', handler='.zcml.registerProfile')
meta.directive(name='exportStep', schema='.zcml.IExportStepDirective', handler='.zcml.exportStep')
with meta.complexDirective__cm(name='importStep', schema='.zcml.IImportStepDirective', handler='.zcml.importStep'):
meta.subdirective(name='depends', schema='.zcml.IImportStepDependsDirective')
meta.directive(name='upgradeStep', schema='.zcml.IUpgradeStepDirective', handler='.zcml.upgradeStep')
meta.directive(name='upgradeDepends', schema='.zcml.IUpgradeDependsDirective', handler='.zcml.upgradeDepends')
with meta.complexDirective__cm(name='upgradeSteps', schema='.zcml.IUpgradeStepsDirective', handler='.zcml.upgradeSteps'):
meta.subdirective(name='upgradeStep', schema='.zcml.IUpgradeStepsStepSubDirective')
meta.subdirective(name='upgradeDepends', schema='.zcml.IUpgradeDependsSubDirective')
# ----------------------------------------------------
# plone/app/portlets/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.plone.org/plone'):
meta.directive(name='portlet', schema='.metadirectives.IPortletDirective', handler='.metaconfigure.portletDirective')
meta.directive(name='portletRenderer', schema='.metadirectives.IPortletRendererDirective', handler='.metaconfigure.portletRendererDirective')
# ----------------------------------------------------
# z3c/autoinclude/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/zope'):
meta.directive(name='includeDependencies', schema='.zcml.IIncludeDependenciesDirective', handler='.zcml.includeDependenciesDirective')
meta.directive(name='includeDependenciesOverrides', schema='.zcml.IIncludeDependenciesDirective', handler='.zcml.includeDependenciesOverridesDirective')
meta.directive(name='includePlugins', schema='.zcml.IIncludePluginsDirective', handler='.zcml.includePluginsDirective')
meta.directive(name='includePluginsOverrides', schema='.zcml.IIncludePluginsDirective', handler='.zcml.includePluginsOverridesDirective')
# ----------------------------------------------------
# plone/behavior/meta.zcml
# ----------------------------------------------------
def includeme(config):
meta = config.get_namespace('http://namespaces.zope.org/meta')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with meta.configure__cm(i18n_domain='plone.behavior'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with meta.directives__cm(namespace='http://namespaces.plone.org/plone'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.directive(name='behavior', schema='.metaconfigure.IBehaviorDirective', handler='.metaconfigure.behaviorDirective')
# ----------------------------------------------------
# plone/contentrules/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='.rule', file='meta.zcml')
# ----------------------------------------------------
# plone/contentrules/rule/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.plone.org/plone'):
meta.directive(name='ruleCondition', schema='.metadirectives.IRuleConditionDirective', handler='.metaconfigure.ruleConditionDirective')
meta.directive(name='ruleAction', schema='.metadirectives.IRuleActionDirective', handler='.metaconfigure.ruleActionDirective')
# ----------------------------------------------------
# plone/dexterity/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.dexterity'):
# Include ZCML directive from plone.behavior
zope.include(package='plone.behavior', file='meta.zcml')
# ----------------------------------------------------
# plone/keyring/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('installed Products.GenericSetup'):
zope.include(package='Products.GenericSetup', file='meta.zcml')
# ----------------------------------------------------
# plone/resource/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
meta.directive(name='static', namespace='http://namespaces.plone.org/plone', schema='.zcml.IResourceDirectoryDirective', handler='.zcml.registerResourceDirectory')
# ----------------------------------------------------
# plone/session/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='Products.Five', file='meta.zcml')
zope.include(package='plone.keyring', file='meta.zcml')
# ----------------------------------------------------
# plone/app/kss/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope.include(package='kss.core', file='meta.zcml')
# ----------------------------------------------------
# kss/core/meta.zcml
# ----------------------------------------------------
def includeme(config):
meta = config.get_namespace('http://namespaces.zope.org/meta')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with meta.configure__cm():
#include package=".configfeature" file="meta.zcml"/
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.include(package='.pluginregistry', file='meta.zcml')
# ----------------------------------------------------
# kss/core/pluginregistry/meta.zcml
# ----------------------------------------------------
def includeme(config):
meta = config.get_namespace('http://namespaces.zope.org/meta')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with meta.configure__cm():
# XXX concatresource is now included locally.
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.include(package='._concatresource', file='meta.zcml')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with meta.directives__cm(namespace='http://namespaces.zope.org/kss'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.directive(name='eventtype', schema='.directives.IRegisterEventTypeDirective', handler='.configure.registerEventType')
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.directive(name='action', schema='.directives.IRegisterActionDirective', handler='.configure.registerAction')
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.directive(name='selectortype', schema='.directives.IRegisterSelectorTypeDirective', handler='.configure.registerSelectorType')
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.directive(name='commandset', schema='.directives.IRegisterCommandSetDirective', handler='.configure.registerCommandSet')
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta.directive(name='paramprovider', schema='.directives.IRegisterParamProviderDirective', handler='.configure.registerParamProvider')
# ----------------------------------------------------
# kss/core/pluginregistry/_concatresource/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/browser'):
meta.directive(name='concatresource', schema='.directives.IConcatResourceDirective', handler='.meta.concatresource')
# ----------------------------------------------------
# Products/PluggableAuthService/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
meta.directive(name='registerMultiPlugin', namespace='http://namespaces.zope.org/pluggableauthservice', schema='.zcml.IRegisterMultiPlugin', handler='.zcml.registerMultiPlugin')
# ----------------------------------------------------
# Products/ATContentTypes/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('installed Products.LinguaPlone'):
zope.include(package='Products.LinguaPlone')
zope.include(file='browser.zcml')
zope.include(package='.exportimport')
zope.include(package='plone.i18n.normalizer')
zope.include(package='archetypes.referencebrowserwidget')
five.deprecatedManageAddDelete(class_='.content.document.ATDocument')
five.deprecatedManageAddDelete(class_='.content.event.ATEvent')
five.deprecatedManageAddDelete(class_='.content.file.ATFile')
five.deprecatedManageAddDelete(class_='.content.folder.ATFolder')
five.deprecatedManageAddDelete(class_='.content.folder.ATBTreeFolder')
five.deprecatedManageAddDelete(class_='.content.image.ATImage')
five.deprecatedManageAddDelete(class_='.content.link.ATLink')
five.deprecatedManageAddDelete(class_='.content.newsitem.ATNewsItem')
five.deprecatedManageAddDelete(class_='.content.topic.ATTopic')
five.deprecatedManageAddDelete(class_='.criteria.base.ATBaseCriterion')
zope.adapter(factory='Products.Archetypes.uuid.referenceableUUID', provides='plone.uuid.interfaces.IUUID', for_='.criteria.path.ATPathCriterion')
# ----------------------------------------------------
# Products/ATContentTypes/browser.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Enable next/previous links for folders
zope.adapter(factory='.browser.nextprevious.ATFolderNextPrevious')
browser.view(for_='.interfaces.IATTopic', name='jsoncriteria', class_='.browser.criteria.JSONCriteriaForField', permission='zope2.View')
browser.page(for_='.interfaces.IATFolder', name='ics_view', class_='.browser.calendar.CalendarView', permission='zope2.View')
browser.page(for_='.interfaces.IATBTreeFolder', name='ics_view', class_='.browser.calendar.CalendarView', permission='zope2.View')
browser.page(for_='.interfaces.IATTopic', name='ics_view', class_='.browser.calendar.TopicCalendarView', permission='zope2.View')
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', name='ics_view', class_='.browser.calendar.CalendarView', permission='zope2.View')
browser.page(for_='Products.ATContentTypes.interfaces.file.IFileContent', name='download', class_='.browser.download.DownloadArchetypeFile', permission='zope2.View')
# ----------------------------------------------------
# Products/ATContentTypes/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='atcontenttypes'):
with genericsetup.importStep__cm(name='atcttool', title='ATContentTypes Tool', description='Import ATContentTypes specific configuration.', handler='.atcttool.importATCTTool'):
zope.depends(name='catalog')
zope.depends(name='componentregistry')
genericsetup.exportStep(name='atcttool', title='ATContentTypes Tool', description='Export ATContentTypes specific configuration.', handler='.atcttool.exportATCTTool')
zope.adapter(factory='.atcttool.ATCTToolXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.ATContentTypes.interfaces.IATCTTool Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.content.NullExporterAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.content.IDisabledExport')
zope.adapter(factory='Products.CMFCore.exportimport.content.StructureFolderWalkingAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.ATContentTypes.interfaces.IATContentType')
# ----------------------------------------------------
# plone/i18n/normalizer/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.utility(provides='.interfaces.IIDNormalizer', component='.idnormalizer', permission='zope.Public')
zope.utility(provides='.interfaces.IFileNameNormalizer', component='.filenamenormalizer', permission='zope.Public')
zope.utility(provides='.interfaces.IURLNormalizer', component='.urlnormalizer', permission='zope.Public')
zope.utility(name='de', provides='.interfaces.IFileNameNormalizer', component='.de.normalizer', permission='zope.Public')
zope.utility(name='de', provides='.interfaces.IURLNormalizer', component='.de.normalizer', permission='zope.Public')
zope.utility(name='el', provides='.interfaces.IFileNameNormalizer', component='.el.normalizer', permission='zope.Public')
zope.utility(name='el', provides='.interfaces.IURLNormalizer', component='.el.normalizer', permission='zope.Public')
zope.utility(name='fr', provides='.interfaces.IFileNameNormalizer', component='.fr.normalizer', permission='zope.Public')
zope.utility(name='fr', provides='.interfaces.IURLNormalizer', component='.fr.normalizer', permission='zope.Public')
zope.utility(name='ja', provides='.interfaces.IFileNameNormalizer', component='.ja.normalizer', permission='zope.Public')
zope.utility(name='ja', provides='.interfaces.IURLNormalizer', component='.ja.normalizer', permission='zope.Public')
zope.utility(name='pl', provides='.interfaces.IFileNameNormalizer', component='.pl.normalizer', permission='zope.Public')
zope.utility(name='pl', provides='.interfaces.IURLNormalizer', component='.pl.normalizer', permission='zope.Public')
zope.utility(name='pt', provides='.interfaces.IFileNameNormalizer', component='.pt.normalizer', permission='zope.Public')
zope.utility(name='pt', provides='.interfaces.IURLNormalizer', component='.pt.normalizer', permission='zope.Public')
zope.utility(name='ru', provides='.interfaces.IFileNameNormalizer', component='.ru.normalizer', permission='zope.Public')
zope.utility(name='ru', provides='.interfaces.IURLNormalizer', component='.ru.normalizer', permission='zope.Public')
zope.utility(name='tr', provides='.interfaces.IFileNameNormalizer', component='.tr.normalizer', permission='zope.Public')
zope.utility(name='tr', provides='.interfaces.IURLNormalizer', component='.tr.normalizer', permission='zope.Public')
zope.utility(name='bg', provides='.interfaces.IFileNameNormalizer', component='.bg.normalizer', permission='zope.Public')
zope.utility(name='bg', provides='.interfaces.IURLNormalizer', component='.bg.normalizer', permission='zope.Public')
zope.utility(name='uk', provides='.interfaces.IFileNameNormalizer', component='.uk.normalizer', permission='zope.Public')
zope.utility(name='uk', provides='.interfaces.IURLNormalizer', component='.uk.normalizer', permission='zope.Public')
zope.utility(name='es', provides='.interfaces.IFileNameNormalizer', component='.es.normalizer', permission='zope.Public')
zope.utility(name='es', provides='.interfaces.IURLNormalizer', component='.es.normalizer', permission='zope.Public')
zope.adapter(for_='zope.publisher.interfaces.http.IHTTPRequest', provides='.interfaces.IUserPreferredFileNameNormalizer', factory='.adapters.UserPreferredFileNameNormalizer')
zope.adapter(for_='zope.publisher.interfaces.http.IHTTPRequest', provides='.interfaces.IUserPreferredURLNormalizer', factory='.adapters.UserPreferredURLNormalizer')
# ----------------------------------------------------
# archetypes/referencebrowserwidget/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='atreferencebrowserwidget'):
five.registerPackage(package='.', initialize='.initialize')
cmf.registerDirectory(name='referencebrowser')
genericsetup.registerProfile(name='default', title='Referencebrowser widget', directory='profiles/default', description='An alternate referencebrowser implementation', provides='Products.GenericSetup.interfaces.EXTENSION')
zope.include(package='.browser')
# <class class="Products.ATBackRef.BackReferenceField"
# zcml:condition="installed Products.ATBackRef.BackReferenceField">
# <implements interface=".interfaces.IATBackRefereneceField" />
# </class>
with zope.class__cm(class_='Products.Archetypes.Field.ReferenceField'):
zope.implements(interface='.interfaces.IATReferenceField')
if config.eval_condition('installed plonerelations.ATField'):
with zope.class__cm(class_='plonerelations.ATField.ploneRelationsATField.PloneRelationsATField'):
zope.implements(interface='.interfaces.IPloneRelationsRefField')
if config.eval_condition('installed plonerelations.ATField'):
with zope.class__cm(class_='plonerelations.ATField.ploneRelationsATField.ReversePloneRelationsATField'):
zope.implements(interface='.interfaces.IPloneRelationsRevRefField')
zope.adapter(for_='Products.Archetypes.interfaces.IReferenceable .interfaces.IATReferenceField', factory='.adapter.ATReferenceAdapter', provides='.interfaces.IFieldRelation')
zope.adapter(for_='Products.Archetypes.interfaces.IReferenceable .interfaces.IATBackRefereneceField', factory='.adapter.ATBackReferenceAdapter', provides='.interfaces.IFieldRelation')
zope.adapter(for_='Products.Archetypes.interfaces.IReferenceable .interfaces.IPloneRelationsRefField', factory='.adapter.PloneRelationsAdapter', provides='.interfaces.IFieldRelation')
zope.adapter(for_='Products.Archetypes.interfaces.IReferenceable .interfaces.IPloneRelationsRevRefField', factory='.adapter.PloneRelationsRevAdapter', provides='.interfaces.IFieldRelation')
five.deprecatedManageAddDelete(class_='.demo.RefBrowserDemo')
# ----------------------------------------------------
# archetypes/referencebrowserwidget/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with browser.configure__cm(i18n_domain='atreferencebrowserwidget'):
# pages and views
browser.page(name='refbrowserhelper', permission='zope2.Public', for_='Products.Archetypes.interfaces.IReferenceable', allowed_interface='..interfaces.IReferenceBrowserHelperView', class_='.view.ReferenceBrowserHelperView')
browser.page(name='refbrowserhelper', permission='zope2.Public', for_='Products.ATContentTypes.interface.IATTopicCriterion', allowed_interface='..interfaces.IReferenceBrowserHelperView', class_='.view.ReferenceBrowserHelperView')
browser.page(name='refbrowser_popup', permission='zope2.Public', for_='*', class_='.view.ReferenceBrowserPopup')
browser.page(name='refbrowser_querycatalog', permission='zope2.Public', for_='*', class_='.view.QueryCatalogView')
zope.adapter(for_='Products.Five.BrowserView', factory='.view.default_popup_template', name='popup', provides='zope.formlib.namedtemplate.INamedTemplate')
# ----------------------------------------------------
# Products/ATReferenceBrowserWidget/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='archetypes.referencebrowserwidget')
# ----------------------------------------------------
# Products/Archetypes/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('installed plone.locking'):
zope.include(package='plone.locking')
if config.eval_condition('installed plone.i18n'):
zope.include(package='plone.i18n')
zope.include(package='plone.folder')
zope.include(package='plone.uuid')
zope.include(package='Products.CMFFormController')
zope.include(package='Products.CMFQuickInstallerTool')
zope.include(package='Products.MimetypesRegistry')
zope.include(package='Products.PortalTransforms')
zope.include(package='Products.statusmessages')
zope.include(file='implements.zcml')
zope.include(file='profiles.zcml')
zope.include(file='events.zcml')
zope.include(package='.exportimport')
zope.include(package='.Schema')
zope.include(package='.browser')
cmf.registerDirectory(name='skins', directory='skins', recursive='True')
zope.adapter(factory='.traverse.ImageTraverser')
zope.adapter(factory='.uuid.referenceableUUID')
five.deprecatedManageAddDelete(class_='.ReferenceEngine.Reference')
five.deprecatedManageAddDelete(class_='.references.CascadeReference')
five.deprecatedManageAddDelete(class_='.references.HoldingReference')
five.deprecatedManageAddDelete(class_='.examples.ATBIFolder.ATBIFolder')
five.deprecatedManageAddDelete(class_='.examples.DDocument.DDocument')
five.deprecatedManageAddDelete(class_='.examples.Fact.Fact')
five.deprecatedManageAddDelete(class_='.examples.RefNode.Refnode')
five.deprecatedManageAddDelete(class_='.examples.SimpleBTreeFolder.SimpleBTreeFolder')
five.deprecatedManageAddDelete(class_='.examples.SimpleFile.SimpleFile')
five.deprecatedManageAddDelete(class_='.examples.SimpleFolder.SimpleFolder')
five.deprecatedManageAddDelete(class_='.examples.SimpleType.SimpleProtectedType')
five.deprecatedManageAddDelete(class_='.examples.SimpleType.SimpleType')
zope.adapter(factory='.UIDCatalog.Title', name='Title')
zope.adapter(factory='.UIDCatalog.UID_indexer', name='UID')
# ----------------------------------------------------
# plone/locking/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(factory='.lockable.TTWLockable')
zope.include(package='Products.CMFCore', file='configure.zcml')
browser.page(for_='.interfaces.ITTWLockable', name='plone_lock_operations', class_='.browser.locking.LockingOperations', permission='cmf.ModifyPortalContent', allowed_attributes='safe_unlock force_unlock refresh_lock')
browser.page(for_='.interfaces.ITTWLockable', name='plone_lock_info', class_='.browser.locking.LockingInformation', permission='zope2.View', allowed_attributes='is_locked is_locked_for_current_user lock_is_stealable lock_info')
# ----------------------------------------------------
# Products/CMFCore/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='five.localsitemanager')
zope.include(file='permissions.zcml')
zope.include(package='.browser')
zope.include(package='.exportimport')
zope.include(file='content.zcml')
zope.include(file='event.zcml')
zope.include(file='tool.zcml')
# ----------------------------------------------------
# five/localsitemanager/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.subscriber(for_='Products.Five.component.interfaces.IObjectManagerSite zope.lifecycleevent.interfaces.IObjectMovedEvent', handler='.update_sitemanager_bases_handler')
# ----------------------------------------------------
# Products/CMFCore/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='cmf_default'):
# CMF Core Permissions
if config.eval_condition('installed AccessControl.security'):
zope.permission(id='cmf.ListFolderContents', title='List folder contents')
zope.permission(id='cmf.ListUndoableChanges', title='List undoable changes')
zope.permission(id='cmf.AccessInactivePortalContent', title='Access inactive portal content')
zope.permission(id='cmf.ManagePortal', title='Manage portal')
zope.permission(id='cmf.ModifyPortalContent', title='Modify portal content')
zope.permission(id='cmf.ManageProperties', title='Manage properties')
zope.permission(id='cmf.ListPortalMembers', title='List portal members')
zope.permission(id='cmf.AddPortalFolders', title='Add portal folders')
zope.permission(id='cmf.AddPortalContent', title='Add portal content')
zope.permission(id='cmf.AddPortalMember', title='Add portal member')
zope.permission(id='cmf.SetOwnPassword', title='Set own password')
zope.permission(id='cmf.SetOwnProperties', title='Set own properties')
zope.permission(id='cmf.MailForgottonPassword', title='Mail forgotten password')
zope.permission(id='cmf.RequestReview', title='Request review')
zope.permission(id='cmf.ReviewPortalContent', title='Review portal content')
zope.permission(id='cmf.AccessFuturePortalContent', title='Access future portal content')
# ----------------------------------------------------
# Products/CMFCore/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='cmf_default'):
with zope.configure__cm(package='Products.GenericSetup.browser'):
browser.page(for_='zope.browser.interfaces.IAdding', name='addAction.html', template='addWithPresettings.pt', class_='Products.CMFCore.browser.actions.ActionAddView', permission='cmf.ManagePortal')
browser.page(for_='zope.browser.interfaces.IAdding', name='addActionCategory.html', template='addWithPresettings.pt', class_='Products.CMFCore.browser.actions.ActionCategoryAddView', permission='cmf.ManagePortal')
browser.page(for_='zope.browser.interfaces.IAdding', name='addFactoryTypeInformation.html', template='addWithPresettings.pt', class_='Products.CMFCore.browser.typeinfo.FactoryTypeInformationAddView', permission='cmf.ManagePortal')
browser.page(for_='zope.browser.interfaces.IAdding', name='addScriptableTypeInformation.html', template='addWithPresettings.pt', class_='Products.CMFCore.browser.typeinfo.ScriptableTypeInformationAddView', permission='cmf.ManagePortal')
# ----------------------------------------------------
# Products/CMFCore/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_default'):
zope.adapter(factory='.content.StructureFolderWalkingAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.CMFCore.interfaces.IFolderish')
zope.adapter(factory='.content.StructureFolderWalkingAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.CMFCore.interfaces.IFolderish')
zope.adapter(factory='.actions.ActionCategoryNodeAdapter')
zope.adapter(factory='.actions.ActionNodeAdapter')
zope.adapter(factory='.actions.ActionsToolXMLAdapter')
zope.adapter(factory='.cachingpolicymgr.CachingPolicyNodeAdapter')
zope.adapter(factory='.cachingpolicymgr.CachingPolicyManagerXMLAdapter')
zope.adapter(factory='.contenttyperegistry.ContentTypeRegistryXMLAdapter')
zope.adapter(factory='.cookieauth.CookieCrumblerXMLAdapter')
zope.adapter(factory='.properties.PropertiesXMLAdapter')
zope.adapter(factory='.skins.DirectoryViewNodeAdapter')
zope.adapter(factory='.skins.SkinsToolXMLAdapter')
zope.adapter(factory='.typeinfo.TypeInformationXMLAdapter')
zope.adapter(factory='.typeinfo.TypesToolXMLAdapter')
zope.adapter(factory='.workflow.WorkflowToolXMLAdapter')
with genericsetup.importStep__cm(name='actions', title='Action Providers', description="Import actions tool's action providers and their actions.", handler='Products.CMFCore.exportimport.actions.importActionProviders'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='actions', title='Action Providers', description="Export actions tool's action providers and their actions.", handler='Products.CMFCore.exportimport.actions.exportActionProviders')
with genericsetup.importStep__cm(name='caching_policy_mgr', title='Caching Policies', description="Import caching policy manager's policies.", handler='Products.CMFCore.exportimport.cachingpolicymgr.importCachingPolicyManager'):
zope.depends(name='toolset')
genericsetup.exportStep(name='caching_policy_mgr', title='Caching Policies', description="Export caching policy manager's policies.", handler='Products.CMFCore.exportimport.cachingpolicymgr.exportCachingPolicyManager')
with genericsetup.importStep__cm(name='catalog', title='Catalog Tool', description="Import catalog tool's sub-objects, indexes and columns.", handler='Products.CMFCore.exportimport.catalog.importCatalogTool'):
zope.depends(name='toolset')
genericsetup.exportStep(name='catalog', title='Catalog Tool', description="Export catalog tool's sub-objects, indexes and columns.", handler='Products.CMFCore.exportimport.catalog.exportCatalogTool')
with genericsetup.importStep__cm(name='content_type_registry', title='Content Type Registry', description="Import content type registry's predicates and bindings.", handler='Products.CMFCore.exportimport.contenttyperegistry.importContentTypeRegistry'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='content_type_registry', title='Content Type Registry', description="Export content type registry's predicates / bindings.", handler='Products.CMFCore.exportimport.contenttyperegistry.exportContentTypeRegistry')
with genericsetup.importStep__cm(name='cookie_authentication', title='Cookie Authentication', description='Import cookie crumbler settings', handler='Products.CMFCore.exportimport.cookieauth.importCookieCrumbler'):
zope.depends(name='toolset')
genericsetup.exportStep(name='cookieauth', title='Cookie Authentication', description='Export cookie crumbler settings', handler='Products.CMFCore.exportimport.cookieauth.exportCookieCrumbler')
with genericsetup.importStep__cm(name='mailhost', title='MailHost', description='Import mailhost settings', handler='Products.CMFCore.exportimport.mailhost.importMailHost'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='mailhost', title='MailHost', description="Export the mailhost's settings and properties", handler='Products.CMFCore.exportimport.mailhost.exportMailHost')
genericsetup.importStep(name='properties', title='Site Properties', description='Import site properties.', handler='Products.CMFCore.exportimport.properties.importSiteProperties')
genericsetup.exportStep(name='properties', title='Site Properties', description='Export site properties.', handler='Products.CMFCore.exportimport.properties.exportSiteProperties')
with genericsetup.importStep__cm(name='skins', title='Skins Tool', description="Import skins tool's filesystem directory views and skin path definitions.", handler='Products.CMFCore.exportimport.skins.importSkinsTool'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='skins', title='Skins Tool', description="Export skins tool's filesystem directory views and skin path definitions.", handler='Products.CMFCore.exportimport.skins.exportSkinsTool')
with genericsetup.importStep__cm(name='typeinfo', title='Types Tool', description="Import types tool's type information objects.", handler='Products.CMFCore.exportimport.typeinfo.importTypesTool'):
zope.depends(name='toolset')
genericsetup.exportStep(name='typeinfo', title='Types Tool', description="Export types tool's type information objects.", handler='Products.CMFCore.exportimport.typeinfo.exportTypesTool')
with genericsetup.importStep__cm(name='workflow', title='Workflow Tool', description="Import workflow tool's workflow definitions and supporting scripts.", handler='Products.CMFCore.exportimport.workflow.importWorkflowTool'):
zope.depends(name='toolset')
genericsetup.exportStep(name='workflows', title='Workflow Tool', description="Export workflow tool's workflow definitions and supporting scripts.", handler='Products.CMFCore.exportimport.workflow.exportWorkflowTool')
# ----------------------------------------------------
# Products/CMFCore/content.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.adapter(name='add', factory='.namespace.AddViewTraverser')
five.registerClass(class_='.PortalFolder.PortalFolder', meta_type='Portal Folder', permission='cmf.AddPortalFolders')
zope.utility(component='.PortalFolder.PortalFolderFactory', name='cmf.folder')
five.registerClass(class_='.CMFBTreeFolder.CMFBTreeFolder', meta_type='CMF BTree Folder', permission='cmf.AddPortalFolders')
zope.utility(component='.CMFBTreeFolder.CMFBTreeFolderFactory', name='cmf.folder.btree')
# Default wrapper for indexing IContentish objects
zope.adapter(for_='.interfaces.ICatalogAware .interfaces.ICatalogTool', provides='.interfaces.IIndexableObject', factory='.CatalogTool.IndexableObjectWrapper')
# ----------------------------------------------------
# Products/CMFCore/event.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.subscriber(for_='.interfaces.ICachingPolicyManager zope.component.interfaces.IObjectEvent', handler='.CachingPolicyManager.handleCachingPolicyManagerEvent')
zope.subscriber(for_='.interfaces.ICookieCrumbler zope.component.interfaces.IObjectEvent', handler='.CookieCrumbler.handleCookieCrumblerEvent')
zope.subscriber(for_='.interfaces.IContentish zope.component.interfaces.IObjectEvent', handler='.CMFCatalogAware.handleContentishEvent')
zope.subscriber(for_='.interfaces.IDynamicType zope.lifecycleevent.interfaces.IObjectCopiedEvent', handler='.CMFCatalogAware.handleDynamicTypeCopiedEvent')
zope.subscriber(for_='.interfaces.IOpaqueItemManager zope.component.interfaces.IObjectEvent', handler='.CMFCatalogAware.dispatchToOpaqueItems')
zope.subscriber(for_='.interfaces.ICallableOpaqueItemEvents zope.component.interfaces.IObjectEvent', handler='.CMFCatalogAware.handleOpaqueItemEvent')
# ----------------------------------------------------
# Products/CMFCore/tool.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(file='permissions.zcml')
five.registerClass(class_='.ActionInformation.ActionCategory', meta_type='CMF Action Category', addview='addActionCategory.html', permission='cmf.ManagePortal', global_='False')
five.registerClass(class_='.ActionInformation.Action', meta_type='CMF Action', addview='addAction.html', permission='cmf.ManagePortal', global_='False')
five.registerClass(class_='.TypesTool.FactoryTypeInformation', meta_type='Factory-based Type Information', addview='addFactoryTypeInformation.html', permission='cmf.ManagePortal', global_='False')
five.registerClass(class_='.TypesTool.ScriptableTypeInformation', meta_type='Scriptable Type Information', addview='addScriptableTypeInformation.html', permission='cmf.ManagePortal', global_='False')
zope.utility(component='.MemberDataTool.memberFactory', name='MemberData')
# ----------------------------------------------------
# plone/i18n/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='.locales')
zope.include(package='.normalizer')
# ----------------------------------------------------
# plone/i18n/locales/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='.browser')
zope.utility(provides='.interfaces.ICountryAvailability', component='.countries.countries', permission='zope.Public')
zope.utility(provides='.interfaces.IContentLanguageAvailability', component='.languages.contentlanguages', permission='zope.Public')
zope.utility(provides='.interfaces.IMetadataLanguageAvailability', component='.languages.metadatalanguages', permission='zope.Public')
zope.utility(provides='.interfaces.ICcTLDInformation', component='.cctld.ccTLDInformation', permission='zope.Public')
# ----------------------------------------------------
# plone/i18n/locales/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.resourceDirectory(name='country-flags', directory='country-flags')
browser.resourceDirectory(name='language-flags', directory='language-flags')
# ----------------------------------------------------
# plone/folder/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.folder'):
zope.adapter(factory='.default.DefaultOrdering')
zope.adapter(factory='.unordered.UnorderedOrdering', name='unordered')
zope.adapter(factory='.partial.PartialOrdering', name='partial')
# ----------------------------------------------------
# plone/uuid/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.uuid'):
zope.include(package='zope.component', file='meta.zcml')
zope.include(package='zope.component')
# Make sure we test the Zope 2 version of view registrations in Zope 2
if config.eval_condition('installed Products.Five'):
zope.include(package='Products.Five.browser', file='meta.zcml')
if config.eval_condition('not-installed Products.Five'):
zope.include(package='zope.browserpage', file='meta.zcml')
zope.adapter(factory='.adapter.attributeUUID')
zope.adapter(factory='.adapter.MutableAttributeUUID')
zope.utility(factory='.generator.UUID1Generator')
zope.subscriber(handler='.handlers.addAttributeUUID')
browser.view(name='uuid', class_='.browser.UUIDView', for_='.interfaces.IUUIDAware', permission='zope.Public')
# ----------------------------------------------------
# Products/CMFFormController/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(file='profiles.zcml')
zope.include(package='.exportimport')
five.deprecatedManageAddDelete(class_='.ControllerPageTemplate.ControllerPageTemplate')
five.deprecatedManageAddDelete(class_='.ControllerPythonScript.ControllerPythonScript')
five.deprecatedManageAddDelete(class_='.ControllerValidator.ControllerValidator')
five.deprecatedManageAddDelete(class_='.FSControllerPageTemplate.FSControllerPageTemplate')
# ----------------------------------------------------
# Products/CMFFormController/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='CMFFormController', title='CMFFormController', directory='profiles/default', description='Extension profile for default CMFFormController setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/CMFFormController/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.controllerpythonscript.ControllerPythonScriptBodyAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFFormController.interfaces.IControllerPythonScript Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.controllervalidator.ControllerValidatorBodyAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFFormController.interfaces.IControllerValidator Products.GenericSetup.interfaces.ISetupEnviron')
# ----------------------------------------------------
# Products/CMFQuickInstallerTool/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmfquickinstallertool'):
genericsetup.registerProfile(name='CMFQuickInstallerTool', title='CMFQuickInstallerTool', directory='profiles/default', description='Extension profile for CMFQuickInstallerTool.', provides='Products.GenericSetup.interfaces.EXTENSION')
if config.eval_condition('installed Products.GenericSetup.events'):
zope.subscriber(handler='.events.handleBeforeProfileImportEvent')
if config.eval_condition('installed Products.GenericSetup.events'):
zope.subscriber(handler='.events.handleProfileImportedEvent')
zope.utility(factory='.QuickInstallerTool.HiddenProducts', name='Products.CMFQuickInstallerTool')
# ----------------------------------------------------
# Products/MimetypesRegistry/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='Products.MimetypesRegistry'):
cmf.registerDirectory(name='skins', directory='skins', recursive='True')
genericsetup.registerProfile(name='MimetypesRegistry', title='MimetypesRegistry', directory='profiles/default', description='Extension profile for default MimetypesRegistry setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
with genericsetup.importStep__cm(name='mimetypes-registry-various', handler='Products.MimetypesRegistry.setuphandlers.setupMimetypesRegistry', title='MimetypesRegistry setup', description='MimetypesRegistry installation step.'):
zope.depends(name='componentregistry')
# ----------------------------------------------------
# Products/PortalTransforms/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='Products.PortalTransforms'):
five.deprecatedManageAddDelete(class_='.TransformEngine.TransformTool')
five.deprecatedManageAddDelete(class_='.Transform.Transform')
genericsetup.registerProfile(name='PortalTransforms', title='PortalTransforms', directory='profiles/default', description='Extension profile for default PortalTransforms setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/statusmessages/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope.adapter(for_='zope.publisher.interfaces.browser.IBrowserRequest', provides='.interfaces.IStatusMessage', factory='.adapter.StatusMessage')
with zope.class__cm(class_='.message.Message'):
zope.allow(interface='.interfaces.IMessage')
# We need to make the request annotatable for this to work
if config.eval_condition('installed ZPublisher'):
zope.include(package='zope.annotation')
with zope.class__cm(class_='ZPublisher.BaseRequest.BaseRequest'):
zope.implements(interface='zope.annotation.interfaces.IAttributeAnnotatable')
# ----------------------------------------------------
# zope/annotation/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(for_='.interfaces.IAttributeAnnotatable', provides='.interfaces.IAnnotations', factory='.attribute.AttributeAnnotations')
zope.adapter(for_='.interfaces.IAttributeAnnotatable *', provides='.interfaces.IAnnotations', factory='.attribute.AttributeAnnotations')
# ----------------------------------------------------
# Products/Archetypes/implements.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
# Make all AT objects lockable by default
if config.eval_condition('installed plone.locking'):
with zope.class__cm(class_='.BaseObject.BaseObject'):
zope.implements(interface='plone.locking.interfaces.ITTWLockable')
# Let all AT objects support the IUUID protocol and associated views
if config.eval_condition('installed plone.uuid'):
with zope.class__cm(class_='.BaseObject.BaseObject'):
zope.implements(interface='plone.uuid.interfaces.IUUIDAware')
# ----------------------------------------------------
# Products/Archetypes/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='Archetypes', title='Archetypes', directory='profiles/default', description='Extension profile for default Archetypes setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/Archetypes/events.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
# Let ITTWLockable objects react to AT specific events. We reuse
# the generic event handlers in plone.locking for simplicity
#
if config.eval_condition('installed plone.locking'):
zope.subscriber(for_='plone.locking.interfaces.ITTWLockable .interfaces.IEditBegunEvent', handler='plone.locking.events.lockOnEditBegins')
if config.eval_condition('installed plone.locking'):
zope.subscriber(for_='plone.locking.interfaces.ITTWLockable .interfaces.IEditCancelledEvent', handler='plone.locking.events.unlockAfterModification')
if config.eval_condition('installed plone.locking'):
zope.subscriber(for_='plone.locking.interfaces.ITTWLockable .interfaces.IObjectEditedEvent', handler='plone.locking.events.unlockAfterModification')
if config.eval_condition('installed plone.locking'):
zope.subscriber(for_='plone.locking.interfaces.ITTWLockable .interfaces.IObjectInitializedEvent', handler='plone.locking.events.unlockAfterModification')
zope.subscriber(for_='.interfaces.IBaseContent OFS.interfaces.IObjectClonedEvent', handler='.subscribers.updateCreationOnCopy')
# ----------------------------------------------------
# Products/Archetypes/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.archetypetool.ArchetypeToolXMLAdapter')
zope.adapter(factory='.reference.ReferenceCatalogXMLAdapter')
zope.adapter(factory='.uid.UIDCatalogXMLAdapter')
with genericsetup.importStep__cm(name='archetypes-various', title='Archetypes setup', description='Import various settings for Archetypes.', handler='Products.Archetypes.setuphandlers.setupArchetypes'):
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='archetypetool', title='Archetype Tool', description='Import Archetype Tool.', handler='Products.Archetypes.exportimport.archetypetool.importArchetypeTool'):
zope.depends(name='archetypes-various')
genericsetup.exportStep(name='archetypetool', title='Archetype Tool', description='Export Archetype Tool.', handler='Products.Archetypes.exportimport.archetypetool.exportArchetypeTool')
with genericsetup.importStep__cm(name='reference_catalog', title='Reference Catalog', description='Import reference catalog.', handler='.reference.importCatalogTool'):
zope.depends(name='toolset')
genericsetup.exportStep(name='reference_catalog', title='Reference Catalog', description='Export reference catalog.', handler='.reference.exportCatalogTool')
with genericsetup.importStep__cm(name='uid_catalog', title='UID Catalog', description='Import uid catalog.', handler='.uid.importCatalogTool'):
zope.depends(name='toolset')
genericsetup.exportStep(name='uid_catalog', title='UID Catalog', description='Export uid catalog.', handler='.uid.exportCatalogTool')
# ----------------------------------------------------
# Products/Archetypes/Schema/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.factory.instanceSchemaFactory')
# ----------------------------------------------------
# Products/Archetypes/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='plone.app.viewletmanager')
browser.viewletManager(name='archetypes.edit.beforefieldsets', provides='..interfaces.IEditBeforeFieldsets', permission='cmf.ModifyPortalContent', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='archetypes.edit.afterfieldsets', provides='..interfaces.IEditAfterFieldsets', permission='cmf.ModifyPortalContent', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.page(for_='..interfaces.IBaseObject', name='at_base_edit_view', class_='.edit.Edit', permission='cmf.ModifyPortalContent', allowed_interface='..interfaces.IEditForm')
# Make sure that if a user goes to /edit on an unauthorized context,
# they get the login form rather than a LocationError
browser.page(for_='Shared.DC.Scripts.Bindings.UnauthorizedBinding', name='at_base_edit_view', class_='.edit.UnauthorizedEdit', permission='zope.Public')
browser.page(for_='..interfaces.IBaseObject', name='at_lifecycle_view', class_='.lifecycle.Lifecycle', permission='cmf.ModifyPortalContent', allowed_attributes='begin_edit cancel_edit')
browser.page(for_='*', name='kss_field_decorator_view', permission='zope2.View', class_='.fields.DefaultFieldDecoratorView', allowed_attributes='getKssClassesInlineEditable getKssClasses')
browser.page(for_='*', name='at_selection_widget', class_='.widgets.SelectionWidget', permission='zope.Public', allowed_attributes='getSelected')
browser.page(for_='*', name='at_textarea_widget', class_='.widgets.TextareaWidget', permission='zope2.View', allowed_attributes='getSelected lookupMime')
browser.page(for_='*', name='at_validate_field', class_='.validation.InlineValidationView', permission='zope2.View')
browser.page(for_='*', name='at_utils', class_='.utils.Utils', allowed_interface='..interfaces.utils.IUtils', permission='zope2.View')
# ----------------------------------------------------
# plone/app/viewletmanager/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='.exportimport')
with zope.class__cm(class_='.manager.ManageViewlets'):
zope.implements(interface='plone.app.layout.globals.interfaces.IViewView')
browser.page(for_='*', name='manage-viewlets', class_='.manager.ManageViewlets', template='manage-viewlets.pt', permission='cmf.ManagePortal')
# ----------------------------------------------------
# plone/app/viewletmanager/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.storage.ViewletSettingsStorageNodeAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='plone.app.viewletmanager.interfaces.IViewletSettingsStorage Products.GenericSetup.interfaces.ISetupEnviron')
# ----------------------------------------------------
# Products/CMFActionIcons/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_default'):
# directories
cmf.registerDirectory(name='actionicons')
# exportimport
with genericsetup.importStep__cm(name='action-icons', title='Action Icons (deprecated)', description='Import action icon definitions (folded into CMFDefault >= 2.2.0)', handler='Products.CMFActionIcons.exportimport.importActionIconsTool'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='action-icons', title='Action Icons (deprecated)', description='Export action icon definitions (folded into CMFDefault >= 2.2.0)', handler='Products.CMFActionIcons.exportimport.exportActionIconsTool')
# profiles
genericsetup.registerProfile(name='actionicons', title='CMFActionIcons (deprecated/folded into CMFDefault >= 2.2.0)', description='Adds action icon tool / settings.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# Products/CMFCalendar/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_calendar'):
# Load CMFDefault.skin first, we use the layer named "cmf" it defines
zope.include(package='Products.CMFDefault.skin')
zope.include(package='.browser')
# Event
five.registerClass(class_='.Event.Event', meta_type='CMF Event', permission='cmf.AddPortalContent')
zope.utility(component='.Event.EventFactory', name='cmf.calendar.event')
# directories
cmf.registerDirectory(name='zpt_calendar')
# exportimport
with genericsetup.importStep__cm(name='various-calendar', title='Various Calendar Settings', description='Import various settings for CMF Calendar.', handler='Products.CMFCalendar.setuphandlers.importVarious'):
zope.depends(name='toolset')
# profiles
genericsetup.registerProfile(name='default', title='CMFCalendar', description='Adds calendar support.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
genericsetup.registerProfile(name='skins_support', title='CMFCalendar Oldstyle Skins', description='Hooks up the oldstyle skins.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# Products/CMFDefault/skin/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='cmf_default'):
zope.interface(interface='..interfaces.ICMFDefaultSkin', type='zope.publisher.interfaces.browser.IBrowserSkinType', name='cmf')
browser.defaultSkin(name='cmf')
# Define a default template with css-oriented slots
browser.page(for_='Products.CMFCore.interfaces.IDynamicType', layer='..interfaces.ICMFDefaultSkin', template='five_template.pt', name='five_template', permission='zope.Public')
# ----------------------------------------------------
# Products/CMFCalendar/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(factory='.event.EventSchemaAdapter')
zope.include(package='Products.CMFCore', file='permissions.zcml')
zope.utility(component='.event.EventTypeVocabularyFactory', name='cmf.calendar.AvailableEventTypes')
browser.page(for_='Products.CMFCalendar.interfaces.IEvent', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='view.html', class_='.event.EventView', permission='zope2.View')
browser.page(for_='Products.CMFCalendar.interfaces.IMutableEvent', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='edit.html', class_='.event.EventEditView', permission='cmf.ModifyPortalContent')
browser.page(for_='*', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='calendar_day.html', class_='.calendartool.CalendarView', template='templates/calendar_day.pt', permission='zope2.View')
browser.page(for_='*', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='calendar_widget', class_='Products.CMFDefault.browser.utils.MacroView', template='templates/calendar_widgets.pt', permission='zope2.View')
browser.page(for_='*', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='calendar_box_view', class_='.calendartool.CalendarBoxView', permission='zope2.View')
browser.page(for_='Products.CMFCalendar.interfaces.IEvent', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='view.ics', class_='.event.EventiCalView', permission='zope2.View')
browser.page(for_='Products.CMFCalendar.interfaces.IEvent', layer='Products.CMFDefault.interfaces.ICMFDefaultSkin', name='view.vcs', class_='.event.EventvCalView', permission='zope2.View')
browser.resource(name='event_icon.gif', image='../skins/zpt_calendar/event_icon.gif')
browser.resource(name='calendar.css', file='../skins/zpt_calendar/CalendarStyle.css')
# ----------------------------------------------------
# Products/CMFDefault/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='five.formlib')
zope.include(package='.skin')
zope.include(package='.browser')
zope.include(package='.formlib')
zope.include(package='.upgrade')
zope.include(file='content.zcml')
zope.include(file='exportimport.zcml')
zope.include(file='profiles.zcml')
zope.include(file='directories.zcml')
# ----------------------------------------------------
# five/formlib/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='zope.app.form.browser')
browser.page(for_='*', name='form_macros', permission='zope2.View', class_='.macros.FormMacros', allowed_interface='zope.interface.common.mapping.IItemMapping')
with zope.configure__cm(package='zope.formlib'):
zope.adapter(factory='.form.render_submit_button', name='render')
# Error view for 'Invalid'
zope.adapter(for_='zope.interface.Invalid zope.publisher.interfaces.browser.IBrowserRequest', factory='.errors.InvalidErrorView', permission='zope.Public')
# ----------------------------------------------------
# zope/app/form/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='zope.formlib', file='configure.zcml')
# Form Macros
browser.page(for_='*', name='form_macros', permission='zope.Public', class_='.macros.FormMacros', allowed_interface='zope.interface.common.mapping.IItemMapping')
browser.page(for_='*', name='addform_macros', permission='zope.Public', template='add.pt')
# Register the form documentation with the apidoc tool
apidoc = config.get_namespace('http://namespaces.zope.org/apidoc')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('have apidoc'):
apidoc.bookchapter(id='form', title='Widgets and Forms')
apidoc.bookchapter(id='formdirective', title='The browser:form Directive', doc_path='form.txt', parent='form')
# ----------------------------------------------------
# zope/formlib/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='zope'):
zope.include(package='zope.component', file='meta.zcml')
zope.include(package='zope.security', file='meta.zcml')
zope.include(package='zope.browserpage', file='meta.zcml')
browser.page(for_='*', name='widget_macros', permission='zope.Public', template='widget_macros.pt')
zope.adapter(factory='.form.default_page_template', name='default')
zope.adapter(factory='.form.default_subpage_template', name='default')
zope.adapter(factory='.form.render_submit_button', name='render')
# Error view for 'Invalid'
zope.adapter(factory='.errors.InvalidErrorView', permission='zope.Public')
# For security proxied views
with zope.class__cm(class_='.form.Widgets'):
zope.allow(interface='.interfaces.IWidgets')
with zope.class__cm(class_='.form.Actions'):
zope.allow(interface='.interfaces.IActions')
with zope.class__cm(class_='.form.Action'):
zope.allow(interface='.interfaces.IAction')
# Views for Widget Errors
zope.adapter(for_='zope.formlib.interfaces.IWidgetInputError zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IWidgetInputErrorView', factory='.exception.WidgetInputErrorView', permission='zope.Public')
# Core display wfdgets
zope.adapter(for_='zope.schema.interfaces.IField zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.DisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IBool zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.BooleanDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IBytes zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.BytesDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IBytesLine zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.DisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IASCII zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ASCIIDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IASCIILine zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.DisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IURI zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.URIDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IDate zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.DateDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IDatetime zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.DatetimeDisplayWidget', permission='zope.Public')
# Core edit widgets
zope.adapter(for_='zope.schema.interfaces.ITextLine zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ITextBrowserWidget', factory='.widgets.TextWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IText zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.TextAreaWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ISourceText zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.TextAreaWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IBytesLine zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.BytesWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IBytes zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.FileWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IASCII zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ASCIIAreaWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IASCIILine zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ASCIIWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IInt zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.IntWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IInt zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.UnicodeDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IFloat zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.FloatWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IFloat zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.UnicodeDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IDecimal zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.DecimalWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IDecimal zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.UnicodeDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IDatetime zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.DatetimeWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IDate zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.DateWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IBool zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.CheckBoxWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IPassword zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.PasswordWidget', permission='zope.Public')
# Items-related widgets; they are proxies for the multiviews below.
# Choices (dispatch to field + vocabulary lookup)
zope.adapter(for_='zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ChoiceDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ChoiceInputWidget', permission='zope.Public')
# Generic collections (dispatch to field + value_type lookup)
zope.adapter(for_='zope.schema.interfaces.ICollection zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.CollectionDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ICollection zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.CollectionInputWidget', permission='zope.Public')
#
#
# Need to repeat the above for Sequence to avoid being overridden by a
# DAV widget. This suggests that we should be getting something
# more specific than IInputWidget.
#
#
zope.adapter(for_='zope.schema.interfaces.ISequence zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.CollectionDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ISequence zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.CollectionInputWidget', permission='zope.Public')
# non-choice collection fields should register for the field + value type
# so as to allow specific field + value_type widgets such as the Choice
# pattern
zope.adapter(for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IField zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.TupleSequenceWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IField zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ListSequenceWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ISequence zope.schema.interfaces.IField zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.SequenceDisplayWidget', permission='zope.Public')
# Choice collections. dispatch to field + vocabulary lookup.
# We must register the collection + choice factories for all ICollection
# subclasses because the field (the collection) has precedence: therefore
# a registration for (IList plus IField) would trump a registration for
# (ICollection plus IChoice), making choice lists not look up properly.
# So all new collection types should always register for IChoice if
# they want to follow in this configuration pattern.
# List + Choice
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ChoiceCollectionDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ChoiceCollectionInputWidget', permission='zope.Public')
# Tuple + Choice
zope.adapter(for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ChoiceCollectionDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ChoiceCollectionInputWidget', permission='zope.Public')
# Set + Choice
zope.adapter(for_='zope.schema.interfaces.ISet zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ChoiceCollectionDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ISet zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ChoiceCollectionInputWidget', permission='zope.Public')
# FrozenSet + Choice
zope.adapter(for_='zope.schema.interfaces.IFrozenSet zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ChoiceCollectionDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IFrozenSet zope.schema.interfaces.IChoice zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.ChoiceCollectionInputWidget', permission='zope.Public')
# Default Multi-Views for fields and vocabularies
zope.adapter(for_='zope.schema.interfaces.IChoice zope.schema.interfaces.IBaseVocabulary zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.ItemDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IChoice zope.schema.interfaces.IVocabularyTokenized zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.DropdownWidget', permission='zope.Public')
# Default Multi-Views for fields and iterable sources
zope.adapter(for_='zope.schema.interfaces.ISet zope.schema.interfaces.IIterableSource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.source.SourceMultiSelectSetWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IFrozenSet zope.schema.interfaces.IIterableSource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.source.SourceMultiSelectFrozenSetWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IChoice zope.schema.interfaces.IIterableSource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.source.SourceDropdownWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IIterableSource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.source.SourceOrderedMultiSelectWidget', permission='zope.Public')
# These widgets are minimal and only support lists with unique members,
# without ordering capabilities
zope.adapter(for_='zope.schema.interfaces.ISet zope.schema.interfaces.IVocabularyTokenized zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.MultiSelectSetWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IFrozenSet zope.schema.interfaces.IVocabularyTokenized zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.MultiSelectFrozenSetWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ISet zope.schema.interfaces.IBaseVocabulary zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.SetDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IFrozenSet zope.schema.interfaces.IBaseVocabulary zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.SetDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IVocabularyTokenized zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.widgets.OrderedMultiSelectWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IBaseVocabulary zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.widgets.SetDisplayWidget', permission='zope.Public')
# Source Views
zope.adapter(for_='zope.schema.interfaces.IChoice zope.schema.interfaces.ISource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.source.SourceDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IChoice zope.schema.interfaces.ISource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.source.SourceInputWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ISequence zope.schema.interfaces.ISource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.source.SourceSequenceDisplayWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IAbstractSet zope.schema.interfaces.ISource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.IDisplayWidget', factory='.source.SourceSequenceDisplayWidget', permission='zope.Public')
# TODO We need a widget for tuples (and sets, for that matter).
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.ISource zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.source.SourceListInputWidget', permission='zope.Public')
# ----------------------------------------------------
# Products/CMFDefault/content.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
# Document
five.registerClass(class_='.Document.Document', meta_type='Document', permission='cmf.AddPortalContent')
zope.utility(component='.Document.DocumentFactory', name='cmf.document')
# Favorite
five.registerClass(class_='.Favorite.Favorite', meta_type='Favorite', permission='cmf.AddPortalContent')
zope.utility(component='.Favorite.FavoriteFactory', name='cmf.favorite')
zope.subscriber(handler='.Favorite.handleFavoriteAddedEvent')
# File
five.registerClass(class_='.File.File', meta_type='Portal File', permission='cmf.AddPortalContent')
zope.utility(component='.File.FileFactory', name='cmf.file')
# Image
five.registerClass(class_='.Image.Image', meta_type='Portal Image', permission='cmf.AddPortalContent')
zope.utility(component='.Image.ImageFactory', name='cmf.image')
# Link
five.registerClass(class_='.Link.Link', meta_type='Link', permission='cmf.AddPortalContent')
zope.utility(component='.Link.LinkFactory', name='cmf.link')
# NewsItem
five.registerClass(class_='.NewsItem.NewsItem', meta_type='News Item', permission='cmf.AddPortalContent')
zope.utility(component='.NewsItem.NewsItemFactory', name='cmf.newsitem')
# SkinnedFolder
five.registerClass(class_='.SkinnedFolder.SkinnedFolder', meta_type='Skinned Folder', permission='cmf.AddPortalContent')
zope.utility(component='.SkinnedFolder.SkinnedFolderFactory', name='cmf.folder.skinned')
# ----------------------------------------------------
# Products/CMFDefault/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_default'):
with genericsetup.importStep__cm(name='various', title='Various Settings', description='Import various settings from PortalGenerator.', handler='Products.CMFDefault.setuphandlers.importVarious'):
zope.depends(name='toolset')
# ----------------------------------------------------
# Products/CMFDefault/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_default'):
genericsetup.registerProfile(name='default', title='CMFDefault Site', description='Profile for a default CMFSite.', for_='Products.CMFCore.interfaces.ISiteRoot')
genericsetup.registerProfile(name='views_support', title='Experimental CMFDefault Browser Views', description='Hooks up the browser views.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
genericsetup.registerProfile(name='sample_content', title='Sample CMFDefault Content', description='Content for a sample CMFSite.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
genericsetup.registerProfile(name='ursa', title="CMF 'Bare' skin", description='Provide skin w/ stripped-down main template.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
genericsetup.registerProfile(name='were', title="CMF 'Bare' / hybrid skin", description='Use stripped-down globals in regular main template.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# Products/CMFDefault/directories.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
cmf.registerDirectory(name='Images')
cmf.registerDirectory(name='zpt_content')
cmf.registerDirectory(name='zpt_control')
cmf.registerDirectory(name='zpt_generic')
cmf.registerDirectory(name='ursine')
cmf.registerDirectory(name='werebear')
# ----------------------------------------------------
# Products/CMFDiffTool/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('installed five.globalrequest'):
zope.include(package='five.globalrequest')
zope.include(package='.exportimport')
zope.include(file='profiles.zcml')
# Translations
i18n.registerTranslations(directory='locales')
# ----------------------------------------------------
# five/globalrequest/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='five.globalrequest'):
zope.subscriber(for_='ZPublisher.interfaces.IPubStart', handler='.hooks.set_')
zope.subscriber(for_='ZPublisher.interfaces.IPubEnd', handler='.hooks.clear')
# ----------------------------------------------------
# Products/CMFDiffTool/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf'):
with genericsetup.importStep__cm(name='difftool', handler='Products.CMFDiffTool.exportimport.difftool.importDiffTool', title='Diff Tool', description='Import CMFDiffTool settings'):
zope.depends(name='toolset')
zope.depends(name='componentregistry')
genericsetup.exportStep(name='difftool', handler='Products.CMFDiffTool.exportimport.difftool.exportDiffTool', title='Diff Tool', description='Export CMFDiffTool settings')
zope.adapter(factory='.difftool.DiffToolXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFDiffTool.interfaces.IDiffTool Products.GenericSetup.interfaces.ISetupEnviron')
# ----------------------------------------------------
# Products/CMFDiffTool/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmfdifftool'):
genericsetup.registerProfile(name='CMFDiffTool', title='CMFDiffTool', directory='profiles/default', description='Extension profile for default CMFDiffTool setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/CMFDynamicViewFTI/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='cmf_default'):
browser.page(for_='zope.browser.interfaces.IAdding', name='addDVFactoryTypeInformation.html', template='browser/addWithPresettings.pt', class_='.browser.typeinfo.DVFactoryTypeInformationAddView', permission='cmf.ManagePortal')
five.registerClass(class_='.fti.DynamicViewTypeInformation', meta_type='Factory-based Type Information with dynamic views', addview='addDVFactoryTypeInformation.html', permission='cmf.ManagePortal', global_='False')
zope.permission(id='cmf.ModifyViewTemplate', title='Modify view template')
# ----------------------------------------------------
# Products/CMFEditions/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='cmfeditions'):
zope.include(file='permissions.zcml')
cmf.registerDirectory(name='skins', directory='skins', recursive='True')
zope.include(package='Products.CMFUid')
# provides hooks for zope.copy
zope.include(package='zope.location')
zope.include(package='.browser')
zope.include(package='.exportimport')
zope.include(file='profiles.zcml')
zope.subscriber(for_='.interfaces.IVersioned zope.lifecycleevent.interfaces.IObjectCopiedEvent', handler='.ArchivistTool.object_copied')
if config.eval_condition('installed Products.Archetypes'):
zope.subscriber(for_='* Products.Archetypes.interfaces.IWebDAVObjectInitializedEvent', handler='.subscriber.webdavObjectInitialized')
zope.subscriber(for_='* Products.Archetypes.interfaces.IWebDAVObjectEditedEvent', handler='.subscriber.webdavObjectEdited')
zope.subscriber(for_='* Products.Archetypes.interfaces.IObjectInitializedEvent', handler='.subscriber.objectInitialized')
zope.subscriber(for_='* Products.Archetypes.interfaces.IObjectEditedEvent', handler='.subscriber.objectEdited')
# ----------------------------------------------------
# Products/CMFEditions/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# Make Zope 2 permissions available as Zope 3-style permissions.
# This file must be kept in sync with `Permissions.py`.
#
zope.permission(id='CMFEditions.AccessPreviousVersions', title='CMFEditions: Access previous versions')
zope.permission(id='CMFEditions.RevertToPreviousVersions', title='CMFEditions: Revert to previous versions')
zope.permission(id='CMFEditions.ApplyVersionControl', title='CMFEditions: Apply version control')
zope.permission(id='CMFEditions.SaveNewVersion', title='CMFEditions: Save new version')
zope.permission(id='CMFEditions.PurgeVersion', title='CMFEditions: Purge version')
zope.permission(id='CMFEditions.CheckoutToLocation', title='CMFEditions: Checkout to location')
zope.permission(id='CMFEditions.ManagVersioningPolicies', title='CMFEditions: Manage versioning policies')
# ----------------------------------------------------
# Products/CMFUid/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_default'):
zope.include(file='event.zcml')
# profiles
genericsetup.registerProfile(name='default', title='CMFUid', description='Adds UID support.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# Products/CMFUid/event.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.subscriber(for_='Products.CMFCore.interfaces.IContentish zope.component.interfaces.IObjectEvent', handler='.UniqueIdAnnotationTool.handleUidAnnotationEvent')
# ----------------------------------------------------
# zope/location/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope.include(file='meta.zcml', package='zope.component')
zope.adapter(factory='.location.LocationProxy')
if config.eval_condition('installed zope.copy'):
zope.adapter(factory='.pickling.LocationCopyHook')
zope.adapter(factory='.traversing.LocationPhysicallyLocatable')
zope.adapter(factory='.traversing.RootPhysicallyLocatable')
# ----------------------------------------------------
# Products/CMFEditions/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='history', class_='.diff.DiffView', permission='CMFEditions.AccessPreviousVersions')
if config.eval_condition('installed Products.Archetypes'):
browser.viewlet(name='cmfeditions.versioningfields', manager='Products.Archetypes.interfaces.IEditAfterFieldsets', template='edit.pt', permission='cmf.ModifyPortalContent')
browser.page(for_='*', name='candiff', class_='.diff.CanDiff', attribute='can_diff', permission='zope2.View')
browser.page(for_='*', name='get_macros', class_='.utils.GetMacros', attribute='get_macros', permission='zope2.View')
# ----------------------------------------------------
# Products/CMFEditions/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmfeditions'):
with genericsetup.importStep__cm(name='cmfeditions_various', handler='Products.CMFEditions.setuphandlers.importVarious', title='Various CMFEditions Settings', description='CMFEditions specific settings'):
zope.depends(name='toolset')
zope.depends(name='typeinfo')
zope.adapter(factory='.repository.RepositoryToolXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFEditions.interfaces.IRepository.IRepositoryTool Products.GenericSetup.interfaces.ISetupEnviron')
with genericsetup.importStep__cm(name='repositorytool', title='CMFEditions Repository Tool', description="Import repository tool's settings.", handler='.repository.importRepositoryTool'):
zope.depends(name='toolset')
zope.depends(name='typeinfo')
zope.depends(name='cmfeditions_various')
genericsetup.exportStep(name='repositorytool', title='CMFEditions Repository Tool', description="Export repository tool's settings.", handler='.repository.exportRepositoryTool')
# ----------------------------------------------------
# Products/CMFEditions/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmfeditions'):
genericsetup.registerProfile(name='CMFEditions', title='CMFEditions', directory='profiles/default', description='Extension profile for default CMFEditions setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
with genericsetup.upgradeSteps__cm(source='2.0', destination='3', profile='Products.CMFEditions:CMFEditions'):
genericsetup.upgradeDepends(title='Fix portal_historyidhandler', import_steps='toolset')
with genericsetup.upgradeSteps__cm(source='3', destination='4', profile='Products.CMFEditions:CMFEditions'):
genericsetup.upgradeStep(title='Install the component registry bases modifier.', handler='.setuphandlers.installSkipRegistryBasesPointersModifier')
# ----------------------------------------------------
# Products/CMFPlacefulWorkflow/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(file='implements.zcml')
zope.include(file='exportimport.zcml')
zope.include(file='profiles.zcml')
zope.include(file='permissions.zcml')
zope.adapter(factory='.adapter.PlacefulWorkflowChain')
# ----------------------------------------------------
# Products/CMFPlacefulWorkflow/implements.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.class__cm(class_='.PlacefulWorkflowTool.PlacefulWorkflowTool'):
zope.implements(interface='.interfaces.IPlacefulWorkflowTool')
with zope.class__cm(class_='.DefaultWorkflowPolicy.DefaultWorkflowPolicyDefinition'):
zope.implements(interface='.interfaces.IWorkflowPolicyDefinition')
# ----------------------------------------------------
# Products/CMFPlacefulWorkflow/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmfplacefulworkflow'):
zope.adapter(factory='.exportimport.workflow_policies.PlacefulWorkflowXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='.interfaces.IPlacefulWorkflowTool Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.exportimport.workflow_policies.WorkflowPoliciesXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='.interfaces.IWorkflowPolicyDefinition Products.GenericSetup.interfaces.ISetupEnviron')
zope.include(package='Products.CMFCore')
five.registerClass(class_='.DefaultWorkflowPolicy.DefaultWorkflowPolicyDefinition', meta_type='WorkflowPolicy', permission='cmf.ManagePortal')
with genericsetup.importStep__cm(name='placeful_workflow', title='Placeful Workflow Policies', description='Import placeful workflow policies.', handler='Products.CMFPlacefulWorkflow.exportimport.importWorkflowPolicies'):
zope.depends(name='typeinfo')
zope.depends(name='workflow')
genericsetup.exportStep(name='portal_placeful_workflow', title='Placeful Workflow Policies', description='Export placeful workflow policies.', handler='Products.CMFPlacefulWorkflow.exportimport.exportWorkflowPolicies')
with genericsetup.importStep__cm(name='placeful_marker', title='Placeful Workflow Tool Marker Interface', description='Add placeful marker to default workflow tool', handler='Products.CMFPlacefulWorkflow.setuphandlers.installMarker'):
zope.depends(name='workflow')
# ----------------------------------------------------
# Products/CMFPlacefulWorkflow/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmfplacefulworkflow'):
genericsetup.registerProfile(name='CMFPlacefulWorkflow', title='Workflow Policy Support (CMFPlacefulWorkflow)', directory='profiles/default', description='Add in Plone the capability to change workflow chains for types in every object. Includes a dependency on core Plone types.', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='base', title='Workflow Policy Support (CMFPlacefulWorkflow) - no core types dependency', directory='profiles/base', description='Add in Plone the capability to change workflow chains for types in every object. With no dependency on core Plone types.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/CMFPlacefulWorkflow/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='cmfplacefulworkflow'):
zope.permission(id='CMFPlacefulWorkflow.ManageWorkflowPolicies', title='CMFPlacefulWorkflow: Manage workflow policies')
# ----------------------------------------------------
# Products/CMFPlone/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='zope.app.locales')
zope.include(package='Products.CMFCore')
zope.include(package='Products.GenericSetup')
zope.include(package='plone.app.blob')
zope.include(package='plone.app.collection')
zope.include(package='plone.app.contentmenu')
zope.include(package='plone.app.content')
zope.include(package='plone.app.contentrules')
zope.include(package='plone.app.controlpanel')
zope.include(package='plone.app.customerize')
zope.include(package='plone.app.discussion')
zope.include(package='plone.app.folder')
zope.include(package='plone.app.form')
zope.include(package='plone.app.i18n')
zope.include(package='plone.app.jquery')
zope.include(package='plone.app.jquerytools')
zope.include(package='plone.app.layout')
zope.include(package='plone.app.linkintegrity')
zope.include(package='plone.app.locales')
zope.include(package='plone.app.portlets')
zope.include(package='plone.app.redirector')
zope.include(package='plone.app.search')
zope.include(package='plone.app.registry')
zope.include(package='plone.app.upgrade')
zope.include(package='plone.app.users')
zope.include(package='plone.app.uuid')
zope.include(package='plone.app.viewletmanager')
zope.include(package='plone.app.vocabularies')
zope.include(package='plone.app.workflow')
zope.include(package='plone.batching')
zope.include(package='plone.memoize')
zope.include(package='plone.session')
zope.include(package='plone.protect')
zope.include(package='plone.indexer')
# viewlets zope 3 layers support for themes
zope.include(package='plone.browserlayer')
zope.include(package='plone.theme')
# referencebrowser
zope.include(package='archetypes.referencebrowserwidget')
# wicked
if config.eval_condition('installed wicked'):
zope.include(package='wicked.plone', file='selective-atct.zcml')
# extra portlets
zope.include(package='plone.portlet.static')
zope.include(package='plone.portlet.collection')
# local role PAS plugin
zope.include(package='borg.localrole')
zope.include(package='borg.localrole', file='default.zcml')
zope.include(package='.browser')
zope.include(package='.exportimport')
zope.include(file='deprecated.zcml')
zope.include(file='profiles.zcml')
zope.include(file='catalog.zcml')
cmf.registerDirectory(name='skins', directory='skins', recursive='True')
with zope.class__cm(class_='Products.PluggableAuthService.PluggableAuthService.PluggableAuthService'):
zope.implements(interface='.interfaces.IHideFromBreadcrumbs')
with zope.class__cm(class_='Products.PluggableAuthService.plugins.BasePlugin.BasePlugin'):
zope.implements(interface='.interfaces.IHideFromBreadcrumbs')
zope.utility(factory='.factory.HiddenProfiles', name='Products.CMFPlone')
zope.utility(factory='.setuphandlers.HiddenProducts', name='Products.CMFPlone')
# Adapter for default workflow lookup
zope.adapter(factory='.workflow.ToolWorkflowChain', trusted='y')
# include plone plugins with z3c.autoinclude
if config.eval_condition('not-have disable-autoinclude'):
zope.includePlugins(package='plone', file='configure.zcml')
zope.subscriber(for_='Products.GenericSetup.events.ProfileImportedEvent', handler='.events.profileImportedEventHandler')
# ----------------------------------------------------
# zope/app/locales/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='zope'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
i18n.registerTranslations(directory='.')
# ----------------------------------------------------
# Products/GenericSetup/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='genericsetup'):
if config.eval_condition('not-installed five.formlib'):
zope.include(package='zope.formlib')
zope.include(package='.browser')
zope.include(package='.MailHost')
zope.include(package='.OFSP')
zope.include(package='.PluginIndexes')
zope.include(package='.PythonScripts')
zope.include(package='.PageTemplates')
zope.include(package='.ZCatalog')
zope.include(package='.ZCTextIndex')
zope.adapter(factory='.content.CSVAwareFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.GenericSetup.interfaces.ICSVAware')
zope.adapter(factory='.content.CSVAwareFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.GenericSetup.interfaces.ICSVAware')
zope.adapter(factory='.content.INIAwareFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.GenericSetup.interfaces.IINIAware')
zope.adapter(factory='.content.INIAwareFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.GenericSetup.interfaces.IINIAware')
zope.adapter(factory='.content.DAVAwareFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.GenericSetup.interfaces.IDAVAware')
zope.adapter(factory='.content.DAVAwareFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.GenericSetup.interfaces.IDAVAware')
zope.adapter(factory='.components.ComponentRegistryXMLAdapter')
genericsetup.exportStep(name='step_registries', title='Step Registries', description='Export current contents of import step registry and export step registry.', handler='Products.GenericSetup.tool.exportStepRegistries')
genericsetup.importStep(name='toolset', title='Required Tools', description='Create required tools, replacing any of the wrong class, and remove forbidden ones.', handler='Products.GenericSetup.tool.importToolset')
genericsetup.exportStep(name='toolset', title='Required Tools', description='Export required / forbidden tools.', handler='Products.GenericSetup.tool.exportToolset')
genericsetup.importStep(name='rolemap', title='Role / Permission Map', description='Import custom roles and non-default role-permission mappings.', handler='Products.GenericSetup.rolemap.importRolemap')
genericsetup.exportStep(name='rolemap', title='Role / Permission Map', description='Export custom roles and non-default role-permission mappings.', handler='Products.GenericSetup.rolemap.exportRolemap')
with genericsetup.importStep__cm(name='componentregistry', title='Local Component Registry', description='Import local component registry configuration.', handler='Products.GenericSetup.components.importComponentRegistry'):
zope.depends(name='toolset')
genericsetup.exportStep(name='componentregistry', title='Local Component Registry', description='Export local component registry configuration.', handler='Products.GenericSetup.components.exportComponentRegistry')
zope.subscriber(handler='.events.handleProfileImportedEvent')
# ----------------------------------------------------
# Products/GenericSetup/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(factory='.components.ComponentsSetupSchemaAdapter')
browser.page(for_='Products.Five.component.interfaces.IObjectManagerSite', name='components_xmlconfig.html', class_='.components.ComponentsSetupView', permission='five.ManageSite')
browser.page(for_='Products.Five.component.interfaces.IObjectManagerSite', name='manage_components', class_='.components.ComponentsSetupTab', permission='five.ManageSite')
browser.page(for_='..interfaces.ISetupTool', name='manage_importsteps', class_='.manage.ImportStepsView', permission='five.ManageSite')
browser.page(for_='..interfaces.ISetupTool', name='manage_exportsteps', class_='.manage.ExportStepsView', permission='five.ManageSite')
# ----------------------------------------------------
# Products/GenericSetup/MailHost/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.MailHostXMLAdapter')
# ----------------------------------------------------
# Products/GenericSetup/OFSP/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.FolderXMLAdapter')
# ----------------------------------------------------
# Products/GenericSetup/PluginIndexes/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope.adapter(factory='.exportimport.PluggableIndexNodeAdapter')
zope.adapter(factory='.exportimport.DateIndexNodeAdapter')
zope.adapter(factory='.exportimport.DateRangeIndexNodeAdapter')
zope.adapter(factory='.exportimport.PathIndexNodeAdapter')
zope.adapter(factory='.exportimport.FilteredSetNodeAdapter')
zope.adapter(factory='.exportimport.TopicIndexNodeAdapter')
# ----------------------------------------------------
# Products/GenericSetup/PythonScripts/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.PythonScriptBodyAdapter')
with zope.class__cm(class_='Products.PythonScripts.PythonScript.PythonScript'):
zope.implements(interface='.interfaces.IPythonScript')
# ----------------------------------------------------
# Products/GenericSetup/PageTemplates/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.ZopePageTemplateBodyAdapter')
with zope.class__cm(class_='Products.PageTemplates.ZopePageTemplate.ZopePageTemplate'):
zope.implements(interface='.interfaces.IZopePageTemplate')
# ----------------------------------------------------
# Products/GenericSetup/ZCatalog/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.ZCatalogXMLAdapter')
# ----------------------------------------------------
# Products/GenericSetup/ZCTextIndex/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.ZCLexiconNodeAdapter')
zope.adapter(factory='.exportimport.ZCTextIndexNodeAdapter')
# ----------------------------------------------------
# plone/app/blob/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='plone.app.blob'):
five.registerPackage(package='.', initialize='.initialize')
five.deprecatedManageAddDelete(class_='.content.ATBlob')
zope.include(file='profiles.zcml')
zope.include(package='archetypes.schemaextender')
zope.include(package='plone.app.imaging')
zope.include(package='.adapters')
zope.include(package='.browser')
with zope.class__cm(class_='OFS.Image.File'):
zope.implements(interface='.interfaces.IOFSFile')
with zope.class__cm(class_='ZPublisher.HTTPRequest.FileUpload'):
zope.implements(interface='.interfaces.IFileUpload')
zope.adapter(name='plone.app.blob.subtypes.blob', for_='plone.app.blob.interfaces.IATBlobBlob', factory='.subtypes.blob.SchemaExtender')
zope.adapter(name='plone.app.blob.subtypes.file', for_='plone.app.blob.interfaces.IATBlobFile', factory='.subtypes.file.SchemaExtender')
zope.adapter(name='plone.app.blob.subtypes.image', for_='plone.app.blob.interfaces.IATBlobImage', factory='.subtypes.image.SchemaExtender')
zope.adapter(factory='.scale.BlobImageScaleHandler')
zope.adapter(factory='.scale.BlobImageScaleFactory')
# ----------------------------------------------------
# plone/app/blob/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.app.blob'):
genericsetup.registerProfile(name='default', title='plone.app.blob: ZODB Blob support', directory='profiles/default', description="Extension profile to replace the standard 'File' content type with a compatible one based on ZODB 3.8 blobs", for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='file-replacement', title="plone.app.blob: 'File' replacement type (testing)", directory='profiles/file-replacement', description="Extension profile to replace the standard 'File' content type with a compatible one based on ZODB 3.8 blobs", for_='Products.CMFPlone.interfaces.ITestCasePloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='image-replacement', title="plone.app.blob: 'Image' replacement type", directory='profiles/image-replacement', description="Extension profile to replace the standard 'Image' content type with a compatible one based on ZODB 3.8 blobs", for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='sample-type', title="plone.app.blob: Sample 'Blob' content type", directory='profiles/sample', description='plone.app.blob: Sample content type based on ZODB 3.8 blobs', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='testing-lingua', title='plone.app.blob: LinguaPlone testing', directory='profiles/lingua', description='Extension profile for testing LinguaPlone compatibility', for_='Products.CMFPlone.interfaces.ITestCasePloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# archetypes/schemaextender/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(file='implements.zcml')
# Register caching adapter for IExtensible objects
zope.adapter(factory='.extender.cachingInstanceSchemaFactory')
# ----------------------------------------------------
# archetypes/schemaextender/implements.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# Let any Archetypes content type be extensible
with zope.class__cm(class_='Products.Archetypes.BaseContent.BaseContent'):
zope.implements(interface='.interfaces.IExtensible')
with zope.class__cm(class_='Products.Archetypes.BaseFolder.BaseFolder'):
zope.implements(interface='.interfaces.IExtensible')
# ----------------------------------------------------
# plone/app/imaging/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.imaging'):
five.registerPackage(package='.', initialize='.initialize')
zope.include(file='profiles.zcml')
with zope.class__cm(class_='Products.Archetypes.Field.ImageField'):
zope.implements(interface='Products.Archetypes.interfaces.IImageField')
with zope.class__cm(class_='Products.Archetypes.atapi.BaseObject'):
zope.implements(interface='plone.app.imaging.interfaces.IBaseObject')
zope.adapter(factory='.traverse.ImageTraverser')
zope.adapter(factory='.traverse.DefaultImageScaleHandler')
zope.adapter(for_='Products.Archetypes.interfaces.IImageField', factory='.scaling.ImageScaleFactory')
zope.adapter(factory='.configlet.ImagingControlPanelAdapter')
zope.permission(id='plone.app.controlpanel.Imaging', title='Plone Site Setup: Imaging')
browser.page(name='imaging-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.configlet.ImagingControlPanel', permission='plone.app.controlpanel.Imaging')
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', name='images', class_='.scaling.ImageScaling', allowed_interface='.interfaces.IImageScaling', permission='zope2.View')
# configure sizes lookup for `plone.namedfile` if it's present
if config.eval_condition('installed plone.namedfile.scaling'):
zope.utility(component='.utils.getAllowedSizes', provides='plone.namedfile.interfaces.IAvailableSizes')
# soft dependency: quality lookup for IScaledImageQuality
if config.eval_condition('installed plone.scale.interfaces'):
zope.utility(component='.utils.getQuality', provides='plone.scale.interfaces.IScaledImageQuality')
# ----------------------------------------------------
# plone/app/imaging/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.app.imaging'):
genericsetup.registerProfile(name='default', title='plone.app.imaging', directory='profiles/default', description='User-configurable image scaling', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/blob/adapters/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.blob'):
zope.adapter(factory='.blobwrapper.BlobbableBlobWrapper')
zope.adapter(factory='.fileupload.BlobbableFileUpload')
zope.adapter(factory='.ofsfile.BlobbableOFSFile')
zope.adapter(factory='.atfile.BlobbableATFile')
zope.adapter(factory='.atimage.BlobbableATImage')
zope.adapter(factory='.stringio.BlobbableStringIO')
zope.adapter(factory='.file.BlobbableFile')
zope.adapter(factory='.pdata.BlobbablePdata')
zope.adapter(factory='.webdav.BlobbableWebDavUpload')
zope.adapter(factory='.xmlrpc.BlobbableBinary')
# ----------------------------------------------------
# plone/app/blob/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.blob'):
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='blob-migration', template='migration.pt', class_='.migration.BlobMigrationView', permission='cmf.ManagePortal')
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='blob-file-migration', template='migration.pt', class_='.migration.FileMigrationView', permission='cmf.ManagePortal')
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='blob-image-migration', template='migration.pt', class_='.migration.ImageMigrationView', permission='cmf.ManagePortal')
browser.page(for_='*', name='blob-maintenance', class_='.maintenance.MaintenanceView', allowed_interface='..interfaces.IBlobMaintenanceView', permission='cmf.ManagePortal')
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='content-size-statistics', class_='.size.FileContentSizeView', permission='cmf.ManagePortal')
# ----------------------------------------------------
# plone/app/collection/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
five.registerPackage(package='.', initialize='.initialize')
zope.include(package='archetypes.querywidget')
zope.include(package='plone.app.contentlisting')
zope.include(package='.browser')
genericsetup.registerProfile(name='default', title='plone.app.collection', directory='profiles/default', description='Adds support for new style collections to Plone', provides='Products.GenericSetup.interfaces.EXTENSION')
# hide profiles for our widget/field dependencies
zope.utility(factory='.integration.HiddenProfiles', name='plone.app.collection', provides='Products.CMFPlone.interfaces.INonInstallable')
zope.utility(factory='.integration.HiddenProfiles', name='plone.app.collection', provides='Products.CMFQuickInstallerTool.interfaces.INonInstallable')
zope.permission(id='plone.app.collection.addCollection', title='plone.app.collection: Add Collection')
with zope.class__cm(class_='.collection.Collection'):
zope.require(permission='zope2.View', interface='.interfaces.ICollection')
# ----------------------------------------------------
# archetypes/querywidget/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.app.querystring')
cmf.registerDirectory(name='querywidget')
genericsetup.registerProfile(name='default', title='Querywidget', directory='profiles/default', description='An Archetypeswidget to create persistent searchqueries. This is used by plone.app.collection.', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='test_fixture', title='Querywidget (Test profile)', directory='profiles/test_fixture', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.ITestCasePloneSiteRoot')
browser.resource(name='archetypes.querywidget.querywidget.js', permission='zope2.View', file='querywidget.js')
browser.resource(name='archetypes.querywidget.querywidget.css', permission='zope2.View', file='querywidget.css')
browser.page(name='datepickerconfig', permission='zope2.View', for_='*', class_='archetypes.querywidget.views.datepickerconfig')
browser.page(name='archetypes-querywidget-removecriterialink', permission='zope2.View', for_='*', template='templates/remove_criteria_link.pt')
browser.page(name='archetypes-querywidget-emptywidget', permission='zope2.View', for_='*', template='templates/empty_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-stringwidget', permission='zope2.View', for_='*', template='templates/string_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-datewidget', permission='zope2.View', for_='*', template='templates/date_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-daterangewidget', permission='zope2.View', for_='*', template='templates/date_range_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-multipleselectionwidget', permission='zope2.View', for_='*', template='templates/multiple_selection_widget.pt', class_='.views.MultiSelectWidget', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-referencewidget', permission='zope2.View', for_='*', template='templates/reference_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-relativedatewidget', permission='zope2.View', for_='*', template='templates/relative_date_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
browser.page(name='archetypes-querywidget-relativepathwidget', permission='zope2.View', for_='*', template='templates/relative_path_widget.pt', class_='.views.WidgetTraverse', allowed_attributes='macros')
# ----------------------------------------------------
# plone/app/querystring/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.app.contentlisting')
zope.include(package='plone.app.registry')
genericsetup.registerProfile(name='default', title='Querystring parser/builder', directory='profiles/default', description='Querystring parser and builder, building block and transformer for the new style collections', provides='Products.GenericSetup.interfaces.EXTENSION')
zope.adapter(for_='plone.registry.interfaces.IRegistry', factory='.registryreader.QuerystringRegistryReader')
zope.adapter(for_='plone.registry.interfaces.IRegistry zope.publisher.interfaces.http.IHTTPRequest', factory='.registryreader.QuerystringRegistryReader')
browser.page(name='display_query_results', class_='.querybuilder.ContentListingView', permission='zope2.View', for_='*', template='results.pt')
browser.page(name='querybuilderresults', class_='.querybuilder.QueryBuilder', permission='zope2.View', for_='*')
browser.page(name='querybuilder_html_results', class_='.querybuilder.QueryBuilder', permission='zope2.View', attribute='html_results', for_='*')
browser.page(name='querybuildernumberofresults', class_='.querybuilder.QueryBuilder', permission='zope2.View', for_='*', attribute='number_of_results')
browser.page(name='querybuilderjsonconfig', class_='.querybuilder.RegistryConfiguration', permission='zope2.View', for_='*')
# ----------------------------------------------------
# plone/app/contentlisting/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(factory='.contentlisting.ContentListing', for_='Products.ZCatalog.Lazy.LazyMap')
zope.adapter(factory='.contentlisting.ContentListing', for_='Products.ZCatalog.Lazy.LazyCat')
zope.adapter(factory='.contentlisting.ContentListing', for_='zope.interface.common.sequence.IFiniteSequence')
zope.adapter(factory='.contentlisting.ContentListing', for_='list')
zope.adapter(factory='.contentlisting.ContentListing', for_='Products.CMFPlone.PloneBatch.Batch')
zope.adapter(factory='.contentlisting.ContentListing', for_='ZTUtils.Batch.Batch')
zope.adapter(factory='.catalog.CatalogContentListingObject', for_='Products.ZCatalog.interfaces.ICatalogBrain')
zope.adapter(factory='.realobject.RealContentListingObject', for_='Products.CMFCore.interfaces.IContentish ')
browser.page(name='folderListing', class_='.browser.FolderListing', permission='zope2.View', for_='Products.CMFCore.interfaces.IFolderish')
# ----------------------------------------------------
# plone/app/registry/configure.zcml
# ----------------------------------------------------
def includeme(config):
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='Products.CMFCore', file='permissions.zcml')
zope.include(package='plone.registry')
zope.include(package='.exportimport')
zope.include(package='.browser')
five.registerClass(class_='.registry.Registry', meta_type='Plone Configuration Registry', permission='cmf.ManagePortal')
with zope.class__cm(class_='.registry.Registry'):
zope.require(permission='cmf.ManagePortal', interface='plone.registry.interfaces.IRegistry')
gs.registerProfile(name='default', directory='profiles/default', title='Configuration registry', description="A 'Mozilla about:config' style configuration registry", for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/registry/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.registry'):
zope.adapter(factory='.fieldfactory.persistentFieldAdapter')
zope.adapter(factory='.fieldfactory.choicePersistentFieldAdapter')
zope.subscriber(handler='.events.redispatchInterfaceAwareRecordEvents')
# ----------------------------------------------------
# plone/app/registry/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.supermodel')
zope.include(file='handlers.zcml')
# export/import steps
with gs.importStep__cm(name='plone.app.registry', title='Manage the configuration registry', description='Add or remove records, or change values', handler='.handler.importRegistry'):
zope.depends(name='componentregistry')
zope.depends(name='toolset')
gs.exportStep(name='plone.app.registry', title='Export the configuration registry schemata', description='Exports records and settings', handler='.handler.exportRegistry')
# ----------------------------------------------------
# plone/supermodel/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.supermodel'):
zope.include(package='z3c.zcmlhook', file='meta.zcml')
zcml.customAction(handler='.model.finalizeSchemas', order='9999999')
zope.adapter(factory='.directives.FieldsetCheckerPlugin', name='plone.supermodel.fieldset')
zope.adapter(factory='.directives.SupermodelSchemaPlugin', name='plone.supermodel.load')
if config.eval_condition('installed plone.rfc822'):
zope.adapter(factory='.directives.PrimaryFieldsPlugin', name='plone.supermodel.primary')
# Unicode converters
zope.adapter(factory='.converters.DefaultFromUnicode')
zope.adapter(factory='.converters.DefaultToUnicode')
zope.adapter(factory='.converters.DateFromUnicode')
zope.adapter(factory='.converters.DatetimeFromUnicode')
zope.adapter(factory='.converters.InterfaceFieldFromUnicode')
zope.adapter(factory='.converters.InterfaceFieldToUnicode')
zope.adapter(factory='.converters.ObjectFromUnicode')
# Field handlers for all of zope.schema
zope.utility(component='.fields.BytesHandler', name='zope.schema.Bytes')
zope.utility(component='.fields.ASCIIHandler', name='zope.schema.ASCII')
zope.utility(component='.fields.BytesLineHandler', name='zope.schema.BytesLine')
zope.utility(component='.fields.ASCIILineHandler', name='zope.schema.ASCIILine')
zope.utility(component='.fields.TextHandler', name='zope.schema.Text')
zope.utility(component='.fields.TextLineHandler', name='zope.schema.TextLine')
zope.utility(component='.fields.BoolHandler', name='zope.schema.Bool')
zope.utility(component='.fields.IntHandler', name='zope.schema.Int')
zope.utility(component='.fields.FloatHandler', name='zope.schema.Float')
zope.utility(component='.fields.DecimalHandler', name='zope.schema.Decimal')
zope.utility(component='.fields.TupleHandler', name='zope.schema.Tuple')
zope.utility(component='.fields.ListHandler', name='zope.schema.List')
zope.utility(component='.fields.SetHandler', name='zope.schema.Set')
zope.utility(component='.fields.FrozenSetHandler', name='zope.schema.FrozenSet')
zope.utility(component='.fields.PasswordHandler', name='zope.schema.Password')
zope.utility(component='.fields.DictHandler', name='zope.schema.Dict')
zope.utility(component='.fields.DatetimeHandler', name='zope.schema.Datetime')
zope.utility(component='.fields.DateHandler', name='zope.schema.Date')
zope.utility(component='.fields.SourceTextHandler', name='zope.schema.SourceText')
zope.utility(component='.fields.URIHandler', name='zope.schema.URI')
zope.utility(component='.fields.IdHandler', name='zope.schema.Id')
zope.utility(component='.fields.DottedNameHandler', name='zope.schema.DottedName')
zope.utility(component='.fields.InterfaceFieldHandler', name='zope.schema.InterfaceField')
zope.utility(component='.fields.ObjectHandler', name='zope.schema.Object')
zope.utility(component='.fields.ChoiceHandler', name='zope.schema.Choice')
# Field name extractors
zope.adapter(factory='.serializer.DefaultFieldNameExtractor')
# Parsing policy
zope.utility(factory='.parser.DefaultSchemaPolicy')
# ----------------------------------------------------
# z3c/zcmlhook/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/zcml'):
meta.directive(name='customAction', schema='.zcml.ICustomActionDirective', handler='.zcml.customAction')
# ----------------------------------------------------
# plone/app/registry/exportimport/handlers.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.supermodel')
# plone.supermodel field handlers
zope.utility(component='.fields.BytesHandler', name='plone.registry.field.Bytes')
zope.utility(component='.fields.BytesLineHandler', name='plone.registry.field.BytesLine')
zope.utility(component='.fields.ASCIIHandler', name='plone.registry.field.ASCII')
zope.utility(component='.fields.ASCIILineHandler', name='plone.registry.field.ASCIILine')
zope.utility(component='.fields.TextHandler', name='plone.registry.field.Text')
zope.utility(component='.fields.TextLineHandler', name='plone.registry.field.TextLine')
zope.utility(component='.fields.BoolHandler', name='plone.registry.field.Bool')
zope.utility(component='.fields.IntHandler', name='plone.registry.field.Int')
zope.utility(component='.fields.FloatHandler', name='plone.registry.field.Float')
zope.utility(component='.fields.TupleHandler', name='plone.registry.field.Tuple')
zope.utility(component='.fields.ListHandler', name='plone.registry.field.List')
zope.utility(component='.fields.SetHandler', name='plone.registry.field.Set')
zope.utility(component='.fields.FrozenSetHandler', name='plone.registry.field.FrozenSet')
zope.utility(component='.fields.PasswordHandler', name='plone.registry.field.Password')
zope.utility(component='.fields.DictHandler', name='plone.registry.field.Dict')
zope.utility(component='.fields.DatetimeHandler', name='plone.registry.field.Datetime')
zope.utility(component='.fields.DateHandler', name='plone.registry.field.Date')
zope.utility(component='.fields.SourceTextHandler', name='plone.registry.field.SourceText')
zope.utility(component='.fields.URIHandler', name='plone.registry.field.URI')
zope.utility(component='.fields.IdHandler', name='plone.registry.field.Id')
zope.utility(component='.fields.DottedNameHandler', name='plone.registry.field.DottedName')
zope.utility(component='.fields.ChoiceHandler', name='plone.registry.field.Choice')
# ----------------------------------------------------
# plone/app/registry/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.app.z3cform')
zope.include(package='plone.autoform')
browser.defaultView(for_='plone.registry.interfaces.IRegistry', name='configuration_registry')
browser.page(name='configuration_registry', for_='plone.registry.interfaces.IRegistry', template='records.pt', class_='.records.RecordsControlPanel', permission='cmf.ManagePortal')
browser.page(name='edit', for_='plone.registry.interfaces.IRegistry', class_='.edit.RecordEditView', template='edit_layout.pt', permission='cmf.ManagePortal')
browser.resourceDirectory(name='plone.app.registry', directory='resources')
# ----------------------------------------------------
# plone/app/z3cform/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.z3cform')
zope.include(package='.wysiwyg')
zope.include(package='collective.z3cform.datetimewidget')
# Configuration installation profile
zope.include(file='profiles.zcml')
# Set up default templates
browser.page(name='ploneform-macros', for_='*', layer='.interfaces.IPloneFormLayer', class_='.templates.Macros', template='templates/macros.pt', allowed_interface='zope.interface.common.mapping.IItemMapping', permission='zope.Public')
browser.page(name='ploneform-render-widget', for_='z3c.form.interfaces.IWidget', layer='.interfaces.IPloneFormLayer', class_='.templates.RenderWidget', permission='zope.Public')
browser.page(name='ploneform-render-widget', for_='zope.contentprovider.interfaces.IContentProvider', layer='.interfaces.IPloneFormLayer', class_='.templates.RenderContentProvider', permission='zope.Public')
browser.page(name='ploneform-render-widget', for_='z3c.form.interfaces.ISingleCheckBoxWidget', layer='.interfaces.IPloneFormLayer', class_='.templates.RenderSingleCheckboxWidget', permission='zope.Public')
zope.adapter(factory='.templates.layout_factory')
zope.adapter(factory='.templates.form_factory')
# Make the default widget for sequence-of-text-lines a textlines
# widget; the default is too confusing
#
zope.adapter(factory='plone.z3cform.textlines.textlines.TextLinesFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IList zope.schema.interfaces.ITextLine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='plone.z3cform.textlines.textlines.TextLinesFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.ITuple zope.schema.interfaces.ITextLine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='plone.z3cform.textlines.textlines.TextLinesFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IAbstractSet zope.schema.interfaces.ITextLine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='plone.z3cform.textlines.textlines.TextLinesFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IList zope.schema.interfaces.IASCIILine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='plone.z3cform.textlines.textlines.TextLinesFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IASCIILine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='plone.z3cform.textlines.textlines.TextLinesFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IAbstractSet zope.schema.interfaces.IASCIILine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='z3c.form.browser.checkbox.SingleCheckBoxFieldWidget', for_='zope.schema.interfaces.IBool plone.app.z3cform.interfaces.IPloneFormLayer')
with zope.class__cm(class_='zope.schema._field.Date'):
zope.implements(interface='.widget.IDateField')
with zope.class__cm(class_='zope.schema._field.Datetime'):
zope.implements(interface='.widget.IDatetimeField')
zope.adapter(factory='.widget.DateFieldWidget', provides='z3c.form.interfaces.IFieldWidget', for_='.widget.IDateField z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.widget.DatetimeFieldWidget', provides='z3c.form.interfaces.IFieldWidget', for_='.widget.IDatetimeField z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IMultiWidget', layer='.interfaces.IPloneFormLayer', template='templates/multi_input.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IObjectWidget', layer='.interfaces.IPloneFormLayer', template='templates/object_input.pt')
browser.page(name='z3cform_validate_field', for_='*', class_='.inline_validation.InlineValidationView', permission='zope.Public')
zope.adapter(factory='.object.SubformAdapter', for_='zope.interface.Interface plone.app.z3cform.interfaces.IPloneFormLayer zope.interface.Interface zope.interface.Interface z3c.form.interfaces.IObjectWidget zope.interface.Interface zope.interface.Interface')
# Use a custom actions manager that knows how to do CSRF token authentication.
zope.adapter(factory='.csrf.AuthenticatedButtonActions')
# ----------------------------------------------------
# plone/z3cform/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
monkey = config.get_namespace('http://namespaces.plone.org/monkey')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.z3cform'):
zope.include(file='templates.zcml')
zope.include(package='z3c.form', file='meta.zcml')
zope.include(package='z3c.form')
i18n.registerTranslations(directory='locales')
# Override the FileUploadDataConverter from z3c.form.
# We register it for the class so that it is more specific than the one
# registered in z3c.form. This avoids the need for a messy
# overrides.zcml.
#
zope.adapter(for_='zope.schema.Bytes z3c.form.interfaces.IFileWidget', factory='.converter.FileUploadDataConverter')
# Backported from z3c.from trunk
if config.eval_condition('not-installed z3c.form.browser.textlines'):
zope.include(package='.textlines', file='textlines.zcml')
# These are not backported, but represent useful policy
zope.adapter(factory='.textlines.textlines.TextLinesSetConverter')
zope.adapter(factory='.textlines.textlines.TextLinesFrozenSetConverter')
# ++widget++ namespace
zope.adapter(factory='.traversal.FormWidgetTraversal', name='widget')
zope.adapter(factory='.traversal.WrapperWidgetTraversal', name='widget')
# ----------------------------------------------------
# plone/z3cform/templates.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.z3cform'):
# configure chameleon templates if available
if config.eval_condition('installed five.pt'):
zope.include(package='five.pt')
browser.page(name='ploneform-macros', for_='*', class_='.templates.Macros', template='templates/macros.pt', allowed_interface='zope.interface.common.mapping.IItemMapping', permission='zope.Public')
# Form templates for wrapped layout use case
zope.adapter(factory='.templates.layout_factory')
zope.adapter(factory='.templates.wrapped_form_factory')
# Form templates for standalone form use case
zope.adapter(factory='.templates.standalone_form_factory')
# Form templates for subform use case
zope.adapter(factory='.templates.subform_factory')
# ----------------------------------------------------
# z3c/form/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/z3c'):
meta.directive(name='widgetTemplate', schema='.zcml.IWidgetTemplateDirective', handler='.zcml.widgetTemplateDirective')
meta.directive(name='widgetLayout', schema='.zcml.IWidgetTemplateDirective', handler='.zcml.widgetLayoutTemplateDirective')
meta.directive(name='objectWidgetTemplate', schema='.zcml.IObjectWidgetTemplateDirective', handler='.zcml.objectWidgetTemplateDirective')
# ----------------------------------------------------
# z3c/form/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# default z3c.form layer
zope.interface(interface='z3c.form.interfaces.IFormLayer', type='zope.publisher.interfaces.browser.IBrowserSkinType')
# Widget Manager
zope.adapter(factory='.field.FieldWidgets')
zope.adapter(factory='.contentprovider.FieldWidgetsAndProviders')
# Actions, Action Managers and Handlers
zope.subscriber(handler='.form.handleActionError')
zope.include(file='object.zcml')
zope.include(file='apidoc.zcml')
zope.include(file='button.zcml')
zope.include(file='converter.zcml')
zope.include(file='datamanager.zcml')
zope.include(file='error.zcml')
zope.include(file='term.zcml')
zope.include(file='validator.zcml')
zope.include(package='.browser')
i18n.registerTranslations(directory='locales')
# ----------------------------------------------------
# z3c/form/object.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# Data Converters
zope.adapter(factory='.object.ObjectConverter')
# Subform default factory
zope.adapter(factory='.object.SubformAdapter')
# ----------------------------------------------------
# z3c/form/apidoc.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# APIDoc documentation
apidoc = config.get_namespace('http://namespaces.zope.org/apidoc')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('have apidoc'):
apidoc.bookchapter(id='z3c-form', title='z3c.form - Widgets and Forms', doc_path='README.txt')
apidoc.bookchapter(id='z3c-form-form', title='Forms', doc_path='form.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-subform', title='Sub-Forms', doc_path='subform.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-field', title='Fields', doc_path='field.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-button', title='Buttons', doc_path='button.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-validator', title='Validators', doc_path='validator.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-zcml', title='ZCML Directives', doc_path='zcml.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-widget', title='Widgets', doc_path='widget.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-action', title='Actions', doc_path='action.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-value', title='Attribute Values', doc_path='value.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-datamanager', title='Data Managers', doc_path='datamanager.txt', parent='z3c-form')
apidoc.bookchapter(id='z3c-form-converter', title='Data Converters', doc_path='converter.txt', parent='z3c-form')
# ----------------------------------------------------
# z3c/form/button.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# Actions, Action Managers and Handlers
zope.adapter(factory='.button.ButtonAction', provides='.interfaces.IButtonAction')
zope.adapter(factory='.button.ImageButtonAction', provides='.interfaces.IButtonAction')
zope.adapter(factory='.button.ButtonActions')
zope.adapter(factory='.button.ButtonActionHandler')
# ----------------------------------------------------
# z3c/form/converter.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# Data Converters
zope.adapter(factory='.converter.FieldDataConverter')
zope.adapter(factory='.converter.IntegerDataConverter')
zope.adapter(factory='.converter.FloatDataConverter')
zope.adapter(factory='.converter.DecimalDataConverter')
zope.adapter(factory='.converter.DateDataConverter')
zope.adapter(factory='.converter.TimeDataConverter')
zope.adapter(factory='.converter.DatetimeDataConverter')
zope.adapter(factory='.converter.TimedeltaDataConverter')
zope.include(file='file.zcml')
zope.adapter(factory='.converter.SequenceDataConverter')
zope.adapter(factory='.converter.CollectionSequenceDataConverter')
zope.adapter(factory='.converter.BoolSingleCheckboxDataConverter')
zope.adapter(factory='.converter.FieldWidgetDataConverter')
zope.adapter(factory='.converter.TextLinesConverter')
zope.adapter(factory='.converter.MultiConverter')
zope.adapter(factory='.converter.DictMultiConverter')
# ----------------------------------------------------
# z3c/form/file.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# This data converter is registered in its own file so that it
# can be easily excluded in other packages. For example, we may
# want to use the testing.py's file upload data converter widget
# instead of the standard one when we test our application. By
# placing this registration in its own file, we do not have to do
# zcml overrides, but can rather just exclude this file and
# include file_testing.zcml
# Data Converters
zope.adapter(factory='.converter.FileUploadDataConverter')
# ----------------------------------------------------
# z3c/form/datamanager.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# Data Managers
zope.adapter(factory='.datamanager.AttributeField')
zope.adapter(factory='.datamanager.DictionaryField')
# ----------------------------------------------------
# z3c/form/error.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# Error Views
zope.adapter(factory='.error.ErrorViewSnippet', trusted='True', permission='zope.Public')
zope.adapter(factory='.error.InvalidErrorViewSnippet', trusted='True', permission='zope.Public')
zope.adapter(factory='.error.ValueErrorViewSnippet', trusted='True', permission='zope.Public')
zope.adapter(factory='.error.MultipleErrorViewSnippet', trusted='True', permission='zope.Public')
zope.adapter(factory='.error.StandardErrorViewTemplate')
# ----------------------------------------------------
# z3c/form/term.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# ITerms
zope.adapter(factory='.term.ChoiceTerms')
zope.adapter(factory='.term.MissingChoiceTermsVocabulary')
zope.adapter(factory='.term.ChoiceTermsSource')
zope.adapter(factory='.term.CollectionTerms')
zope.adapter(factory='.term.CollectionTermsVocabulary')
zope.adapter(factory='.term.CollectionTermsSource')
zope.adapter(factory='.term.BoolTerms')
# ----------------------------------------------------
# z3c/form/validator.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.form'):
# Validators
zope.adapter(factory='.validator.SimpleFieldValidator')
zope.adapter(factory='.validator.FileUploadValidator')
zope.adapter(factory='.validator.InvariantsValidator')
# ----------------------------------------------------
# z3c/form/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
zope.include(file='button.zcml')
zope.include(file='checkbox.zcml')
zope.include(file='file.zcml')
zope.include(file='image.zcml')
zope.include(file='multi.zcml')
zope.include(file='orderedselect.zcml')
zope.include(file='password.zcml')
zope.include(file='radio.zcml')
zope.include(file='select.zcml')
zope.include(file='submit.zcml')
zope.include(file='text.zcml')
zope.include(file='textarea.zcml')
zope.include(file='textlines.zcml')
zope.include(file='object.zcml')
zope.include(file='widget.zcml')
# ----------------------------------------------------
# z3c/form/browser/button.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IButtonWidget', layer='z3c.form.interfaces.IFormLayer', template='button_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IButtonWidget', layer='z3c.form.interfaces.IFormLayer', template='button_input.pt')
# ----------------------------------------------------
# z3c/form/browser/checkbox.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
# Note: the CheckBoxFieldWidget isn't registered by default
# If you like to use checkboxes you need to use them as custom widget
# factories directly in a form.
#
# Because there is no need for a checkbox since we use select options
# for all kind of Set and ordered list widgets where the order is relevant.
#
# Note: if you use List or Tuple of Choises, you get need a ordered widget
# if order doesn't matter, you should use a Set of Choice and you will
# get a multi select widget.
with zope.class__cm(class_='.checkbox.CheckBoxWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.ICheckBoxWidget')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.ICheckBoxWidget', layer='z3c.form.interfaces.IFormLayer', template='checkbox_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.ICheckBoxWidget', layer='z3c.form.interfaces.IFormLayer', template='checkbox_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.ICheckBoxWidget', layer='z3c.form.interfaces.IFormLayer', template='checkbox_hidden.pt')
# ----------------------------------------------------
# z3c/form/browser/file.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.file.FileWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.IFileWidget')
zope.adapter(factory='.file.FileFieldWidget', for_='zope.schema.interfaces.IBytes z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IFileWidget', layer='z3c.form.interfaces.IFormLayer', template='file_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IFileWidget', layer='z3c.form.interfaces.IFormLayer', template='file_input.pt')
# ----------------------------------------------------
# z3c/form/browser/image.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
zope.adapter(factory='.image.ImageFieldWidget')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IImageWidget', layer='z3c.form.interfaces.IFormLayer', template='image_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IImageWidget', layer='z3c.form.interfaces.IFormLayer', template='image_input.pt')
# ----------------------------------------------------
# z3c/form/browser/multi.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.multi.MultiWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.IMultiWidget')
zope.adapter(factory='.multi.multiFieldWidgetFactory', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IDict z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.multi.MultiFieldWidget', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IDict zope.schema.interfaces.IField z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.multi.MultiFieldWidget', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.IList zope.schema.interfaces.IField z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.multi.MultiFieldWidget', provides='z3c.form.interfaces.IFieldWidget', for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IField z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IMultiWidget', layer='z3c.form.interfaces.IFormLayer', template='multi_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IMultiWidget', layer='z3c.form.interfaces.IFormLayer', template='multi_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.IMultiWidget', layer='z3c.form.interfaces.IFormLayer', template='multi_hidden.pt')
# ----------------------------------------------------
# z3c/form/browser/orderedselect.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.orderedselect.OrderedSelectWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.IOrderedSelectWidget')
zope.adapter(factory='.orderedselect.SequenceSelectFieldWidget')
zope.adapter(factory='.orderedselect.SequenceChoiceSelectFieldWidget', for_='zope.schema.interfaces.IList zope.schema.interfaces.IChoice z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.orderedselect.SequenceChoiceSelectFieldWidget', for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IChoice z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IOrderedSelectWidget', layer='z3c.form.interfaces.IFormLayer', template='orderedselect_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IOrderedSelectWidget', layer='z3c.form.interfaces.IFormLayer', template='orderedselect_input.pt')
# ----------------------------------------------------
# z3c/form/browser/password.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.password.PasswordWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.IPasswordWidget')
zope.adapter(factory='.password.PasswordFieldWidget', for_='zope.schema.interfaces.IPassword z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IPasswordWidget', layer='z3c.form.interfaces.IFormLayer', template='password_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IPasswordWidget', layer='z3c.form.interfaces.IFormLayer', template='password_input.pt')
# ----------------------------------------------------
# z3c/form/browser/radio.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.radio.RadioWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.IRadioWidget')
zope.adapter(factory='.radio.RadioFieldWidget', for_='zope.schema.interfaces.IBool z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IRadioWidget', layer='z3c.form.interfaces.IFormLayer', template='radio_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IRadioWidget', layer='z3c.form.interfaces.IFormLayer', template='radio_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.IRadioWidget', layer='z3c.form.interfaces.IFormLayer', template='radio_hidden.pt')
# ----------------------------------------------------
# z3c/form/browser/select.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.select.SelectWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.ISelectWidget')
zope.adapter(factory='.select.ChoiceWidgetDispatcher')
zope.adapter(factory='.select.SelectFieldWidget')
zope.adapter(factory='.select.CollectionSelectFieldWidget')
zope.adapter(factory='.select.CollectionChoiceSelectFieldWidget')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.ISelectWidget', layer='z3c.form.interfaces.IFormLayer', template='select_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.ISelectWidget', layer='z3c.form.interfaces.IFormLayer', template='select_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.ISelectWidget', layer='z3c.form.interfaces.IFormLayer', template='select_hidden.pt')
# ----------------------------------------------------
# z3c/form/browser/submit.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
zope.adapter(factory='.submit.SubmitFieldWidget')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.ISubmitWidget', layer='z3c.form.interfaces.IFormLayer', template='submit_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.ISubmitWidget', layer='z3c.form.interfaces.IFormLayer', template='submit_input.pt')
# ----------------------------------------------------
# z3c/form/browser/text.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.text.TextWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.ITextWidget')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IBytesLine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IASCIILine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.ITextLine z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IId z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IInt z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IFloat z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IDecimal z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IDate z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IDatetime z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.ITime z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.ITimedelta z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.text.TextFieldWidget', for_='zope.schema.interfaces.IURI z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.ITextWidget', layer='z3c.form.interfaces.IFormLayer', template='text_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.ITextWidget', layer='z3c.form.interfaces.IFormLayer', template='text_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.ITextWidget', layer='z3c.form.interfaces.IFormLayer', template='text_hidden.pt')
# ----------------------------------------------------
# z3c/form/browser/textarea.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.textarea.TextAreaWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.ITextAreaWidget')
zope.adapter(factory='.textarea.TextAreaFieldWidget', for_='zope.schema.interfaces.IASCII z3c.form.interfaces.IFormLayer')
zope.adapter(factory='.textarea.TextAreaFieldWidget', for_='zope.schema.interfaces.IText z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.ITextAreaWidget', layer='z3c.form.interfaces.IFormLayer', template='textarea_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.ITextAreaWidget', layer='z3c.form.interfaces.IFormLayer', template='textarea_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.ITextAreaWidget', layer='z3c.form.interfaces.IFormLayer', template='textarea_hidden.pt')
# ----------------------------------------------------
# z3c/form/browser/textlines.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.textlines.TextLinesWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.ITextLinesWidget')
# this widget is not configured for any field by default
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.ITextLinesWidget', layer='z3c.form.interfaces.IFormLayer', template='textlines_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.ITextLinesWidget', layer='z3c.form.interfaces.IFormLayer', template='textlines_input.pt')
# ----------------------------------------------------
# z3c/form/browser/object.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='z3c.form'):
with zope.class__cm(class_='.object.ObjectWidget'):
zope.require(permission='zope.Public', interface='z3c.form.interfaces.IObjectWidget')
zope.adapter(factory='.object.ObjectFieldWidget', for_='zope.schema.interfaces.IObject z3c.form.interfaces.IFormLayer')
z3c.widgetTemplate(mode='display', widget='z3c.form.interfaces.IObjectWidget', layer='z3c.form.interfaces.IFormLayer', template='object_display.pt')
z3c.widgetTemplate(mode='input', widget='z3c.form.interfaces.IObjectWidget', layer='z3c.form.interfaces.IFormLayer', template='object_input.pt')
z3c.widgetTemplate(mode='hidden', widget='z3c.form.interfaces.IObjectWidget', layer='z3c.form.interfaces.IFormLayer', template='object_input.pt')
# ----------------------------------------------------
# z3c/form/browser/widget.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with browser.configure__cm(i18n_domain='z3c.form'):
# widget layout templates
z3c.widgetLayout(mode='display', widget='z3c.form.interfaces.IWidget', layer='z3c.form.interfaces.IFormLayer', template='widget_layout.pt')
z3c.widgetLayout(mode='input', widget='z3c.form.interfaces.IWidget', layer='z3c.form.interfaces.IFormLayer', template='widget_layout.pt')
z3c.widgetLayout(mode='hidden', widget='z3c.form.interfaces.IWidget', layer='z3c.form.interfaces.IFormLayer', template='widget_layout_hidden.pt')
# ----------------------------------------------------
# plone/app/z3cform/wysiwyg/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='plone'):
with zope.class__cm(class_='.widget.WysiwygWidget'):
zope.require(permission='zope.Public', interface='.widget.IWysiwygWidget')
z3c.widgetTemplate(mode='input', widget='.widget.IWysiwygWidget', layer='z3c.form.interfaces.IFormLayer', template='wysiwyg_input.pt')
z3c.widgetTemplate(mode='display', widget='.widget.IWysiwygWidget', layer='z3c.form.interfaces.IFormLayer', template='wysiwyg_display.pt')
# ----------------------------------------------------
# collective/z3cform/datetimewidget/configure.zcml
# ----------------------------------------------------
def includeme(config):
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='collective.z3cform.datetimewidget'):
zope.include(package='z3c.form')
i18n.registerTranslations(directory='locales')
# WIDGETS
# Date widget
with zope.class__cm(class_='.widget_date.DateWidget'):
zope.require(permission='zope.Public', interface='.interfaces.IDateWidget')
# use Date by default
with zope.class__cm(class_='zope.schema._field.Date'):
zope.implements(interface='.interfaces.IDateField')
zope.adapter(factory='.widget_date.DateFieldWidget', for_='.interfaces.IDateField z3c.form.interfaces.IFormLayer')
# Datetime widget
with zope.class__cm(class_='.widget_datetime.DatetimeWidget'):
zope.require(permission='zope.Public', interface='.interfaces.IDatetimeWidget')
# use Datetime by default
with zope.class__cm(class_='zope.schema._field.Datetime'):
zope.implements(interface='.interfaces.IDatetimeField')
zope.adapter(factory='.widget_datetime.DatetimeFieldWidget', for_='.interfaces.IDatetimeField z3c.form.interfaces.IFormLayer')
# MonthYear widget
with zope.class__cm(class_='.widget_monthyear.MonthYearWidget'):
zope.require(permission='zope.Public', interface='.interfaces.IMonthYearWidget')
# CONVERTORS
zope.adapter(factory='.converter.DateDataConverter', for_='zope.schema.interfaces.IDate .interfaces.IDateWidget')
zope.adapter(factory='.converter.DatetimeDataConverter', for_='zope.schema.interfaces.IDatetime .interfaces.IDatetimeWidget')
zope.adapter(factory='.converter.MonthYearDataConverter', for_='zope.schema.interfaces.IDate .interfaces.IMonthYearWidget')
# TEMPLATES
# Date widget
z3c.widgetTemplate(mode='display', widget='.interfaces.IDateWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/display.pt')
z3c.widgetTemplate(mode='input', widget='.interfaces.IDateWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/date_input.pt')
z3c.widgetTemplate(mode='hidden', widget='.interfaces.IDateWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/hidden.pt')
# Datetime widget
z3c.widgetTemplate(mode='display', widget='.interfaces.IDatetimeWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/display.pt')
z3c.widgetTemplate(mode='input', widget='.interfaces.IDatetimeWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/datetime_input.pt')
z3c.widgetTemplate(mode='hidden', widget='.interfaces.IDatetimeWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/hidden.pt')
# MonthYear widget
z3c.widgetTemplate(mode='display', widget='.interfaces.IMonthYearWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/display.pt')
z3c.widgetTemplate(mode='input', widget='.interfaces.IMonthYearWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/monthyear_input.pt')
z3c.widgetTemplate(mode='hidden', widget='.interfaces.IMonthYearWidget', layer='z3c.form.interfaces.IFormLayer', template='templates/hidden.pt')
if config.eval_condition('installed Products.GenericSetup'):
if config.eval_condition('installed plone.app.jquerytools'):
zope.include(package='Products.GenericSetup', file='meta.zcml')
gs.registerProfile(name='default', title='collective.z3cform.datetimewidget', directory='profiles/default', description='Enable plone.app.jquerytools support for date-time widget', provides='Products.GenericSetup.interfaces.EXTENSION')
gs.importStep(name='collective.z3cform.datetimewidget_various', title='collective.z3cform.datetimewidget date picker support', description='Enable JQuery Tools date picker', handler='collective.z3cform.datetimewidget.setuphandlers.importVarious')
# ----------------------------------------------------
# plone/app/z3cform/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
plone = config.get_namespace('http://namespaces.plone.org/plone')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='default', title='Plone z3c.form support', description='Adds support for rendering z3c.form forms in Plone', directory='profiles/default', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.IPloneSiteRoot')
# ----------------------------------------------------
# plone/autoform/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.autoform'):
zope.include(package='plone.z3cform')
zope.include(package='plone.supermodel')
zope.utility(factory='.supermodel.FormSchema', name='plone.autoform.form')
zope.utility(factory='.supermodel.SecuritySchema', name='plone.autoform.security')
zope.adapter(factory='.directives.OmittedPlugin', name='plone.autoform.omitted')
zope.adapter(factory='.directives.ModePlugin', name='plone.autoform.mode')
zope.adapter(factory='.directives.WidgetPlugin', name='plone.autoform.widget')
zope.adapter(factory='.directives.OrderPlugin', name='plone.autoform.order')
zope.adapter(factory='.directives.ReadPermissionsPlugin', name='plone.autoform.read_permissions')
zope.adapter(factory='.directives.WritePermissionsPlugin', name='plone.autoform.write_permissions')
# widget import/export
zope.utility(provides='.interfaces.IWidgetExportImportHandler', component='.widgets.TextAreaWidgetExportImportHandler', name='z3c.form.browser.textarea.TextAreaFieldWidget')
# ----------------------------------------------------
# plone/app/collection/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.app.contentmenu')
# Views for in Display menu
browser.page(name='standard_view', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/standard_view.pt')
browser.page(name='summary_view', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/summary_view.pt')
browser.page(name='all_content', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/all_content.pt')
browser.page(name='tabular_view', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/tabular_view.pt')
browser.page(name='thumbnail_view', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/thumbnail_view.pt')
browser.page(name='folder_summary_view', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/summary_view.pt')
with browser.menuItems__cm(for_='plone.app.collection.interfaces.ICollection', menu='plone_displayviews'):
browser.menuItem(title='Standard view', action='standard_view')
browser.menuItem(title='Summary view', action='summary_view')
browser.menuItem(title='All content', action='all_content')
browser.menuItem(title='Tabular view', action='tabular_view')
browser.menuItem(title='Thumbnail view', action='thumbnail_view')
if config.eval_condition('not-have Plone-43'):
browser.page(name='RSS', permission='zope2.View', for_='plone.app.collection.interfaces.ICollection', template='templates/rss.pt')
# ----------------------------------------------------
# plone/app/contentmenu/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
# Top level menu
browser.menu(id='plone_contentmenu', title='Content menu - contains contextual actions related to the content', interface='.interfaces.IContentMenuItem')
# Sub-menus
browser.menu(id='plone_contentmenu_actions', title="The 'actions' menu - allows the user to execute actions on an object", class_='.menu.ActionsMenu')
browser.menu(id='plone_contentmenu_display', title="The 'display' menu - allows the user to select the view of an object", class_='.menu.DisplayMenu')
browser.menu(id='plone_contentmenu_factory', title="The 'add' menu - allows the user to add new content items in the context", class_='.menu.FactoriesMenu')
browser.menu(id='plone_contentmenu_workflow', title="The 'workflow' menu - allows the user to execute workflow transitions", class_='.menu.WorkflowMenu')
#
# The menu items in the contentMenu are all sub-menu items. Unfortunately,
# Five (with Zope 2.9 at least) does not seem to support the subMenuItem
# directive. More importantly, the menus require additional logic beyond what
# Zope 3's BrowserMenuItem provides - principally dynamic titles and more
# flexible available() methods.
#
# In the spirit of not inventing additional ZCML, we simply register our menu
# items as what they are: adapters of (context, request) -> IContentMenuItem.
#
# You can override these registrations in your own overrides.zcml. You can
# also plug new sub-menus into the menu by providing similar menu item
# registrations. If the browser:menuItem directive is sufficient, you should
# be able to use this as normal.
#
# Note that menu items are ordered by an 'ordered' property. To allow third
# party products to slot their own sub-menus in between the default menu
# items, these are registered with gaps:
#
# actions menu - order=10
# display menu - order=20
# factories menu - order=30
# workflows menu - order=40
#
zope.adapter(for_='* *', name='plone.contentmenu.actions', factory='.menu.ActionsSubMenuItem', provides='.interfaces.IContentMenuItem')
zope.adapter(for_='* *', name='plone.contentmenu.display', factory='.menu.DisplaySubMenuItem', provides='.interfaces.IContentMenuItem')
zope.adapter(for_='* *', name='plone.contentmenu.factories', factory='.menu.FactoriesSubMenuItem', provides='.interfaces.IContentMenuItem')
zope.adapter(for_='* *', name='plone.contentmenu.workflow', factory='.menu.WorkflowSubMenuItem', provides='.interfaces.IContentMenuItem')
# A content provider showing the menu
zope.adapter(for_='* zope.publisher.interfaces.browser.IDefaultBrowserLayer *', factory='.view.ContentMenuProvider', name='plone.contentmenu', provides='zope.contentprovider.interfaces.IContentProvider')
# The displayviews menu used to register user-visible titles
browser.menu(id='plone_displayviews', title='Zope3 Views used as selectable content views', description='Menu listing Zope3 views registered for use as dynamic views on CMF Content. Currently the only purpose of this menu is the registration of user-visible titles for these views', class_='.displayviewsmenu.DisplayViewsMenu')
# ----------------------------------------------------
# plone/app/content/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
plone = config.get_namespace('http://namespaces.plone.org/plone')
zope.include(package='.browser')
# Register a name chooser that chooses plone-like normalized names
zope.adapter(for_='Products.CMFCore.interfaces.IFolderish', factory='.namechooser.NormalizingNameChooser', provides='zope.container.interfaces.INameChooser')
# Re-index content when it's modified
zope.subscriber(for_='.interfaces.IReindexOnModify zope.lifecycleevent.interfaces.IObjectModifiedEvent', handler='.catalog.reindexOnModify')
# ----------------------------------------------------
# plone/app/content/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Adding view
browser.view(for_='Products.CMFCore.interfaces.IFolderish', name='+', class_='.adding.CMFAdding', permission='cmf.AddPortalContent')
# Folder contents
browser.page(for_='*', class_='.foldercontents.FolderContentsView', name='folder_contents', template='folder_contents.pt', permission='cmf.ListFolderContents')
browser.page(for_='*', class_='.foldercontents.FolderContentsBrowserView', attribute='update_table', name='foldercontents_get_table', permission='cmf.ListFolderContents')
browser.resource(file='folder_contents.js', name='folder_contents.js')
# Review list
browser.page(for_='*', class_='.reviewlist.FullReviewListView', name='full_review_list', template='full_review_list.pt', permission='cmf.ReviewPortalContent')
browser.page(for_='*', class_='.reviewlist.ReviewListBrowserView', attribute='update_table', name='reviewlist_get_table', permission='cmf.ReviewPortalContent')
# Folder factories
browser.page(for_='*', name='folder_factories', class_='.folderfactories.FolderFactoriesView', template='folderfactories.pt', permission='cmf.AddPortalContent')
# Constrain container allowed content types
browser.page(name='folder_constraintypes_form', for_='Products.CMFCore.interfaces.IFolderish', permission='zope2.View', class_='.constraintypes.ConstrainsFormView')
zope.utility(component='.constraintypes.ValidTypesFactory', name='plone.app.content.ValidAddableTypes')
# ----------------------------------------------------
# plone/app/contentrules/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='zope.annotation')
zope.include(package='plone.contentrules')
zope.include(package='plone.contentrules', file='meta.zcml')
# Create permissions
zope.permission(id='plone.app.contentrules.ManageContentRules', title='Content rules: Manage rules')
zope.include(package='.browser')
zope.include(package='.actions')
zope.include(package='.conditions')
zope.include(package='.exportimport')
# Make any folder and the portal root a possible container for rules
with zope.class__cm(class_='Products.CMFPlone.Portal.PloneSite'):
zope.implements(interface='plone.contentrules.engine.interfaces.IRuleAssignable')
if config.eval_condition('installed Products.ATContentTypes'):
with zope.class__cm(class_='Products.ATContentTypes.content.folder.ATFolder'):
zope.implements(interface='plone.contentrules.engine.interfaces.IRuleAssignable')
with zope.class__cm(class_='Products.ATContentTypes.content.folder.ATBTreeFolder'):
zope.implements(interface='plone.contentrules.engine.interfaces.IRuleAssignable')
# Let rules be annotatable - used to keep track of rule-to-assignment mappings
with zope.class__cm(class_='plone.app.contentrules.rule.Rule'):
zope.implements(interface='zope.annotation.interfaces.IAttributeAnnotatable')
# Make the object related events selectable
zope.interface(interface='zope.lifecycleevent.interfaces.IObjectAddedEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='Object added to this container')
zope.interface(interface='zope.lifecycleevent.interfaces.IObjectRemovedEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='Object removed from this container')
zope.interface(interface='zope.lifecycleevent.interfaces.IObjectModifiedEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='Object modified')
zope.interface(interface='Products.CMFCore.interfaces.IActionSucceededEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='Workflow state changed')
zope.interface(interface='Products.PluggableAuthService.interfaces.events.IUserLoggedInEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='User Logged in')
zope.interface(interface='Products.PluggableAuthService.interfaces.events.IUserLoggedOutEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='User Logged out')
zope.interface(interface='Products.PluggableAuthService.interfaces.events.IPrincipalCreatedEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='User Created')
zope.interface(interface='Products.PluggableAuthService.interfaces.events.IPrincipalDeletedEvent', type='plone.contentrules.rule.interfaces.IRuleEventType', name='User Removed')
# Register handlers
# Rule triggers
zope.subscriber(for_='zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.handlers.added')
if config.eval_condition('installed Products.Archetypes'):
zope.subscriber(for_='Products.Archetypes.interfaces.IObjectInitializedEvent', handler='.handlers.archetypes_initialized')
zope.subscriber(for_='zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.handlers.removed')
zope.subscriber(for_='zope.lifecycleevent.interfaces.IObjectModifiedEvent', handler='.handlers.modified')
zope.subscriber(for_='Products.CMFCore.interfaces.IActionSucceededEvent', handler='.handlers.workflow_action')
zope.subscriber(for_='Products.PluggableAuthService.interfaces.events.IUserLoggedInEvent', handler='.handlers.user_logged_in')
zope.subscriber(for_='Products.PluggableAuthService.interfaces.events.IUserLoggedOutEvent', handler='.handlers.user_logged_out')
zope.subscriber(for_='Products.PluggableAuthService.interfaces.events.IPrincipalCreatedEvent', handler='.handlers.user_created')
# Cleanup
zope.subscriber(for_='zope.publisher.interfaces.IEndRequestEvent', handler='.handlers.close')
# Rule-to-assignment mappings
zope.subscriber(for_='plone.contentrules.engine.interfaces.IRuleAssignable zope.lifecycleevent.interfaces.IObjectMovedEvent', handler='.rule.container_moved')
zope.subscriber(for_='plone.contentrules.engine.interfaces.IRuleAssignable zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.rule.container_removed')
zope.subscriber(for_='plone.contentrules.rule.interfaces.IRule zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.rule.rule_removed')
# Register a name chooser explicitly
zope.adapter(provides='zope.container.interfaces.INameChooser', for_='plone.contentrules.engine.interfaces.IRuleStorage', factory='.namechooser.RuleNameChooser')
# ----------------------------------------------------
# plone/contentrules/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='zope.annotation')
zope.include(package='.engine')
zope.include(package='.rule')
# ----------------------------------------------------
# plone/contentrules/engine/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.assignments.ruleAssignmentManagerAdapterFactory')
zope.adapter(factory='.executor.RuleExecutor')
# ----------------------------------------------------
# plone/contentrules/rule/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.rule.RuleExecutable')
zope.utility(component='.eventvocab.EventTypesVocabulary', name='plone.contentrules.events')
# ----------------------------------------------------
# plone/app/contentrules/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Site-wide information
browser.page(for_='*', name='plone_contentrules_info', class_='.info.ContentRulesInfo', allowed_interface='.interfaces.IContentRulesInfo', permission='zope.Public')
# Adding views for rules and elements
browser.view(for_='Products.CMFCore.interfaces.ISiteRoot', name='+rule', class_='.adding.RuleAdding', allowed_interface='plone.app.contentrules.browser.interfaces.IRuleAdding', permission='plone.app.contentrules.ManageContentRules')
with zope.class__cm(class_='.adding.RuleAdding'):
zope.require(permission='plone.app.contentrules.ManageContentRules', interface='.interfaces.IRuleAdding')
browser.view(for_='plone.contentrules.rule.interfaces.IRule', name='+condition', class_='.adding.RuleConditionAdding', allowed_interface='.interfaces.IRuleConditionAdding', permission='plone.app.contentrules.ManageContentRules')
with zope.class__cm(class_='.adding.RuleConditionAdding'):
zope.require(permission='plone.app.contentrules.ManageContentRules', interface='.interfaces.IRuleConditionAdding')
browser.view(for_='plone.contentrules.rule.interfaces.IRule', name='+action', class_='.adding.RuleActionAdding', allowed_interface='.interfaces.IRuleActionAdding', permission='plone.app.contentrules.ManageContentRules')
with zope.class__cm(class_='.adding.RuleActionAdding'):
zope.require(permission='plone.app.contentrules.ManageContentRules', interface='.interfaces.IRuleActionAdding')
# Add and edit form for rules
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleAdding', name='plone.ContentRule', class_='.rule.RuleAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.contentrules.rule.interfaces.IRule', name='edit', class_='.rule.RuleEditForm', permission='plone.app.contentrules.ManageContentRules')
# Manage rules
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', name='rules-controlpanel', class_='.controlpanel.ContentRulesControlPanel', permission='plone.app.contentrules.ManageContentRules', allowed_attributes='template')
browser.page(name='manage-elements', for_='plone.contentrules.rule.interfaces.IRule', class_='.elements.ManageElements', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.contentrules.engine.interfaces.IRuleAssignable', name='manage-content-rules', class_='.assignments.ManageAssignments', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot', name='contentrule-enable', class_='.controlpanel.ContentRulesControlPanel', attribute='enable_rule', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot', name='contentrule-disable', class_='.controlpanel.ContentRulesControlPanel', attribute='disable_rule', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot', name='contentrule-delete', class_='.controlpanel.ContentRulesControlPanel', attribute='delete_rule', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot', name='contentrule-globally-enable', class_='.controlpanel.ContentRulesControlPanel', attribute='globally_enable', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot', name='contentrule-globally-disable', class_='.controlpanel.ContentRulesControlPanel', attribute='globally_disable', permission='plone.app.contentrules.ManageContentRules')
# Namespace for rules, and for actions and conditions
zope.adapter(factory='.traversal.RuleNamespace', name='rule')
zope.adapter(factory='.traversal.RuleConditionNamespace', name='condition')
zope.adapter(factory='.traversal.RuleActionNamespace', name='action')
# Default page layout for cont rules add/edit forms
zope.adapter(for_='.interfaces.IContentRulesForm', factory='.formhelper.contentrules_named_template_adapter', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
# When we access rules and elements, we still want to use a CMF/Plone
# main_template
with zope.configure__cm(package='Products.CMFDefault.skin'):
browser.page(name='five_template', for_='plone.app.contentrules.browser.interfaces.IRuleAdding', template='five_template.pt', permission='zope2.View')
browser.page(name='five_template', for_='plone.app.contentrules.browser.interfaces.IRuleElementAdding', template='five_template.pt', permission='zope2.View')
browser.page(name='five_template', for_='plone.contentrules.rule.interfaces.IRule', template='five_template.pt', permission='zope2.View')
browser.page(name='five_template', for_='plone.contentrules.rule.interfaces.IRuleElementData', template='five_template.pt', permission='zope2.View')
# Resources
browser.resource(name='manage-contentrules.js', file='contentrules.js')
# Resources
browser.resource(name='manage-contentrule-elements.js', file='contentrule-elements.js')
browser.resource(name='manage-contentrules.css', file='contentrules.css')
# Rule breadcrumb
browser.page(for_='plone.contentrules.rule.interfaces.IRule', name='breadcrumbs_view', class_='.navigation.RuleBreadcrumbs', permission='zope.Public', allowed_attributes='breadcrumbs')
# ----------------------------------------------------
# plone/app/contentrules/actions/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Logger action
zope.adapter(factory='.logger.LoggerActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Logger', class_='.logger.LoggerAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.actions.logger.ILoggerAction', name='edit', class_='.logger.LoggerEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Logger', title='Logger', description='Log a particular event', for_='*', event='*', addview='plone.actions.Logger', editview='edit', schema='.logger.ILoggerAction', factory='.logger.LoggerAction')
# Notify action
zope.adapter(factory='.notify.NotifyActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Notify', class_='.notify.NotifyAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.actions.notify.INotifyAction', name='edit', class_='.notify.NotifyEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Notify', title='Notify user', description='Return a portal message to the user', for_='*', event='*', addview='plone.actions.Notify', editview='edit', schema='.notify.INotifyAction', factory='.notify.NotifyAction')
# Copy to folder action
zope.adapter(factory='.copy.CopyActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Copy', class_='.copy.CopyAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.actions.copy.ICopyAction', name='edit', class_='.copy.CopyEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Copy', title='Copy to folder', description='Copy the triggering item to a specific folder', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.actions.Copy', editview='edit', schema='.copy.ICopyAction', factory='.copy.CopyAction')
# Move to folder action
zope.adapter(factory='.move.MoveActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Move', class_='.move.MoveAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.actions.move.IMoveAction', name='edit', class_='.move.MoveEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Move', title='Move to folder', description='Move the triggering item to a specific folder', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.actions.Move', editview='edit', schema='.move.IMoveAction', factory='.move.MoveAction')
# Delete action (no configurable options)
zope.adapter(factory='.delete.DeleteActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Delete', class_='.delete.DeleteAddForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Delete', title='Delete object', description='Delete the triggering item', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.actions.Delete', schema='.delete.IDeleteAction', factory='.delete.DeleteAction')
# Transition workflow action
zope.adapter(factory='.workflow.WorkflowActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Workflow', class_='.workflow.WorkflowAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.actions.workflow.IWorkflowAction', name='edit', class_='.workflow.WorkflowEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Workflow', title='Transition workflow state', description='Perform a workflow transition on the triggering object', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.actions.Workflow', editview='edit', schema='.workflow.IWorkflowAction', factory='.workflow.WorkflowAction')
# Email action definition
zope.adapter(factory='.mail.MailActionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleActionAdding', name='plone.actions.Mail', class_='.mail.MailAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.actions.mail.IMailAction', name='edit', class_='.mail.MailEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleAction(name='plone.actions.Mail', title='Send email', description='Send an email on the triggering object', for_='*', event='*', addview='plone.actions.Mail', editview='edit', schema='.mail.IMailAction', factory='.mail.MailAction')
# ----------------------------------------------------
# plone/app/contentrules/conditions/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# needed since Plone 4.1 to use cmf permissions in ZCML declaration.
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('have plone-41'):
zope.include(package='Products.CMFCore', file='permissions.zcml')
# Portal type condition
zope.adapter(factory='.portaltype.PortalTypeConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.PortalType', class_='.portaltype.PortalTypeAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.conditions.portaltype.IPortalTypeCondition', name='edit', class_='.portaltype.PortalTypeEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleCondition(name='plone.conditions.PortalType', title='Content type', description='Apply only when the current content object is of a particular type', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.conditions.PortalType', editview='edit', schema='.portaltype.IPortalTypeCondition', factory='.portaltype.PortalTypeCondition')
# File extension condition
zope.adapter(factory='.fileextension.FileExtensionConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.FileExtension', class_='.fileextension.FileExtensionAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.conditions.fileextension.IFileExtensionCondition', name='edit', class_='.fileextension.FileExtensionEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleCondition(name='plone.conditions.FileExtension', title='File Extension', description='Apply only to a particular file extension', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.conditions.FileExtension', editview='edit', schema='.fileextension.IFileExtensionCondition', factory='.fileextension.FileExtensionCondition')
# Workflow state condition (for any object)
zope.adapter(factory='.wfstate.WorkflowStateConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.WorkflowState', class_='.wfstate.WorkflowStateAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.conditions.wfstate.IWorkflowStateCondition', name='edit', class_='.wfstate.WorkflowStateEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleCondition(name='plone.conditions.WorkflowState', title='Workflow state', description='Apply only to a objects in a particular workflow state', for_='*', event='zope.component.interfaces.IObjectEvent', addview='plone.conditions.WorkflowState', editview='edit', schema='.wfstate.IWorkflowStateCondition', factory='.wfstate.WorkflowStateCondition')
# Workflow transition condition (for any object)
zope.adapter(factory='.wftransition.WorkflowTransitionConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.WorkflowTransition', class_='.wftransition.WorkflowTransitionAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.conditions.wftransition.IWorkflowTransitionCondition', name='edit', class_='.wftransition.WorkflowTransitionEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleCondition(name='plone.conditions.WorkflowTransition', title='Workflow transition', description='Apply only when the executed transition was as specified', for_='*', event='Products.CMFCore.interfaces.IActionSucceededEvent', addview='plone.conditions.WorkflowTransition', editview='edit', schema='.wftransition.IWorkflowTransitionCondition', factory='.wftransition.WorkflowTransitionCondition')
# Group condition
zope.adapter(factory='.group.GroupConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.Group', class_='.group.GroupAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.conditions.group.IGroupCondition', name='edit', class_='.group.GroupEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleCondition(name='plone.conditions.Group', title="User's group", description='Apply only when the current user is in the given group', for_='*', event='*', addview='plone.conditions.Group', editview='edit', schema='.group.IGroupCondition', factory='.group.GroupCondition')
# Role condition
zope.adapter(factory='.role.RoleConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.Role', class_='.role.RoleAddForm', permission='plone.app.contentrules.ManageContentRules')
browser.page(for_='plone.app.contentrules.conditions.role.IRoleCondition', name='edit', class_='.role.RoleEditForm', permission='plone.app.contentrules.ManageContentRules')
plone.ruleCondition(name='plone.conditions.Role', title="User's role", description='Apply only when the current user has the given role', for_='*', event='*', addview='plone.conditions.Role', editview='edit', schema='.role.IRoleCondition', factory='.role.RoleCondition')
# TALES expression condition
zope.adapter(factory='.talesexpression.TalesExpressionConditionExecutor')
browser.page(for_='plone.app.contentrules.browser.interfaces.IRuleConditionAdding', name='plone.conditions.TalesExpression', class_='.talesexpression.TalesExpressionAddForm', permission='cmf.ManagePortal')
browser.page(for_='.talesexpression.ITalesExpressionCondition', name='edit', class_='.talesexpression.TalesExpressionEditForm', permission='cmf.ManagePortal')
plone.ruleCondition(name='plone.conditions.TalesExpression', title='TALES expression', description='Apply only when the result of a TALES expression is True', for_='*', event='*', addview='plone.conditions.TalesExpression', editview='edit', schema='.talesexpression.ITalesExpressionCondition', factory='.talesexpression.TalesExpressionCondition')
# ----------------------------------------------------
# plone/app/contentrules/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.rules.RulesXMLAdapter', name='plone.contentrules')
zope.adapter(factory='.rules.PropertyRuleElementExportImportHandler')
# Register import and export steps
with genericsetup.importStep__cm(name='contentrules', title='Content rules', description='Import content rule definitions and assignments', handler='.rules.importRules'):
zope.depends(name='componentregistry')
zope.depends(name='content')
zope.depends(name='workflow')
genericsetup.exportStep(name='contentrules', title='Content rules', description='Export content rule definitions and assignments', handler='.rules.exportRules')
# ----------------------------------------------------
# plone/app/controlpanel/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='Products.CMFCore')
zope.include(file='permissions.zcml')
zope.adapter(factory='.calendar.CalendarControlPanelAdapter')
zope.adapter(for_='*', factory='.editing.EditingControlPanelAdapter')
zope.adapter(factory='.filter.FilterControlPanelAdapter')
zope.adapter(factory='.language.LanguageControlPanelAdapter')
zope.adapter(factory='.navigation.NavigationControlPanelAdapter')
zope.adapter(factory='.mail.MailControlPanelAdapter')
zope.adapter(factory='.maintenance.MaintenanceControlPanelAdapter')
zope.adapter(factory='.markup.MarkupControlPanelAdapter')
zope.adapter(factory='.ram.RAMCacheControlPanelAdapter')
zope.adapter(factory='.search.SearchControlPanelAdapter')
zope.adapter(factory='.security.SecurityControlPanelAdapter')
zope.adapter(factory='.site.SiteControlPanelAdapter')
zope.adapter(factory='.skins.SkinsControlPanelAdapter')
zope.adapter(factory='.usergroups.UserGroupsSettingsControlPanelAdapter')
browser.page(name='calendar-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.calendar.CalendarControlPanel', permission='plone.app.controlpanel.Calendar')
browser.page(name='editing-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.editing.EditingControlPanel', permission='plone.app.controlpanel.Editing')
browser.page(name='filter-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.filter.FilterControlPanel', permission='plone.app.controlpanel.Filtering')
browser.page(name='language-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.language.LanguageControlPanel', permission='plone.app.controlpanel.Language')
browser.page(name='mail-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.mail.MailControlPanel', permission='plone.app.controlpanel.Mail')
browser.page(name='markup-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.markup.MarkupControlPanel', permission='plone.app.controlpanel.Markup')
browser.page(name='maintenance-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.maintenance.MaintenanceControlPanel', permission='cmf.ManagePortal')
browser.page(name='navigation-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.navigation.NavigationControlPanel', permission='plone.app.controlpanel.Navigation')
browser.page(name='overview-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.overview.OverviewControlPanel', permission='plone.app.controlpanel.Overview')
browser.page(name='ramcache-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.ram.RAMCacheControlPanel', permission='cmf.ManagePortal')
browser.page(name='search-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.search.SearchControlPanel', permission='plone.app.controlpanel.Search')
browser.page(name='security-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.security.SecurityControlPanel', permission='plone.app.controlpanel.Security')
browser.page(name='site-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.site.SiteControlPanel', permission='plone.app.controlpanel.Site')
browser.page(name='skins-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.skins.SkinsControlPanel', permission='plone.app.controlpanel.Themes')
browser.page(name='types-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.types.TypesControlPanel', permission='plone.app.controlpanel.Types')
browser.page(name='usergroup-userprefs', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.usergroups.UsersOverviewControlPanel', permission='plone.app.controlpanel.UsersAndGroups', template='usergroups_usersoverview.pt')
browser.page(name='usergroup-groupprefs', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.usergroups.GroupsOverviewControlPanel', permission='plone.app.controlpanel.UsersAndGroups', template='usergroups_groupsoverview.pt')
browser.page(name='usergroup-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.usergroups.UserGroupsSettingsControlPanel', permission='plone.app.controlpanel.UsersAndGroups')
browser.page(name='usergroup-groupmembership', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.usergroups.GroupMembershipControlPanel', permission='plone.app.controlpanel.UsersAndGroups', template='usergroups_groupmembership.pt')
browser.page(name='usergroup-usermembership', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.usergroups.UserMembershipControlPanel', permission='plone.app.controlpanel.UsersAndGroups', template='usergroups_usermembership.pt')
browser.page(name='usergroup-groupdetails', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.usergroups.GroupDetailsControlPanel', permission='plone.app.controlpanel.UsersAndGroups', template='usergroups_groupdetails.pt')
zope.view(type='zope.publisher.interfaces.browser.IBrowserRequest', for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IVocabularyTokenized', provides='zope.formlib.interfaces.IInputWidget', factory='.widgets.MultiSelectTupleWidget', permission='zope.Public')
zope.utility(component='.markup.WickedTypesVocabularyFactory', name='plone.app.controlpanel.WickedPortalTypes')
zope.subscriber(handler='.events.handleConfigurationChangedEvent')
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='migrate-to-emaillogin', class_='.security.EmailLogin', template='emaillogin.pt', permission='cmf.ManagePortal')
# ----------------------------------------------------
# plone/app/controlpanel/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.permission__cm(id='plone.app.controlpanel.Overview', title='Plone Site Setup: Overview'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Calendar', title='Plone Site Setup: Calendar'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Editing', title='Plone Site Setup: Editing'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Filtering', title='Plone Site Setup: Filtering'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Language', title='Plone Site Setup: Language'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Mail', title='Plone Site Setup: Mail'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Markup', title='Plone Site Setup: Markup'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Navigation', title='Plone Site Setup: Navigation'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Search', title='Plone Site Setup: Search'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Security', title='Plone Site Setup: Security'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Site', title='Plone Site Setup: Site'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Themes', title='Plone Site Setup: Themes'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.Types', title='Plone Site Setup: Types'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
with zope.permission__cm(id='plone.app.controlpanel.UsersAndGroups', title='Plone Site Setup: Users and Groups'):
zope.role(name='Manager')
zope.role(name='Site Administrator')
# ----------------------------------------------------
# plone/app/customerize/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
five.registerPackage(package='.', initialize='.initialize')
zope.include(file='dependencies.zcml')
with browser.pages__cm(for_='five.customerize.interfaces.IViewTemplateContainer', class_='.browser.RegistrationsView', permission='five.ManageSite'):
browser.page(name='registrations.html', template='registrations.pt')
browser.page(name='customizezpt.html', template='customize.pt')
browser.page(name='customizezpt', attribute='customizeTemplate')
# ----------------------------------------------------
# plone/app/customerize/dependencies.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(package='five.customerize')
# ----------------------------------------------------
# five/customerize/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='five.customerize'):
zope.permission(id='five.AddTTWViewTemplate', title='Five: Add TTW View Template')
five.registerClass(class_='.zpt.TTWViewTemplate', meta_type='TTW View Template', permission='five.AddTTWViewTemplate')
zope.utility(component='zope.componentvocabulary.vocabulary.InterfacesVocabulary', name='Interfaces')
with browser.pages__cm(for_='*', class_='.browser.CustomizationView', permission='five.ManageSite'):
browser.page(name='zptviews.html', template='zptviews.pt')
browser.page(name='customizezpt.html', template='customize.pt')
browser.page(name='customizezpt', attribute='customizeTemplate')
zope.subscriber(handler='.zpt.unregisterViewWhenZPTIsDeleted')
with browser.pages__cm(for_='.zpt.ITTWViewTemplate', class_='.browser.RegistrationsView', permission='five.ManageSite'):
browser.page(name='registrations.html', template='registrations.pt')
browser.page(name='unregister', attribute='unregister')
browser.page(name='register', attribute='register')
# ----------------------------------------------------
# plone/app/discussion/configure.zcml
# ----------------------------------------------------
def includeme(config):
monkey = config.get_namespace('http://namespaces.plone.org/monkey')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.discussion'):
five.registerPackage(package='.')
zope.include(package='plone.indexer')
zope.include(package='plone.app.registry')
zope.include(package='plone.uuid')
zope.include(package='plone.app.uuid')
zope.include(file='permissions.zcml')
zope.include(file='notifications.zcml')
zope.include(file='subscribers.zcml')
zope.include(file='upgrades.zcml')
# load captch before browser
if config.eval_condition('installed plone.formwidget.captcha'):
zope.include(package='plone.formwidget.captcha')
if config.eval_condition('installed plone.formwidget.recaptcha'):
zope.include(package='plone.formwidget.recaptcha')
if config.eval_condition('installed collective.z3cform.norobots'):
zope.include(package='collective.z3cform.norobots')
zope.include(package='.browser')
i18n.registerTranslations(directory='locales')
# Register the installation GenericSetup extension profile
genericsetup.registerProfile(name='default', title='Plone Discussions', description='Commenting infrastructure for Plone', directory='profiles/default', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.IPloneSiteRoot')
# Monkey Patches
zope.include(package='collective.monkeypatcher')
monkey.patch(description='This allows Catalog Tool to find comments during clear-and-rebuild catalog', class_='Products.CMFPlone.CatalogTool.CatalogTool', original='clearFindAndRebuild', replacement='.patches.patchedClearFindAndRebuild')
# Comments
with zope.class__cm(class_='.comment.Comment'):
zope.require(interface='.interfaces.IComment', permission='zope2.View')
zope.require(attributes='Title Creator getId getText', permission='zope2.View')
with zope.class__cm(class_='.comment.Comment'):
zope.implements(interface='plone.uuid.interfaces.IAttributeUUID')
zope.utility(component='.comment.CommentFactory', name='plone.Comment')
# Conversations
with zope.class__cm(class_='.conversation.Conversation'):
zope.require(interface='.interfaces.IConversation', permission='zope2.View')
zope.adapter(factory='.conversation.conversationAdapterFactory')
zope.adapter(factory='.conversation.ConversationReplies')
zope.adapter(factory='.conversation.CommentReplies')
# Captcha Vocabulary
zope.utility(component='.vocabularies.captcha_vocabulary', name='plone.app.discussion.vocabularies.CaptchaVocabulary', provides='zope.schema.interfaces.IVocabularyFactory')
# Text Transform Vocabulary
zope.utility(component='.vocabularies.text_transform_vocabulary', name='plone.app.discussion.vocabularies.TextTransformVocabulary', provides='zope.schema.interfaces.IVocabularyFactory')
# Conversation indexes
zope.adapter(name='total_comments', factory='.catalog.total_comments')
zope.adapter(name='last_comment_date', factory='.catalog.last_comment_date')
zope.adapter(name='commentators', factory='.catalog.commentators')
zope.adapter(name='in_response_to', factory='.catalog.in_response_to')
# Comment indexes
zope.adapter(name='UID', factory='.catalog.UID')
zope.adapter(name='Title', factory='.catalog.title')
zope.adapter(name='Creator', factory='.catalog.creator')
zope.adapter(name='Description', factory='.catalog.description')
zope.adapter(name='SearchableText', factory='.catalog.searchable_text')
zope.adapter(name='effective', factory='.catalog.effective')
zope.adapter(name='created', factory='.catalog.created')
zope.adapter(name='modified', factory='.catalog.modified')
zope.adapter(name='total_comments', factory='.catalog.comments_total_comments')
zope.adapter(name='last_comment_date', factory='.catalog.comments_last_comment_date')
zope.adapter(name='commentators', factory='.catalog.comments_commentators')
# ----------------------------------------------------
# plone/indexer/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.configure(i18n_domain='plone.indexer')
# ----------------------------------------------------
# plone/app/uuid/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.uuid'):
zope.include(package='plone.uuid')
zope.include(package='plone.indexer')
# Install indexer
zope.adapter(factory='.indexer.uuidIndexer', name='UID')
# Register utility views
browser.view(for_='*', name='redirect-to-uuid', class_='.browser.RedirectToUUIDView', permission='zope.Public')
# ----------------------------------------------------
# plone/app/discussion/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.discussion'):
# custom permissions are defined here
zope.permission(id='plone.app.discussion.ReviewComments', title='Review comments')
# ----------------------------------------------------
# plone/app/discussion/notifications.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.app.discussion'):
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.comment.notify_user')
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.comment.notify_moderator')
# ----------------------------------------------------
# plone/app/discussion/subscribers.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.app.discussion'):
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.comment.notify_workflow')
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.comment.notify_content_object')
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.comment.notify_content_object')
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.tool.index_object')
zope.subscriber(for_='plone.app.discussion.interfaces.IComment zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.tool.unindex_object')
zope.subscriber(for_='Products.CMFCore.interfaces.IContentish zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.comment.notify_content_object_deleted')
zope.subscriber(for_='Products.CMFCore.interfaces.IContentish zope.lifecycleevent.interfaces.IObjectMovedEvent', handler='.comment.notify_content_object_moved')
# Control panel event subscribers
zope.subscriber(for_='plone.app.controlpanel.interfaces.IConfigurationChangedEvent', handler='.browser.controlpanel.notify_configuration_changed')
zope.subscriber(for_='plone.registry.interfaces.IRecordModifiedEvent', handler='.browser.controlpanel.notify_configuration_changed')
# ----------------------------------------------------
# plone/app/discussion/upgrades.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
genericsetup.upgradeStep(source='*', destination='100', title='Update plone.app.discussion setting registry', description='', profile='plone.app.discussion:default', handler='.upgrades.update_registry')
# ----------------------------------------------------
# plone/app/discussion/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.discussion'):
zope.include(package='plone.app.registry')
zope.include(file='captcha.zcml')
# Traversal adapter
zope.adapter(factory='.traversal.ConversationNamespace', name='conversation')
# Migration view
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', name='comment-migration', layer='..interfaces.IDiscussionLayer', class_='.migration.View', permission='cmf.ManagePortal')
# Moderation view
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', name='moderate-comments', layer='..interfaces.IDiscussionLayer', class_='.moderation.View', permission='plone.app.discussion.ReviewComments')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='moderate-comments', layer='..interfaces.IDiscussionLayer', class_='.moderation.View', permission='plone.app.discussion.ReviewComments')
# Moderation bulk actions view
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', name='bulk-actions', layer='..interfaces.IDiscussionLayer', class_='.moderation.BulkActionsView', permission='plone.app.discussion.ReviewComments')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='bulk-actions', layer='..interfaces.IDiscussionLayer', class_='.moderation.BulkActionsView', permission='plone.app.discussion.ReviewComments')
# Moderate comments enabled view
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='moderate-comments-enabled', layer='..interfaces.IDiscussionLayer', class_='.moderation.ModerateCommentsEnabled', permission='zope2.View')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='moderate-comments-enabled', layer='..interfaces.IDiscussionLayer', class_='.moderation.ModerateCommentsEnabled', permission='zope2.View')
# Delete comment view
browser.page(for_='plone.app.discussion.interfaces.IComment', name='moderate-delete-comment', layer='..interfaces.IDiscussionLayer', class_='.moderation.DeleteComment', permission='plone.app.discussion.ReviewComments')
# Publish comment view
browser.page(for_='plone.app.discussion.interfaces.IComment', name='moderate-publish-comment', layer='..interfaces.IDiscussionLayer', class_='.moderation.PublishComment', permission='plone.app.discussion.ReviewComments')
# Comments viewlet
browser.viewlet(name='plone.comments', for_='Products.CMFCore.interfaces.IContentish', layer='..interfaces.IDiscussionLayer', manager='plone.app.layout.viewlets.interfaces.IBelowContent', view='plone.app.layout.globals.interfaces.IViewView', class_='.comments.CommentsViewlet', permission='zope2.View')
# Conversation view
browser.page(name='conversation_view', for_='Products.CMFCore.interfaces.IContentish', layer='..interfaces.IDiscussionLayer', class_='.conversation.ConversationView', permission='zope2.View')
# Comment view
browser.view(name='view', for_='plone.app.discussion.interfaces.IComment', layer='..interfaces.IDiscussionLayer', class_='.comment.View', permission='zope2.View')
# Resource directory for javascripts
browser.resourceDirectory(name='plone.app.discussion.javascripts', directory='javascripts', layer='..interfaces.IDiscussionLayer')
# Resource directory for stylesheets
browser.resourceDirectory(name='plone.app.discussion.stylesheets', directory='stylesheets', layer='..interfaces.IDiscussionLayer')
# Control panel
browser.page(name='discussion-settings', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.controlpanel.DiscussionSettingsControlPanel', permission='cmf.ManagePortal')
# ----------------------------------------------------
# plone/app/discussion/browser/captcha.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.app.discussion'):
# Captcha comment form extender
if config.eval_condition('have plone.app.discussion-captcha'):
#
# Register the Captcha form extender and validator only if there are
# plugins installed that declare to implement a Captcha solution for
# plone.app.discussion (e.g. plone.formwidget.captcha and
# plone.formwidget.recaptcha).
#
zope.adapter(factory='.captcha.Captcha', provides='plone.app.discussion.interfaces.ICaptcha')
zope.adapter(factory='.captcha.CaptchaExtender', provides='plone.z3cform.fieldsets.interfaces.IFormExtender')
zope.adapter(factory='.validator.CaptchaValidator', provides='z3c.form.interfaces.IValidator')
# Akismet Validator
if config.eval_condition('installed collective.akismet'):
zope.adapter(factory='collective.akismet.validator.AkismetValidator', provides='z3c.form.interfaces.IValidator')
# ----------------------------------------------------
# collective/monkeypatcher/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='collective.monkeypatcher'):
zope.include(file='meta.zcml')
# ----------------------------------------------------
# collective/monkeypatcher/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with zope.configure__cm(i18n_domain='collective.monkeypatcher'):
with meta.directives__cm(namespace='http://namespaces.plone.org/monkey'):
meta.directive(name='patch', schema='.meta.IMonkeyPatchDirective', handler='.meta.replace')
# ----------------------------------------------------
# plone/app/folder/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.folder'):
five.registerPackage(package='.', initialize='.initialize')
zope.include(file='profiles.zcml')
zope.include(package='plone.folder')
if config.eval_condition('installed Products.ATContentTypes'):
five.deprecatedManageAddDelete(class_='.folder.ATFolder')
zope.adapter(factory='.nextprevious.NextPrevious')
browser.page(for_='*', name='migrate-btrees', class_='.migration.BTreeMigrationView', permission='cmf.ManagePortal')
# ----------------------------------------------------
# plone/app/folder/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.app.folder'):
genericsetup.registerProfile(name='default', title='plone.app.folder', directory='profiles/default', description='Orderable btree-based folders as proposed in PLIP 191.', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/form/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='.widgets')
zope.adapter(for_='Products.Five.BrowserView', factory='plone.app.form.default_named_template_adapter', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
zope.adapter(for_='.interfaces.IPloneSubPageForm', factory='plone.app.form.default_subpage_template', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
zope.adapter(for_='zope.formlib.interfaces.IAddFormCustomization', factory='plone.app.form.adding_named_template_adapter', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
browser.page(for_='*', permission='zope2.Public', name='base-pageform.html', template='pageform.pt')
browser.page(for_='*', permission='zope2.Public', name='base-subpageform.html', template='subpageform.pt')
# Let Five's add views look pretty in CMF/Plone
with zope.configure__cm(package='Products.CMFDefault.skin'):
browser.page(name='five_template', for_='zope.browser.interfaces.IAdding', template='five_template.pt', permission='zope2.View')
# Support locking on content that is marked to support it and
# which uses plone.app.form.base.EditForm
#
if config.eval_condition('installed plone.locking'):
zope.subscriber(for_='plone.locking.interfaces.ITTWLockable .interfaces.IEditBegunEvent', handler='plone.locking.events.lockOnEditBegins')
if config.eval_condition('installed plone.locking'):
zope.subscriber(for_='plone.locking.interfaces.ITTWLockable .interfaces.IEditFinishedEvent', handler='plone.locking.events.unlockAfterModification')
# Inline validation
browser.page(name='formlib_validate_field', for_='*', class_='.inline_validation.InlineValidationView', permission='zope2.View')
# ----------------------------------------------------
# plone/app/form/widgets/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(name='date_components_support', for_='*', permission='zope2.View', class_='.datecomponents.DateComponents', allowed_interface='.interfaces.IDateComponents')
# use the FileUploadWidget from CMFDefault as the default
# widget for the FileUpload field from that package;
# the zcml in that package is excluded by CMFPlone
zope.adapter(factory='Products.CMFDefault.formlib.widgets.FileUploadWidget', permission='zope.Public')
# ----------------------------------------------------
# plone/app/i18n/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(package='.locales')
zope.include(file='dependencies.zcml')
# ----------------------------------------------------
# plone/app/i18n/locales/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='.browser')
# ----------------------------------------------------
# plone/app/i18n/locales/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.viewlet(name='plone.app.i18n.locales.languageselector', manager='plone.app.layout.viewlets.interfaces.IPortalHeader', class_='.selector.LanguageSelector', permission='zope2.View', template='languageselector.pt')
# ----------------------------------------------------
# plone/app/i18n/dependencies.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(package='plone.i18n')
# ----------------------------------------------------
# plone/app/jquery/configure.zcml
# ----------------------------------------------------
def includeme(config):
browser = config.get_namespace('http://namespaces.zope.org/browser')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with browser.configure__cm():
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquery.js', file='jquery-1.7.2.min.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup.registerProfile(name='default', title='Plone JQuery Integration', directory='profiles/default', description="Profile for Plone's JQuery resources.", provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.include(file='upgrades.zcml')
# ----------------------------------------------------
# plone/app/jquery/upgrades.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
genericsetup.registerProfile(name='initial-upgrade', directory='profiles/initial-profile', title='plone.app.jquery:initial-upgrade', description='Profile for initial upgrade step', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.upgradeStep(source='*', destination='2', title='Initial upgrade step', description='', profile='plone.app.jquery:default', handler='plone.app.jquery.upgrades.step_1_initial_upgrade')
genericsetup.upgradeStep(source='2', destination='3', title='Upgrade jQuery', description='', profile='plone.app.jquery:default', handler='plone.app.jquery.upgrades.upgrade_2_to_3')
# ----------------------------------------------------
# plone/app/jquerytools/configure.zcml
# ----------------------------------------------------
def includeme(config):
browser = config.get_namespace('http://namespaces.zope.org/browser')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with browser.configure__cm():
# generated by build script
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.js', file='browser/jquery.tools.min.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.form.js', file='browser/jquery.form.min.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.plugins.js', file='browser/jquery.tools.plugins.min.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.dateinput.js', file='browser/jquery.tools.dateinput.min.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.dateinput.css', file='browser/jquery.tools.dateinput.css')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.rangeinput.js', file='browser/jquery.tools.rangeinput.min.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.validator.js', file='browser/jquery.tools.validator.min.js')
# other resources
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.overlayhelpers.js', file='browser/overlayhelpers.js')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.overlays.css', file='browser/overlays.css')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.pb_close.png', file='browser/pb_close.png')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.prev.gif', file='browser/prev.gif')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.app.jquerytools.next.gif', file='browser/next.gif')
# TODO: turn on condition zcml:condition="installed plone.app.testing"
# when finished drafting selenium tests
#
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.include(file='tests/configure.zcml')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup.registerProfile(name='default', title='Plone JQuery Tools Integration', directory='profiles/default', description="Profile for Plone's JQuery Tools resources.", provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# custom steps for installation profile
zope = config.get_namespace('http://namespaces.zope.org/zope')
with genericsetup.importStep__cm(name='jquerytools-various', title='jquerytools custom setup steps', description='', handler='.setuphandlers.importVarious'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.depends(name='cssregistry')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.include(package='.upgrades')
# ----------------------------------------------------
# plone/app/jquerytools/tests/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='p.a.jqt.testForm', class_='.tests.browser.TestForm', template='templates/testForm.pt', permission='zope2.View')
browser.page(for_='*', name='p.a.jqt.testPage', class_='.tests.browser.TestForm', template='templates/testPage.pt', permission='zope2.View')
# ----------------------------------------------------
# plone/app/jquerytools/upgrades/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
# Jquerytools upgrades
genericsetup.upgradeStep(source='*', destination='1.0rc2', title='Null upgrade step', description='', profile='plone.app.jquerytools:default', handler='plone.app.jquerytools.upgrades.null_upgrade_step')
genericsetup.upgradeStep(source='1.0rc2', destination='2', title='Add overlays.css for Plone 3', description='', handler='.upgrade1to2', profile='plone.app.jquerytools:default')
# steps on Plone upgrade
# disable overlays.css when upgrading from Plone 3 to 4
genericsetup.upgradeStep(source='4001', destination='4002', title="Disable plone.app.jquerytools' overlay CSS", description='', profile='Products.CMFPlone:plone', handler='plone.app.jquerytools.setuphandlers.disable_css')
# ----------------------------------------------------
# plone/app/layout/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='.globals')
zope.include(package='.navigation')
zope.include(package='.viewlets')
zope.include(package='.nextprevious')
zope.include(package='.icons')
zope.include(package='.links')
zope.include(package='.sitemap')
zope.include(package='.dashboard')
if config.eval_condition('installed Products.ATContentTypes'):
zope.include(package='.presentation')
zope.include(package='.analytics')
# ----------------------------------------------------
# plone/app/layout/globals/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Views with global constants
browser.page(name='plone_interface_info', for_='*', permission='zope.Public', class_='.interface.InterfaceInformation', allowed_interface='.interfaces.IInterfaceInformation')
browser.page(name='plone_layout', for_='*', permission='zope.Public', class_='.layout.LayoutPolicy', allowed_interface='.interfaces.ILayoutPolicy')
browser.page(name='plone_tools', for_='*', permission='zope.Public', class_='.tools.Tools', allowed_interface='.interfaces.ITools')
browser.page(name='plone_context_state', for_='*', permission='zope.Public', class_='.context.ContextState', allowed_interface='.interfaces.IContextState')
browser.page(name='plone_portal_state', for_='*', permission='zope.Public', class_='.portal.PortalState', allowed_interface='.interfaces.IPortalState')
# We need to make the request annotatable for this to work
with zope.class__cm(class_='ZPublisher.BaseRequest.BaseRequest'):
zope.implements(interface='zope.annotation.interfaces.IAttributeAnnotatable')
# ----------------------------------------------------
# plone/app/layout/navigation/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.class__cm(class_='.navtree.NavtreeStrategyBase'):
zope.allow(interface='.interfaces.INavtreeStrategy')
browser.page(for_='*', name='default_page', class_='.defaultpage.DefaultPage', permission='zope.Public', allowed_interface='.interfaces.IDefaultPage')
# ----------------------------------------------------
# plone/app/layout/viewlets/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='Products.CMFCore', file='permissions.zcml')
# Register viewlet managers - used in plone's main_template
browser.viewletManager(name='plone.htmlhead', provides='.interfaces.IHtmlHead', permission='zope2.View', class_='plone.app.viewletmanager.manager.BaseOrderedViewletManager')
browser.viewletManager(name='plone.htmlhead.links', provides='.interfaces.IHtmlHeadLinks', permission='zope2.View', class_='plone.app.viewletmanager.manager.BaseOrderedViewletManager')
browser.viewletManager(name='plone.portaltop', provides='.interfaces.IPortalTop', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.portalheader', provides='.interfaces.IPortalHeader', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.contentviews', provides='.interfaces.IContentViews', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.abovecontent', provides='.interfaces.IAboveContent', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.abovecontenttitle', provides='.interfaces.IAboveContentTitle', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.documentactions', provides='.interfaces.IDocumentActions', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.belowcontenttitle', provides='.interfaces.IBelowContentTitle', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.abovecontentbody', provides='.interfaces.IAboveContentBody', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.belowcontentbody', provides='.interfaces.IBelowContentBody', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.belowcontent', provides='.interfaces.IBelowContent', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
browser.viewletManager(name='plone.portalfooter', provides='.interfaces.IPortalFooter', permission='zope2.View', class_='plone.app.viewletmanager.manager.OrderedViewletManager')
# Define some viewlets
# The portal header
browser.viewlet(name='plone.header', manager='.interfaces.IPortalTop', template='portal_header.pt', permission='zope2.View')
# The skip links for accessibility
browser.viewlet(name='plone.skip_links', manager='.interfaces.IPortalHeader', class_='.common.SkipLinksViewlet', permission='zope2.View')
# The site actions
browser.viewlet(name='plone.site_actions', manager='.interfaces.IPortalFooter', class_='.common.SiteActionsViewlet', permission='zope2.View')
# The search box
browser.viewlet(name='plone.searchbox', manager='.interfaces.IPortalHeader', class_='.common.SearchBoxViewlet', permission='zope2.View')
# The logo
browser.viewlet(name='plone.logo', manager='.interfaces.IPortalHeader', class_='.common.LogoViewlet', permission='zope2.View')
# The global sections
browser.viewlet(name='plone.global_sections', manager='.interfaces.IPortalHeader', class_='.common.GlobalSectionsViewlet', permission='zope2.View')
# The personal bar
browser.viewlet(name='plone.personal_bar', manager='.interfaces.IPortalHeader', class_='.common.PersonalBarViewlet', permission='zope2.View')
# Content views (tabs)
browser.viewlet(name='plone.contentviews', manager='.interfaces.IContentViews', class_='.common.ContentViewsViewlet', permission='zope2.View')
# Content actions (menus)
# The default version is a blank bar; the one with real menus is
# registered for the main view + folder contents only.
#
browser.viewlet(name='plone.contentactions', for_='*', manager='.interfaces.IContentViews', template='contentactions_blank.pt', permission='zope2.View')
browser.viewlet(name='plone.contentactions', for_='*', view='plone.app.layout.globals.interfaces.IViewView', manager='.interfaces.IContentViews', class_='.common.ContentActionsViewlet', permission='zope2.View')
browser.viewlet(name='plone.contentactions', for_='*', view='plone.app.content.browser.interfaces.IFolderContentsView', manager='.interfaces.IContentViews', class_='.common.ContentActionsViewlet', permission='zope2.View')
# Render the browser title
browser.viewlet(name='plone.htmlhead.title', manager='.interfaces.IHtmlHead', class_='.common.TitleViewlet', permission='zope2.View')
# Render the Dublin Core metadata
browser.viewlet(name='plone.htmlhead.dublincore', manager='.interfaces.IHtmlHead', class_='.common.DublinCoreViewlet', permission='zope2.View')
# The related items
browser.viewlet(name='plone.belowcontentbody.relateditems', manager='.interfaces.IBelowContentBody', class_='.content.ContentRelatedItems', view='plone.app.layout.globals.interfaces.IViewView', permission='zope2.View')
# Render the workflow history viewlet;
# BBB: this is the Plone < 4 viewlet
# <browser:viewlet
# name="plone.belowcontentbody.inlinecontenthistory"
# manager=".interfaces.IBelowContentBody"
# class=".content.ContentHistoryViewlet"
# template="inline_content_history.pt"
# permission="zope2.View"
# />
#
# Render the workflow history as a view
browser.view(for_='*', name='contenthistory', class_='.content.ContentHistoryView', permission='zope2.View')
# Render the workflow history for popup
browser.page(for_='*', name='contenthistorypopup', template='popup_content_history.pt', permission='zope2.View')
# Render the workflow history contents as a page
browser.page(for_='*', name='historyview', template='history_view.pt', permission='zope2.View')
# Render the document actions
browser.viewlet(name='plone.abovecontenttitle.documentactions', manager='.interfaces.IBelowContentBody', class_='.content.DocumentActionsViewlet', permission='zope2.View')
# Manage portlets Fallback link
browser.viewlet(name='plone.manage_portlets_fallback', for_='plone.portlets.interfaces.ILocalPortletAssignable', view='plone.app.layout.globals.interfaces.IViewView', manager='.interfaces.IBelowContent', class_='.common.ManagePortletsFallbackViewlet', permission='zope2.View')
# The breadcrumbs
browser.viewlet(name='plone.path_bar', manager='.interfaces.IAboveContent', class_='.common.PathBarViewlet', permission='zope2.View')
# Render the document byline
browser.viewlet(name='plone.belowcontenttitle.documentbyline', manager='.interfaces.IBelowContentTitle', class_='.content.DocumentBylineViewlet', permission='zope2.View')
# Render the keywords
browser.viewlet(name='plone.belowcontenttitle.keywords', manager='.interfaces.IBelowContent', view='plone.app.layout.globals.interfaces.IViewView', template='keywords.pt', permission='zope2.View')
# Render comments
browser.viewlet(name='plone.comments', for_='Products.CMFCore.interfaces.IContentish', manager='.interfaces.IBelowContent', view='..globals.interfaces.IViewView', class_='.comments.CommentsViewlet', permission='zope2.View')
# Render lock info
browser.viewlet(name='plone.lockinfo', manager='.interfaces.IAboveContent', class_='plone.locking.browser.info.LockInfoViewlet', permission='cmf.ModifyPortalContent', for_='plone.locking.interfaces.ITTWLockable')
# Render table of contents
if config.eval_condition('installed Products.ATContentTypes'):
browser.viewlet(name='plone.tableofcontents', for_='Products.ATContentTypes.interface.IATDocument', manager='.interfaces.IAboveContentBody', class_='.common.TableOfContentsViewlet', permission='zope2.View')
# Footer
browser.viewlet(name='plone.footer', for_='*', manager='.interfaces.IPortalFooter', class_='.common.FooterViewlet', permission='zope.Public')
# Colophon
browser.viewlet(name='plone.colophon', for_='*', manager='.interfaces.IPortalFooter', template='colophon.pt', permission='zope.Public')
# ----------------------------------------------------
# plone/app/layout/nextprevious/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# We need this both in the viewlet and in Plone's header for rel links,
# so define a view and use it in both places. Note that the actual
# values are request memoized, so the calculations will only be
# performed once.
#
browser.page(for_='*', name='plone_nextprevious_view', class_='.view.NextPreviousView', permission='zope.Public', allowed_attributes='next previous enabled')
browser.viewlet(name='plone.nextprevious', manager='plone.app.layout.viewlets.interfaces.IBelowContent', class_='.view.NextPreviousViewlet', permission='zope2.View')
browser.viewlet(name='plone.nextprevious.links', manager='plone.app.layout.viewlets.interfaces.IHtmlHeadLinks', class_='.view.NextPreviousLinksViewlet', permission='zope2.View')
# ----------------------------------------------------
# plone/app/layout/icons/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(for_='* zope.publisher.interfaces.browser.IBrowserRequest Products.ZCatalog.CatalogBrains.AbstractCatalogBrain', factory='.icons.CatalogBrainContentIcon', provides='.interfaces.IContentIcon')
zope.adapter(for_='* zope.publisher.interfaces.browser.IBrowserRequest Products.CMFCore.interfaces.IDynamicType', factory='.icons.CMFContentIcon', provides='.interfaces.IContentIcon')
zope.adapter(for_='* zope.publisher.interfaces.browser.IBrowserRequest Products.CMFCore.TypesTool.FactoryTypeInformation', factory='.icons.FTIContentIcon', provides='.interfaces.IContentIcon')
zope.adapter(for_='* zope.publisher.interfaces.browser.IBrowserRequest Products.CMFPlone.interfaces.IPloneSiteRoot', factory='.icons.PloneSiteContentIcon', provides='.interfaces.IContentIcon')
zope.adapter(for_='* zope.publisher.interfaces.browser.IBrowserRequest *', factory='.icons.DefaultContentIcon', provides='.interfaces.IContentIcon')
# ----------------------------------------------------
# plone/app/layout/links/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.viewlet(name='plone.links.favicon', manager='plone.app.layout.viewlets.interfaces.IHtmlHeadLinks', class_='.viewlets.FaviconViewlet', permission='zope2.View')
browser.viewlet(name='plone.links.search', manager='plone.app.layout.viewlets.interfaces.IHtmlHeadLinks', class_='.viewlets.SearchViewlet', permission='zope2.View')
browser.viewlet(name='plone.links.author', manager='plone.app.layout.viewlets.interfaces.IHtmlHeadLinks', class_='.viewlets.AuthorViewlet', permission='zope2.View')
browser.viewlet(name='plone.links.RSS', manager='plone.app.layout.viewlets.interfaces.IHtmlHeadLinks', class_='.viewlets.RSSViewlet', permission='zope2.View')
# ----------------------------------------------------
# plone/app/layout/sitemap/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(name='sitemap.xml.gz', for_='plone.app.layout.navigation.interfaces.INavigationRoot', class_='.sitemap.SiteMapView', permission='zope2.Public')
# ----------------------------------------------------
# plone/app/layout/dashboard/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='plone.app.portlets')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='dashboard', permission='plone.app.portlets.ViewDashboard', class_='.dashboard.DashboardView', template='dashboard.pt')
# this view provides a not-js fallback for the user dropdown menu.
# It has been placed here to be near the personal bar code
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='useractions', permission='plone.app.portlets.ViewDashboard', class_='.user_actions.UserActionsView', template='user_actions.pt')
# ----------------------------------------------------
# plone/app/portlets/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='plone.portlets')
zope.include(package='plone.app.vocabularies')
five.registerPackage(package='.')
zope.include(file='permissions.zcml')
zope.include(package='.browser')
zope.include(package='.exportimport')
zope.include(package='.portlets')
# Set up the portlet context
zope.adapter(factory='.portletcontext.ContentContext')
zope.adapter(factory='.portletcontext.PortalRootContext')
# Make it possible to define a sane default dashboard
zope.subscriber(for_='Products.PluggableAuthService.interfaces.authservice.IPropertiedUser Products.PluggableAuthService.interfaces.events.IPrincipalCreatedEvent', handler='.dashboard.new_user')
zope.adapter(factory='.dashboard.DefaultDashboard')
# Make the site root and any ATContentType a possible portlet manager
with zope.class__cm(class_='Products.CMFPlone.Portal.PloneSite'):
zope.implements(interface='plone.portlets.interfaces.ILocalPortletAssignable')
if config.eval_condition('installed Products.ATContentTypes'):
with zope.class__cm(class_='Products.ATContentTypes.content.base.ATCTMixin'):
zope.implements(interface='plone.portlets.interfaces.ILocalPortletAssignable')
# Make a Zope 2 safe traversal adapter for assignment mappings
zope.adapter(factory='.storage.PortletAssignmentMappingTraverser', provides='zope.publisher.interfaces.browser.IBrowserPublisher')
# Set up assignment mapping permissions
with zope.class__cm(class_='.storage.PortletAssignmentMapping'):
zope.require(permission='zope2.View', interface='zope.container.interfaces.IReadContainer')
zope.require(permission='plone.app.portlets.ManagePortlets', interface='zope.container.interfaces.IWriteContainer')
zope.require(permission='plone.app.portlets.ManagePortlets', attributes='updateOrder')
# Register a name chooser
zope.adapter(provides='zope.container.interfaces.INameChooser', for_='plone.portlets.interfaces.IPortletAssignmentMapping', factory='.storage.PortletsNameChooser')
# ----------------------------------------------------
# plone/portlets/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='zope.annotation')
zope.adapter(factory='.assignable.localPortletAssignmentMappingAdapter')
zope.adapter(factory='.assignable.LocalPortletAssignmentManager')
zope.adapter(factory='.assignable.BlockingLocalPortletAssignmentManager')
zope.adapter(factory='.retriever.PortletRetriever')
zope.adapter(factory='.retriever.PlacelessPortletRetriever')
zope.adapter(factory='.manager.PortletManagerRenderer')
zope.adapter(factory='.settings.portletAssignmentSettingsFactory')
zope.subscriber(handler='.events.dispatchToComponent')
zope.subscriber(handler='.events.registerPortletManagerRenderer')
zope.subscriber(handler='.events.unregisterPortletManagerRenderer')
# ----------------------------------------------------
# plone/app/vocabularies/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.utility(component='.language.AvailableContentLanguageVocabularyFactory', name='plone.app.vocabularies.AvailableContentLanguages')
zope.utility(component='.language.SupportedContentLanguageVocabularyFactory', name='plone.app.vocabularies.SupportedContentLanguages')
zope.utility(component='.security.RolesVocabularyFactory', name='plone.app.vocabularies.Roles')
zope.utility(component='.security.GroupsVocabularyFactory', name='plone.app.vocabularies.Groups')
zope.utility(component='.types.AllowedContentTypesVocabularyFactory', name='plone.app.vocabularies.AllowedContentTypes')
zope.utility(component='.types.AllowableContentTypesVocabularyFactory', name='plone.app.vocabularies.AllowableContentTypes')
zope.utility(component='.types.PortalTypesVocabularyFactory', name='plone.app.vocabularies.PortalTypes')
zope.utility(component='.types.ReallyUserFriendlyTypesVocabularyFactory', name='plone.app.vocabularies.ReallyUserFriendlyTypes')
zope.utility(component='.types.UserFriendlyTypesVocabularyFactory', name='plone.app.vocabularies.UserFriendlyTypes')
zope.utility(component='.skins.SkinsVocabularyFactory', name='plone.app.vocabularies.Skins')
zope.utility(component='.workflow.WorkflowsVocabularyFactory', name='plone.app.vocabularies.Workflows')
zope.utility(component='.workflow.WorkflowStatesVocabularyFactory', name='plone.app.vocabularies.WorkflowStates')
zope.utility(component='.workflow.WorkflowTransitionsVocabularyFactory', name='plone.app.vocabularies.WorkflowTransitions')
zope.utility(component='.editors.AvailableEditorsVocabularyFactory', name='plone.app.vocabularies.AvailableEditors')
zope.utility(component='.catalog.KeywordsVocabularyFactory', name='plone.app.vocabularies.Keywords')
zope.utility(component='.syndication.SyndicationFeedTypesVocabularyFactory', name='plone.app.vocabularies.SyndicationFeedTypes')
zope.utility(component='.syndication.SyndicatableFeedItemsFactory', name='plone.app.vocabularies.SyndicatableFeedItems')
zope.utility(factory='.users.UsersFactory', name='plone.app.vocabularies.Users')
zope.adapter(for_='.catalog.SearchableTextSource zope.publisher.interfaces.browser.IBrowserRequest', factory='.catalog.QuerySearchableTextSourceView', provides='zope.browser.interfaces.ITerms')
zope.adapter(for_='.catalog.SearchableTextSource zope.publisher.interfaces.browser.IBrowserRequest', factory='.catalog.QuerySearchableTextSourceView', provides='zope.formlib.interfaces.ISourceQueryView')
zope.adapter(for_='.users.UsersSource zope.publisher.interfaces.browser.IBrowserRequest', factory='.users.UsersSourceQueryView', provides='zope.browser.interfaces.ITerms')
zope.adapter(for_='.users.UsersSource zope.publisher.interfaces.browser.IBrowserRequest', factory='.users.UsersSourceQueryView', provides='zope.formlib.interfaces.ISourceQueryView')
zope.adapter(for_='.groups.GroupsSource zope.publisher.interfaces.browser.IBrowserRequest', factory='.groups.GroupsSourceQueryView', provides='zope.browser.interfaces.ITerms')
zope.adapter(for_='.groups.GroupsSource zope.publisher.interfaces.browser.IBrowserRequest', factory='.groups.GroupsSourceQueryView', provides='zope.formlib.interfaces.ISourceQueryView')
# ----------------------------------------------------
# plone/app/portlets/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.portlets'):
# Note: These permissions are also set up in the rolemap.xml GenericSetup
# importer in CMFPlone.
#
# Portlet add and edit forms, as well as move/delete operations are
# actually protected by the less secure ManageOwnPortlets, with additional
# checks in the view. This is annoying, but it becomes very hard to
# manage security properly for the dashboard otherwise.
#
# These checks are made using an IPortletPermissionChecker adapter.
#
# A better way of doing this would probably be to use the Owner role
# against the assignment mappings and let Manage portlets be controlled
# by that, but managing those roles properly w.r.t. the namespace
# traveral adapters and acquisition is not fun.
#
zope.permission(id='plone.app.portlets.ManagePortlets', title='Portlets: Manage portlets')
zope.permission(id='plone.app.portlets.ManageOwnPortlets', title='Portlets: Manage own portlets')
zope.permission(id='plone.app.portlets.ViewDashboard', title='Portlets: View dashboard')
zope.adapter(factory='.checker.DefaultPortletPermissionChecker')
zope.adapter(factory='.checker.UserPortletPermissionChecker')
zope.adapter(factory='.checker.GroupDashboardPortletPermissionChecker')
# ----------------------------------------------------
# plone/app/portlets/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Some things do not make sense in the breadcrumbs.
with zope.class__cm(class_='..portlets.base.Assignment'):
zope.implements(interface='Products.CMFPlone.interfaces.IHideFromBreadcrumbs')
with zope.class__cm(class_='..storage.PortletAssignmentMapping'):
zope.implements(interface='Products.CMFPlone.interfaces.IHideFromBreadcrumbs')
# Make a special renderer for the columns so we can control them
# with a template
#
zope.adapter(factory='..manager.ColumnPortletManagerRenderer', provides='plone.portlets.interfaces.IPortletManagerRenderer')
zope.adapter(factory='..manager.DashboardPortletManagerRenderer', provides='plone.portlets.interfaces.IPortletManagerRenderer')
# Namespace traversal adapters for various types of portlets
zope.adapter(factory='.traversal.ContextPortletNamespace', name='contextportlets')
zope.adapter(factory='.traversal.DashboardNamespace', name='dashboard')
zope.adapter(factory='.traversal.GroupPortletNamespace', name='groupportlets')
zope.adapter(factory='.traversal.GroupDashboardNamespace', name='groupdashboard')
zope.adapter(factory='.traversal.ContentTypePortletNamespace', name='contenttypeportlets')
# Portlet management pages
browser.page(for_='*', name='manage-portlets-macros', class_='.manage.ManageContextualPortlets', template='templates/edit-manager-macros.pt', permission='plone.app.portlets.ManageOwnPortlets')
with browser.pages__cm(for_='plone.portlets.interfaces.ILocalPortletAssignable', class_='.manage.ManageContextualPortlets', permission='plone.app.portlets.ManagePortlets'):
browser.page(name='manage-portlets', template='templates/manage-contextual.pt')
browser.page(name='convert-legacy-portlets', attribute='convert_legacy_portlets')
browser.page(name='set-portlet-blacklist-status', attribute='set_blacklist_status')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', class_='.manage.ManageDashboardPortlets', name='manage-dashboard', template='templates/manage-dashboard.pt', permission='plone.app.portlets.ManageOwnPortlets')
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', class_='.manage.ManageContentTypePortlets', name='manage-content-type-portlets', template='templates/manage-content-type.pt', permission='plone.app.portlets.ManagePortlets')
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', class_='.manage.ManageGroupPortlets', name='manage-group-portlets', template='templates/manage-group.pt', permission='plone.app.portlets.ManagePortlets')
browser.page(for_='Products.CMFCore.interfaces.ISiteRoot', class_='.manage.ManageGroupDashboardPortlets', name='manage-group-dashboard', template='templates/manage-group-dashboard.pt', permission='plone.app.portlets.ManagePortlets')
# Renderer for the columns in edit mode
zope.adapter(factory='.editmanager.EditPortletManagerRenderer', provides='plone.portlets.interfaces.IPortletManagerRenderer')
zope.adapter(factory='.editmanager.ContextualEditPortletManagerRenderer', provides='plone.portlets.interfaces.IPortletManagerRenderer')
zope.adapter(factory='.editmanager.DashboardEditPortletManagerRenderer', provides='plone.portlets.interfaces.IPortletManagerRenderer')
# Operations on portlets when in edit mode
with browser.pages__cm(for_='plone.portlets.interfaces.IPortletAssignmentMapping', class_='.editmanager.ManagePortletAssignments', permission='plone.app.portlets.ManageOwnPortlets'):
browser.page(name='delete-portlet', attribute='delete_portlet')
browser.page(name='move-portlet-up', attribute='move_portlet_up')
browser.page(name='move-portlet-down', attribute='move_portlet_down')
browser.page(name='toggle-visibility', attribute='toggle_visibility')
# Adding view for portlet assignments
browser.view(for_='plone.portlets.interfaces.IPortletAssignmentMapping', name='+', class_='.adding.PortletAdding', allowed_interface='plone.app.portlets.browser.interfaces.IPortletAdding', permission='plone.app.portlets.ManagePortlets')
browser.view(for_='plone.app.portlets.interfaces.IUserPortletAssignmentMapping', name='+', class_='plone.app.portlets.browser.adding.PortletAdding', allowed_interface='plone.app.portlets.browser.interfaces.IPortletAdding', permission='plone.app.portlets.ManageOwnPortlets')
with zope.class__cm(class_='.adding.PortletAdding'):
zope.require(permission='plone.app.portlets.ManagePortlets', interface='.interfaces.IPortletAdding')
# Get pretty templates on our add and edit pages
with zope.configure__cm(package='Products.CMFDefault.skin'):
browser.page(name='five_template', for_='plone.portlets.interfaces.IPortletAssignment', template='five_template.pt', permission='zope2.View')
browser.page(name='five_template', for_='plone.portlets.interfaces.IPortletAssignmentMapping', template='five_template.pt', permission='zope2.View')
browser.page(name='five_template', for_='plone.app.portlets.browser.interfaces.IPortletAdding', template='five_template.pt', permission='zope2.View')
# Default page layout for portlet add/edit forms
zope.adapter(for_='.interfaces.IPortletForm', factory='.formhelper.portlets_named_template_adapter', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
# KSS actions
browser.page(for_='*', name='inlineMovePortletUp', class_='.kss.PortletManagerKSS', attribute='move_portlet_up', permission='plone.app.portlets.ManageOwnPortlets')
browser.page(for_='*', name='inlineMovePortletDown', class_='.kss.PortletManagerKSS', attribute='move_portlet_down', permission='plone.app.portlets.ManageOwnPortlets')
browser.page(for_='*', name='inlineDeletePortlet', class_='.kss.PortletManagerKSS', attribute='delete_portlet', permission='plone.app.portlets.ManageOwnPortlets')
browser.page(for_='*', name='togglePortletVisibility', class_='.kss.PortletManagerKSS', attribute='toggle_visibility', permission='plone.app.portlets.ManageOwnPortlets')
# Resources
browser.resource(name='manage-portlets.kss', file='portlets.kss')
# ----------------------------------------------------
# plone/app/portlets/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.portlets.PortletsXMLAdapter', name='plone.portlets')
zope.adapter(factory='.portlets.PropertyPortletAssignmentExportImportHandler')
# Register import and export steps
with genericsetup.importStep__cm(name='portlets', title='Portlets', description='Import portlet managers, types, assignments and blacklistings', handler='.portlets.importPortlets'):
zope.depends(name='componentregistry')
zope.depends(name='content')
genericsetup.exportStep(name='portlets', title='Portlets', description='Export portlet managers, types, assignments and blacklistings', handler='.portlets.exportPortlets')
if config.eval_condition('not-installed Products.CMFCore.src'):
zope.utility(factory='.portlets.Blacklist', provides='Products.GenericSetup.interfaces.IComponentsHandlerBlacklist', name='plone.app.portlets.exportimport')
# ----------------------------------------------------
# plone/app/portlets/portlets/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
browser = config.get_namespace('http://namespaces.zope.org/browser')
plone.portlet(name='portlets.Calendar', interface='.calendar.ICalendarPortlet', assignment='.calendar.Assignment', renderer='.calendar.Renderer', addview='.calendar.AddForm')
plone.portlet(name='portlets.Classic', interface='.classic.IClassicPortlet', assignment='.classic.Assignment', renderer='.classic.Renderer', addview='.classic.AddForm', editview='.classic.EditForm')
plone.portlet(name='portlets.News', interface='.news.INewsPortlet', assignment='.news.Assignment', renderer='.news.Renderer', addview='.news.AddForm', editview='.news.EditForm')
plone.portlet(name='portlets.Events', interface='.events.IEventsPortlet', assignment='.events.Assignment', renderer='.events.Renderer', addview='.events.AddForm', editview='.events.EditForm')
plone.portlet(name='portlets.Login', interface='.login.ILoginPortlet', assignment='.login.Assignment', renderer='.login.Renderer', addview='.login.AddForm')
plone.portlet(name='portlets.Navigation', interface='.navigation.INavigationPortlet', assignment='.navigation.Assignment', renderer='.navigation.Renderer', addview='.navigation.AddForm', editview='.navigation.EditForm')
zope.adapter(factory='.navigation.QueryBuilder')
zope.adapter(factory='.navigation.NavtreeStrategy')
plone.portlet(name='portlets.Recent', interface='.recent.IRecentPortlet', assignment='.recent.Assignment', renderer='.recent.Renderer', addview='.recent.AddForm', editview='.recent.EditForm')
plone.portlet(name='portlets.Review', interface='.review.IReviewPortlet', assignment='.review.Assignment', renderer='.review.Renderer', addview='.review.AddForm')
plone.portlet(name='portlets.rss', interface='.rss.IRSSPortlet', assignment='.rss.Assignment', renderer='.rss.Renderer', addview='.rss.AddForm', editview='.rss.EditForm')
plone.portlet(name='portlets.Search', interface='.search.ISearchPortlet', assignment='.search.Assignment', renderer='.search.Renderer', addview='.search.AddForm', editview='.search.EditForm')
plone.portlet(name='portlets.Language', interface='.language.ILanguagePortlet', assignment='.language.Assignment', renderer='.language.Renderer', addview='.language.AddForm')
# ----------------------------------------------------
# plone/app/layout/presentation/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(name='presentation_view', for_='Products.ATContentTypes.interface.IATDocument', class_='.presentation.PresentationView', template='presentation.pt', permission='zope2.View')
browser.viewlet(name='plone.presentation', for_='Products.ATContentTypes.interface.IATDocument', manager='plone.app.layout.viewlets.interfaces.IAboveContentBody', class_='.presentation.PresentationViewlet', permission='zope2.View')
# ----------------------------------------------------
# plone/app/layout/analytics/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.viewlet(name='plone.analytics', manager='plone.app.layout.viewlets.interfaces.IPortalFooter', class_='.view.AnalyticsViewlet', permission='zope2.View')
# ----------------------------------------------------
# plone/app/linkintegrity/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
five.registerPackage(package='.', initialize='.initialize')
if config.eval_condition('installed plone.dexterity'):
zope.include(file='dexterity.zcml')
zope.adapter(for_='zope.publisher.interfaces.browser.IBrowserRequest', provides='.interfaces.ILinkIntegrityInfo', factory='.info.LinkIntegrityInfo')
with zope.class__cm(class_='OFS.Image.Image'):
zope.implements(interface='.interfaces.IOFSImage')
# views used to perform link integrity checks and actually remove an object
browser.page(name='index.html', for_='.interfaces.ILinkIntegrityNotificationException', template='browser/confirmation.pt', class_='.browser.confirmation.RemoveConfirmationView', permission='zope2.Public')
browser.page(name='removeConfirmationAction', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.browser.remove.RemoveReferencedObjectView', permission='zope2.Public')
if config.eval_condition('installed Products.Archetypes'):
browser.page(name='updateLinkIntegrityInformation', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', template='browser/update.pt', class_='.browser.update.UpdateView', permission='cmf.ManagePortal')
# event handlers for updating link integrity references
zope.subscriber(for_='Products.Archetypes.interfaces.IBaseObject OFS.interfaces.IObjectClonedEvent', handler='.handlers.modifiedArchetype')
zope.subscriber(for_='Products.Archetypes.interfaces.IBaseObject zope.lifecycleevent.interfaces.IObjectCreatedEvent', handler='.handlers.modifiedArchetype')
zope.subscriber(for_='Products.Archetypes.interfaces.IBaseObject zope.lifecycleevent.interfaces.IObjectModifiedEvent', handler='.handlers.modifiedArchetype')
zope.subscriber(for_='Products.Archetypes.interfaces.IBaseObject zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.handlers.referencedObjectRemoved')
zope.subscriber(for_='Products.Archetypes.interfaces.IReference zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.handlers.referenceRemoved')
# ----------------------------------------------------
# plone/app/linkintegrity/dexterity.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
if config.eval_condition('installed plone.app.referenceablebehavior'):
# event handlers for updating link integrity references
zope.subscriber(for_='plone.app.referenceablebehavior.referenceable.IReferenceable OFS.interfaces.IObjectClonedEvent', handler='.handlers.modifiedDexterity')
zope.subscriber(for_='plone.app.referenceablebehavior.referenceable.IReferenceable zope.lifecycleevent.interfaces.IObjectAddedEvent', handler='.handlers.modifiedDexterity')
zope.subscriber(for_='plone.app.referenceablebehavior.referenceable.IReferenceable zope.lifecycleevent.interfaces.IObjectModifiedEvent', handler='.handlers.modifiedDexterity')
zope.subscriber(for_='plone.app.referenceablebehavior.referenceable.IReferenceable zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.handlers.referencedObjectRemoved')
# ----------------------------------------------------
# plone/app/locales/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
five.registerPackage(package='.')
if config.eval_condition('have plone-42'):
i18n.registerTranslations(directory='locales-42')
i18n.registerTranslations(directory='locales')
i18n.registerTranslations(directory='locales-addons')
# ----------------------------------------------------
# plone/app/redirector/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(factory='.policy.RedirectionPolicy')
# Register a page the UI
browser.page(name='plone_redirector_view', for_='*', class_='.browser.FourOhFourView', permission='zope2.View', allowed_interface='.interfaces.IFourOhFourView')
zope.include(package='.', file='events.zcml')
# ----------------------------------------------------
# plone/app/redirector/events.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# Remember the movements of CMF objects
zope.subscriber(for_='Products.CMFCore.interfaces.IContentish zope.lifecycleevent.interfaces.IObjectMovedEvent', handler='.subscribers.objectMoved')
zope.subscriber(for_='Products.CMFCore.interfaces.IContentish zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.subscribers.objectRemoved')
# ----------------------------------------------------
# plone/app/search/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='default', title="Plone's Advanced Search Form", description='Dynamic, ajax-driven search results view with filtering and sorting support.', directory='profiles/default', provides='Products.GenericSetup.interfaces.EXTENSION')
browser.resource(name='search.js', file='search.js')
browser.page(name='search', class_='.browser.Search', permission='zope2.View', for_='*', template='search.pt')
browser.page(name='updated_search', class_='.browser.Search', permission='zope2.View', for_='Products.CMFCore.interfaces.IFolderish', template='updated_search.pt')
# ----------------------------------------------------
# plone/app/upgrade/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='.v25')
zope.include(package='.v30')
zope.include(package='.v31')
zope.include(package='.v32')
zope.include(package='.v33')
zope.include(package='.v40')
zope.include(package='.v41')
zope.include(package='.v42')
zope.utility(factory='.HiddenProducts', name='plone.app.upgrade')
browser.page(name='index.html', for_='.gruf_bbb.UpgradeProcessError', class_='.gruf_bbb.UpgradeProcessErrorView', permission='zope.Public')
# ----------------------------------------------------
# plone/app/upgrade/v25/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
with genericsetup.upgradeSteps__cm(source='2.5', destination='2.5.1.rc1', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Upgrade all existing actions to new-style actions', handler='plone.app.upgrade.v30.alphas.migrateOldActions')
genericsetup.upgradeStep(title='Repair plone_lexicon pipeline', handler='.fixupPloneLexicon')
genericsetup.upgradeStep(title='General required upgrade steps', handler='.final_two51')
genericsetup.upgradeStep(source='2.5.1.rc1', destination='2.5.1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='2.5.1', destination='2.5.2.rc1', title='Changes cookie auth redirects to the correct location', profile='Products.CMFPlone:plone', handler='.setLoginFormInCookieAuth')
genericsetup.upgradeStep(source='2.5.2.rc1', destination='2.5.2', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='2.5.2', destination='2.5.3.rc1', title='Add markdown and textile mime types.', profile='Products.CMFPlone:plone', handler='.addMissingMimeTypes')
genericsetup.upgradeStep(source='2.5.3.rc1', destination='2.5.3', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='2.5.3', destination='2.5.4', title='Correct baseline profile in GenericSetup.', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.v30.alphas.updateImportStepsFromBaseProfile')
genericsetup.upgradeStep(source='2.5.4', destination='2.5.4.2', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='2.5.4.2', destination='2.5.5', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v25/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='2.5final-2.5.1', title='Upgrade profile for Plone 2.5-final to Plone 2.5.1', description='This profile contains configuration changes that are applied during the Plone 2.5-final to 2.5.1 upgrade.', directory='profiles/final_two51', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v30/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
# General
with genericsetup.upgradeSteps__cm(source='*', destination='3.0.5', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Make the portal a Zope3 site', handler='.alphas.enableZope3Site')
genericsetup.upgradeStep(title='Register some tools as utilities', handler='.alphas.registerToolsAsUtilities')
# Plone 2.5
with genericsetup.upgradeSteps__cm(source='2.5.5', destination='3.0.a1', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Updates the available GS import steps', handler='.alphas.updateImportStepsFromBaseProfile')
genericsetup.upgradeStep(title='Upgrade all existing actions to new-style actions', handler='.alphas.migrateOldActions')
genericsetup.upgradeStep(title='Add an i18n_domain to actions', handler='.alphas.updateActionsI18NDomain')
genericsetup.upgradeStep(title='Add an i18n_domain to type information', handler='.alphas.updateFTII18NDomain')
genericsetup.upgradeStep(title='General required upgrade steps', handler='.alphas.three0_alpha1')
genericsetup.upgradeStep(title='Remove tableless skin', handler='.alphas.removeTablelessSkin')
genericsetup.upgradeStep(title='Add portlet managers', handler='.alphas.addPortletManagers')
genericsetup.upgradeStep(title='Upgrade legacy portlets', handler='.alphas.convertLegacyPortlets')
# Plone 3.0
with genericsetup.upgradeSteps__cm(source='3.0.a1', destination='3.0.a2', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General required upgrade steps', handler='.alphas.alpha1_alpha2')
genericsetup.upgradeStep(title='Add reader and editor roles', handler='.alphas.addReaderAndEditorRoles')
genericsetup.upgradeStep(title='Change folder_localrole_form to @@sharing', handler='.alphas.migrateLocalroleForm')
genericsetup.upgradeStep(title='Reorder the user actions', handler='.alphas.reorderUserActions')
genericsetup.upgradeStep(title='Install KSS', handler='.alphas.installKss')
with genericsetup.upgradeSteps__cm(source='3.0.a2', destination='3.0.b1', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Remove empty default_charset from portal', handler='.betas.cleanDefaultCharset')
genericsetup.upgradeStep(title='General required upgrade steps', handler='.alphas.alpha2_beta1')
genericsetup.upgradeStep(title='Use the unpacked kukit-src.js and pack it ourself', handler='.alphas.updateKukitJS')
genericsetup.upgradeStep(title='Remove the mystuff user action', handler='.alphas.removeMyStuffAction')
genericsetup.upgradeStep(title='Modify security settings to match new default policies', handler='.alphas.updateMemberSecurity')
genericsetup.upgradeStep(title='Add new Plone Session Plugin', handler='.alphas.updatePASPlugins')
genericsetup.upgradeStep(title='Update configlet titles', handler='.alphas.updateConfigletTitles')
genericsetup.upgradeStep(title='Add a RAMCache for ResourceRegistries', handler='.alphas.addCacheForResourceRegistry')
genericsetup.upgradeStep(title='Add the object_provides catalog index', handler='.alphas.addObjectProvidesIndex')
genericsetup.upgradeStep(title='Add additional example workflows', handler='.alphas.addMissingWorkflows')
genericsetup.upgradeStep(title='Replace obsolete PlonePAS version of plone tool', handler='.alphas.restorePloneTool')
with genericsetup.upgradeSteps__cm(source='3.0.b1', destination='3.0.b2', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Upgrade history action', handler='.betas.migrateHistoryTab')
genericsetup.upgradeStep(title='Change the order of action providers', handler='.betas.changeOrderOfActionProviders')
genericsetup.upgradeStep(title='Update edit action with locking condition', handler='.betas.updateEditActionConditionForLocking')
genericsetup.upgradeStep(title='Add form unload JS to the JSregistry', handler='.betas.addOnFormUnloadJS')
genericsetup.upgradeStep(title='Remove old no longer used actions', handler='.betas.cleanupOldActions')
genericsetup.upgradeStep(title='General required upgrade steps', handler='.betas.beta1_beta2')
genericsetup.upgradeStep(title='Add automatic group PAS plugin', handler='.betas.addAutoGroupToPAS')
genericsetup.upgradeStep(title='Remove s5_presentation action', handler='.betas.removeS5Actions')
genericsetup.upgradeStep(title='Associate portal_kss with RAM cache', handler='.betas.addCacheForKSSRegistry')
genericsetup.upgradeStep(title='Disable KSS for anonymous users', handler='.betas.modifyKSSResources')
genericsetup.upgradeStep(title='Allow contributer role to add content', handler='.betas.addContributorToCreationPermissions')
genericsetup.upgradeStep(title='Remove no longer existing action proiders', handler='.betas.cleanupActionProviders')
genericsetup.upgradeStep(title='Remove properties tab from types', handler='.betas.hidePropertiesAction')
with genericsetup.upgradeSteps__cm(source='3.0.b2', destination='3.0.b3', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General required upgrade steps', handler='.betas.beta2_beta3')
genericsetup.upgradeStep(title='Remove sharing action from types', handler='.betas.removeSharingAction')
genericsetup.upgradeStep(title='Grant editor role secondary edit permissions', handler='.betas.addEditorToSecondaryEditorPermissions')
with genericsetup.upgradeSteps__cm(source='3.0.b3', destination='3.0.rc1', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General required upgrade steps', handler='.betas.beta3_rc1')
genericsetup.upgradeStep(title='Change the title of topics to collection', handler='.betas.updateTopicTitle')
genericsetup.upgradeStep(title='Separate KSS development and production resources', handler='.betas.modifyKSSResourcesForDevelMode')
genericsetup.upgradeStep(source='3.0.rc1', destination='3.0.rc2', title='Add intelligenttext mime type and transforms', profile='Products.CMFPlone:plone', handler='.rcs.addIntelligentText')
genericsetup.upgradeStep(source='3.0.rc2', destination='3.0', title='General required upgrade steps', profile='Products.CMFPlone:plone', handler='.rcs.rc2_final')
# Plone 3.0.x
genericsetup.upgradeStep(source='3.0', destination='3.0.1', title='General required upgrade steps', profile='Products.CMFPlone:plone', handler='.final_three0x.final_three01')
genericsetup.upgradeStep(source='3.0.1', destination='3.0.2', title='General required upgrade steps', profile='Products.CMFPlone:plone', handler='.final_three0x.three01_three02')
genericsetup.upgradeStep(source='3.0.2', destination='3.0.3', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
with genericsetup.upgradeSteps__cm(source='3.0.3', destination='3.0.4', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General required upgrade steps', handler='.final_three0x.three03_three04')
genericsetup.upgradeStep(title='Added new CMFEditions modifiers', handler='.final_three0x.installNewModifiers')
genericsetup.upgradeStep(source='3.0.4', destination='3.0.5', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.0.5', destination='3.0.6', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v30/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='2.5.x-3.0a1', title='Upgrade profile for Plone 2.5.x to Plone 3.0-alpha1', description='This profile contains configuration changes that are applied during the Plone 2.5.x to Plone 3.0-alpha1 upgrade.', directory='profiles/two5x_alpha1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0a1-3.0a2', title='Upgrade profile for Plone 3.0-alpha1 to Plone 3.0-alpha2', description='This profile contains configuration changes that are applied during the Plone 3.0-alpha1 to 3.0-alpha2 upgrade.', directory='profiles/alpha1_alpha2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0a2-3.0b1', title='Upgrade profile for Plone 3.0-alpha2 to Plone 3.0-beta1', description='This profile contains configuration changes that are applied during the Plone 3.0-alpha2 to 3.0-beta1 upgrade.', directory='profiles/alpha2_beta1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0b1-3.0b2', title='Upgrade profile for Plone 3.0-beta1 to Plone 3.0-beta2', description='This profile contains configuration changes that are applied during the Plone 3.0-beta1 to 3.0-beta2 upgrade.', directory='profiles/beta1_beta2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0b2-3.0b3', title='Upgrade profile for Plone 3.0-beta2 to Plone 3.0-beta3', description='This profile contains configuration changes that are applied during the Plone 3.0-beta2 to 3.0-beta3 upgrade.', directory='profiles/beta2_beta3', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0b3-3.0b4', title='Upgrade profile for Plone 3.0-beta3 to Plone 3.0-beta4', description='This profile contains configuration changes that are applied during the Plone 3.0-beta3 to 3.0-beta4 upgrade.', directory='profiles/beta3_beta4', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0rc2-3.0final', title='Upgrade profile for Plone 3.0-rc2 to Plone 3.0-final', description='This profile contains configuration changes that are applied during the Plone 3.0-rc2 to 3.0-final upgrade.', directory='profiles/rc2_final', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0rc2-3.0final-iterate', title='Upgrade profile for Plone 3.0-rc2 to Plone 3.0-final with iterate step.', description='This profile contains configuration changes that are applied during the Plone 3.0-rc2 to 3.0-final upgrade when iterate is installed.', directory='profiles/rc2_final_iterate', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0final-3.0.1', title='Upgrade profile for Plone 3.0-final to Plone 3.0.1', description='This profile contains configuration changes that are applied during the Plone 3.0-final to 3.0.1 upgrade.', directory='profiles/final_three01', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0.1-3.0.2', title='Upgrade profile for Plone 3.0.1 to Plone 3.0.2', description='This profile contains configuration changes that are applied during the Plone 3.0.1 to 3.0.2 upgrade.', directory='profiles/three01_three02', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.0.3-3.0.4', title='Upgrade profile for Plone 3.0.3 to Plone 3.0.4', description='This profile contains configuration changes that are applied during the Plone 3.0.3 to 3.0.4 upgrade.', directory='profiles/three03_three04', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v31/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
# Plone 3.1.x
genericsetup.upgradeStep(source='3.0.6', destination='3.1-beta1', title='Upgrade from Plone 3.0.6 to Plone 3.1-beta1', profile='Products.CMFPlone:plone', handler='.betas.three0_beta1')
genericsetup.upgradeStep(source='3.1-beta1', destination='3.1-rc1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1-rc1', destination='3.1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1', destination='3.1.1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1.1', destination='3.1.2', title='Upgrade from Plone 3.1.1 to Plone 3.1.2', profile='Products.CMFPlone:plone', handler='.final_three1x.three11_three12')
genericsetup.upgradeStep(source='3.1.2', destination='3.1.3', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1.3', destination='3.1.4', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1.4', destination='3.1.5', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='.final_three1x.three14_three15')
genericsetup.upgradeStep(source='3.1.5', destination='3.1.5.1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1.5.1', destination='3.1.6', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.1.6', destination='3.1.7', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v31/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='3.0.6-3.1beta1', title='Upgrade profile for Plone 3.0.6 to Plone 3.1-beta1', description='This profile contains configuration changes that are applied during the Plone 3.0.6 to 3.1-beta1 upgrade.', directory='profiles/three0_beta1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.1.1-3.1.2', title='Upgrade profile for Plone 3.1.1 to Plone 3.1.2', description='This profile contains configuration changes that are applied during the Plone 3.1.1 to 3.1.2 upgrade.', directory='profiles/three11_three12', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.1.3-3.1.4', title='Upgrade profile for Plone 3.1.3 to Plone 3.1.4', description='This profile contains configuration changes that are applied during the Plone 3.1.3 to 3.1.4 upgrade.', directory='profiles/three13_three14', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v32/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
genericsetup.upgradeStep(source='3.1.7', destination='3.2a1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.2a1', destination='3.2rc1', title='Update permissions on iterate actions.', profile='Products.CMFPlone:plone', handler='.betas.three1_beta1')
genericsetup.upgradeStep(source='3.2rc1', destination='3.2', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.2', destination='3.2.1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.2.1', destination='3.2.2', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.2.2', destination='3.2.3', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v32/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='3.2a1-3.2a2-iterate', title='Upgrade profile for Plone 3.2a1 to Plone 3.2a2 with Iterate', description='This profile contains configuration changes that are applied during the Plone 3.2a1 to 3.2a2 upgrade when Iterate is installed.', directory='profiles/three1_beta1_iterate', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.2-3.2.1', title='Upgrade profile for Plone 3.2 to Plone 3.2.1', description='This profile contains configuration changes that are applied during the Plone 3.2 to 3.2.1 upgrade.', directory='v3_2/profiles/three2_three21', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v33/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
genericsetup.upgradeStep(source='3.2.3', destination='3.3b1', title='Add link and lock settings for Plone 3.3', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.v33.three2_three3')
genericsetup.upgradeStep(source='3.3b1', destination='3.3rc1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3rc1', destination='3.3rc2', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3rc2', destination='3.3rc3', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3rc3', destination='3.3rc4', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3rc4', destination='3.3rc5', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3rc5', destination='3.3', title='Modify actions to work with the new INavigationRoot', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.v33.three3_rc3_three3_rc4')
genericsetup.upgradeStep(source='3.3', destination='3.3.1', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3.1', destination='3.3.2', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3.2', destination='3.3.3', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3.3', destination='3.3.4', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
# the following are placeholders for anticipated releases in the 3.3.x series.
# if these are released with real profile changes, we'll need to merge the
# upgrade steps here
genericsetup.upgradeStep(source='3.3.4', destination='3.3.5', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='3.3.5', destination='3.3.6', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v33/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='3.2.1-3.3a1', title='Upgrade profile for Plone 3.2.1 to Plone 3.3a1', description='This profile adds default link and lock settings for Plone 3.3', directory='profiles/three2_three3', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3.3rc3-3.3', title='Upgrade profile for Plone 3.3rc3 to Plone 3.3', description='This profile contains configuration changes that are applied during the Plone 3.3rc3 to 3.3 upgrade.', directory='profiles/three3_rc3_three3_rc4', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v40/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
# Allow upgrades from alpha releases with an old version scheme
genericsetup.upgradeStep(source='4.0a1', destination='4001', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='4.0a2', destination='4002', title='Empty upgrade step', profile='Products.CMFPlone:plone', handler='plone.app.upgrade.utils.null_upgrade_step')
with genericsetup.upgradeSteps__cm(source='*', destination='4001', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Uninstall a broken CacheFu', handler='.alphas.removeBrokenCacheFu')
genericsetup.upgradeStep(title='Unregister old export and import steps.', handler='.alphas.unregisterOldSteps')
genericsetup.upgradeStep(title='Cleanup the persistent tool registry.', handler='.alphas.cleanUpToolRegistry')
genericsetup.upgradeStep(title='Update the toolset registry.', handler='.alphas.updateToolset')
genericsetup.upgradeStep(title='Cleanup the skins tool.', handler='.alphas.cleanUpSkinsTool')
genericsetup.upgradeStep(title="Cleanup Zope's products registry.", handler='.alphas.cleanUpProductRegistry')
# the source here needs to be kept in sync with the latest 3.x profile
# version. see also migrations/__init__.py in CMFPlone 3.x and
# p.a.upgrade.v33's configure.zcml
with genericsetup.upgradeSteps__cm(source='3.3.6', destination='4001', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Remember active theme.', handler='.alphas.rememberTheme')
genericsetup.upgradeStep(title='General upgrade steps.', handler='.alphas.threeX_alpha1')
genericsetup.upgradeStep(title='Restore theme after Sunburst has been installed.', handler='.alphas.restoreTheme')
genericsetup.upgradeStep(title='Upgrade action icons away from the action icons tool.', handler='.alphas.migrateActionIcons')
genericsetup.upgradeStep(title='Migrate type icons from content_icon to icon_expr', handler='.alphas.migrateTypeIcons')
genericsetup.upgradeStep(title='Update the local RAMCache utility import location.', handler='.alphas.addOrReplaceRamCache')
genericsetup.upgradeStep(title='Update the actor variable expression in several workflows.', handler='.alphas.changeWorkflowActorVariableExpression')
genericsetup.upgradeStep(title='Update expression for authenticated-only resources.', handler='.alphas.changeAuthenticatedResourcesCondition')
genericsetup.upgradeStep(title='Configure new reference browser.', handler='.alphas.setupReferencebrowser')
genericsetup.upgradeStep(title='Remove outdated actions and properties from the Portal FTI.', handler='.alphas.cleanPloneSiteFTI')
genericsetup.upgradeStep(title='Add new CMFEditions default modifiers.', handler='plone.app.upgrade.v30.final_three0x.installNewModifiers')
genericsetup.upgradeStep(title='Upgrade MailHost.', handler='.alphas.migrateMailHost')
genericsetup.upgradeStep(title='Upgrade standard folders to new unified folder type.', handler='.alphas.migrateFolders')
with genericsetup.upgradeSteps__cm(source='4001', destination='4002', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Rename join_form_fields.', handler='.alphas.renameJoinFormFields')
with genericsetup.upgradeSteps__cm(source='4002', destination='4003', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Update Join action URL', handler='plone.app.upgrade.v40.alphas.alpha2_alpha3')
with genericsetup.upgradeSteps__cm(source='4003', destination='4004', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Upgrade DCMI metadata storage in portal_metadata', handler='Products.CMFDefault.upgrade.to22.upgrade_dcmi_metadata')
genericsetup.upgradeStep(title='Add the recursive groups PAS plugin.', handler='.alphas.addRecursiveGroupsPlugin')
genericsetup.upgradeStep(title="Update portal type of former 'Large Folder' content", handler='plone.app.upgrade.v40.alphas.updateLargeFolderType')
with genericsetup.upgradeSteps__cm(source='4004', destination='4005', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title="Cleanup Zope's products registry.", handler='.alphas.cleanUpProductRegistry')
genericsetup.upgradeStep(title='Cleanup Classic Theme CSS registry metadata.', handler='.alphas.cleanUpClassicThemeResources')
with genericsetup.upgradeSteps__cm(source='4005', destination='4006', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps.', handler='plone.app.upgrade.v40.alphas.alpha4_alpha5')
with genericsetup.upgradeSteps__cm(source='4006', destination='4007', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.alpha5_beta1')
genericsetup.upgradeStep(title='Ensure recursive groups plugin is properly placed.', handler='.betas.repositionRecursiveGroupsPlugin')
with genericsetup.upgradeSteps__cm(source='4007', destination='4008', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.beta1_beta2')
genericsetup.upgradeStep(title='Update the safe_html transform with the new config params, migrating existing config from Kupu.', handler='.betas.updateSafeHTMLConfig')
genericsetup.upgradeStep(title='Update the getIcon metadata column for all core content types.', handler='.betas.updateIconMetadata')
with genericsetup.upgradeSteps__cm(source='4008', destination='4009', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.beta2_beta3')
with genericsetup.upgradeSteps__cm(source='4009', destination='4010', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.beta3_beta4')
genericsetup.upgradeStep(title='Complete removal of Large Plone Folder content type', handler='plone.app.upgrade.v40.betas.removeLargePloneFolder')
genericsetup.upgradeStep(title='Convert standard file and image types to blobs.', handler='plone.app.upgrade.v40.betas.convertToBlobs')
with genericsetup.upgradeSteps__cm(source='4010', destination='4011', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.beta4_beta5')
with genericsetup.upgradeSteps__cm(source='4011', destination='4012', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.beta5_rc1')
with genericsetup.upgradeSteps__cm(source='4012', destination='4013', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.rc1_final')
with genericsetup.upgradeSteps__cm(source='4013', destination='4014', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.four01')
with genericsetup.upgradeSteps__cm(source='4014', destination='4015', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.four02')
with genericsetup.upgradeSteps__cm(source='4015', destination='4016', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.four03')
with genericsetup.upgradeSteps__cm(source='4016', destination='4017', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.four04')
with genericsetup.upgradeSteps__cm(source='4017', destination='4018', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='General upgrade steps', handler='plone.app.upgrade.v40.betas.four05')
genericsetup.upgradeStep(source='4018', destination='4019', profile='Products.CMFPlone:plone', title='No upgrade steps', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='4019', destination='4020', profile='Products.CMFPlone:plone', title='No upgrade steps', handler='plone.app.upgrade.utils.null_upgrade_step')
genericsetup.upgradeStep(source='4020', destination='4022', profile='Products.CMFPlone:plone', title='No upgrade steps', handler='plone.app.upgrade.utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v40/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='update-toolset', title='Update toolset', description="This profile updates the toolset to make sure other profiles don't try to use broken tools.", directory='profiles/update_toolset', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='3-4alpha1', title='Upgrade profile for Plone 3.x to Plone 4.0alpha1', description='This profile contains configuration changes that are applied during the Plone 3.x to 4.0alpha1 upgrade.', directory='profiles/to_alpha1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4alpha2-4alpha3', title='Upgrade profile for Plone 4.0alpha2 to Plone 4.0alpha3', description='This profile contains configuration changes that are applied during the Plone 4.0a2 to 4.0a3 upgrade.', directory='profiles/to_alpha3', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4alpha4-4alpha5', title='Upgrade profile for Plone 4.0alpha4 to Plone 4.0alpha5', description='This profile contains configuration changes that are applied during the Plone 4.0a4 to 4.0a5 upgrade.', directory='profiles/to_alpha5', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4alpha5-4beta1', title='Upgrade profile for Plone 4.0alpha5 to Plone 4.0beta1', description='This profile contains configuration changes that are applied during the Plone 4.0a5 to 4.0b1 upgrade.', directory='profiles/to_beta1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4beta1-4beta2', title='Upgrade profile for Plone 4.0beta1 to Plone 4.0beta2', description='This profile contains configuration changes that are applied during the Plone 4.0b1 to 4.0b2 upgrade.', directory='profiles/to_beta2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4beta2-4beta3', title='Upgrade profile for Plone 4.0beta2 to Plone 4.0beta3', description='This profile contains configuration changes that are applied during the Plone 4.0b2 to 4.0b3 upgrade.', directory='profiles/to_beta3', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4beta3-4beta4', title='Upgrade profile for Plone 4.0beta3 to Plone 4.0beta4', description='This profile contains configuration changes that are applied during the Plone 4.0b3 to 4.0b4 upgrade.', directory='profiles/to_beta4', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4beta4-4beta5', title='Upgrade profile for Plone 4.0beta4 to Plone 4.0beta5', description='This profile contains configuration changes that are applied during the Plone 4.0b4 to 4.0b5 upgrade.', directory='profiles/to_beta5', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4beta5-4rc1', title='Upgrade profile for Plone 4.0beta5 to Plone 4.0rc1', description='This profile contains configuration changes that are applied during the Plone 4.0b5 to 4.0rc1 upgrade.', directory='profiles/to_rc1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4rc1-4final', title='Upgrade profile for Plone 4.0rc1 to Plone 4.0', description='This profile contains configuration changes that are applied during the Plone 4.0rc1 to 4.0 upgrade.', directory='profiles/to_final', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.0-4.0.1', title='Upgrade profile for Plone 4.0 to Plone 4.0.1', description='This profile contains configuration changes that are applied during the Plone 4.0 to 4.0.1 upgrade.', directory='profiles/to_four01', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.0.1-4.0.2', title='Upgrade profile for Plone 4.0.1 to Plone 4.0.2', description='This profile contains configuration changes that are applied during the Plone 4.0.1 to 4.0.2 upgrade.', directory='profiles/to_four02', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.0.2-4.0.3', title='Upgrade profile for Plone 4.0.2 to Plone 4.0.3', description='This profile contains configuration changes that are applied during the Plone 4.0.2 to 4.0.3 upgrade.', directory='profiles/to_four03', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.0.3-4.0.4', title='Upgrade profile for Plone 4.0.3 to Plone 4.0.4', description='This profile contains configuration changes that are applied during the Plone 4.0.3 to 4.0.4 upgrade.', directory='profiles/to_four04', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.0.4-4.0.5', title='Upgrade profile for Plone 4.0.4 to Plone 4.0.5', description='This profile contains configuration changes that are applied during the Plone 4.0.4 to 4.0.5 upgrade.', directory='profiles/to_four05', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v41/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
with genericsetup.upgradeSteps__cm(source='4022', destination='4100', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Add Site Administrator role', description='Update rolemap and workflows to support the Site Administrator role.', handler='.alphas.add_siteadmin_role')
genericsetup.upgradeStep(title='Update role mappings', description='Make sure the updated rolemap/workflows take effect. (Reindexes the allowedRolesAndUsers index.)', handler='.alphas.update_role_mappings')
genericsetup.upgradeStep(title='Update control panel permissions', description='', handler='.alphas.update_controlpanel_permissions')
genericsetup.upgradeStep(title='Install plone.outputfilters', description='This new package unifies the resolveuid and captioning transforms from kupu and TinyMCE.', handler='.alphas.install_outputfilters')
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.alphas.to41alpha1')
with genericsetup.upgradeSteps__cm(source='4100', destination='4101', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.alphas.to41alpha2')
with genericsetup.upgradeSteps__cm(source='4101', destination='4102', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.alphas.to41alpha3')
with genericsetup.upgradeSteps__cm(source='4102', destination='4103', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41beta1')
with genericsetup.upgradeSteps__cm(source='4103', destination='4104', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41beta2')
with genericsetup.upgradeSteps__cm(source='4104', destination='4105', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41rc1')
with genericsetup.upgradeSteps__cm(source='4105', destination='4106', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41rc2')
with genericsetup.upgradeSteps__cm(source='4106', destination='4107', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41rc3')
with genericsetup.upgradeSteps__cm(source='4107', destination='4108', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41rc4')
with genericsetup.upgradeSteps__cm(source='4108', destination='4109', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to41final')
with genericsetup.upgradeSteps__cm(source='4109', destination='4110', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Fix OkapiIndex total document lengths', description='', handler='.final.to411')
with genericsetup.upgradeSteps__cm(source='4110', destination='4111', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Repair owner tuples', description='', handler='.final.to412_owner_tuples')
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to412')
with genericsetup.upgradeSteps__cm(source='4112', destination='4113', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to414')
with genericsetup.upgradeSteps__cm(source='4113', destination='4114', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to415')
with genericsetup.upgradeSteps__cm(source='4114', destination='4115', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to416')
# ----------------------------------------------------
# plone/app/upgrade/v41/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='to41alpha1', title='Upgrade profile for Plone 4.0.x to Plone 4.1alpha1', description='', directory='profiles/to_alpha1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41alpha2', title='Upgrade profile for Plone 4.1alpha1 to Plone 4.1alpha2', description='', directory='profiles/to_alpha2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41alpha3', title='Upgrade profile for Plone 4.1alpha2 to Plone 4.1alpha3', description='', directory='profiles/to_alpha3', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41beta1', title='Upgrade profile for Plone 4.1alpha3 to Plone 4.1beta1', description='', directory='profiles/to_beta1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41beta2', title='Upgrade profile for Plone 4.1beta1 to Plone 4.1beta2', description='', directory='profiles/to_beta2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41rc1', title='Upgrade profile for Plone 4.1beta2 to Plone 4.1rc1', description='', directory='profiles/to_rc1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41rc2', title='Upgrade profile for Plone 4.1rc1 to Plone 4.1rc2', description='', directory='profiles/to_rc2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41rc3', title='Upgrade profile for Plone 4.1rc2 to Plone 4.1rc3', description='', directory='profiles/to_rc3', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41rc4', title='Upgrade profile for Plone 4.1rc3 to Plone 4.1rc4', description='', directory='profiles/to_rc4', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to41final', title='Upgrade profile for Plone 4.1rc3 to Plone 4.1', description='', directory='profiles/to_final', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.1-4.1.1', title='Upgrade profile for Plone 4.1 to Plone 4.1.1', description='This profile contains configuration changes that are applied during the Plone 4.1 to 4.1.1 upgrade.', directory='profiles/to_411', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.1.1-4.1.2', title='Upgrade profile for Plone 4.1.1 to Plone 4.1.2', description='This profile contains configuration changes that are applied during the Plone 4.1.1 to 4.1.2 upgrade.', directory='profiles/to_412', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.1.2-4.1.3', title='Upgrade profile for Plone 4.1.2 to Plone 4.1.3', description='This profile contains configuration changes that are applied during the Plone 4.1.2 to 4.1.3 upgrade.', directory='profiles/to_413', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.1.3-4.1.4', title='Upgrade profile for Plone 4.1.3 to Plone 4.1.4', description='This profile contains configuration changes that are applied during the Plone 4.1.3 to 4.1.4 upgrade.', directory='profiles/to_414', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.1.4-4.1.5', title='Upgrade profile for Plone 4.1.4 to Plone 4.1.5', description='This profile contains configuration changes that are applied during the Plone 4.1.4 to 4.1.5 upgrade.', directory='profiles/to_415', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='4.1.5-4.1.6', title='Upgrade profile for Plone 4.1.5 to Plone 4.1.6', description='This profile contains configuration changes that are applied during the Plone 4.1.5 to 4.1.6 upgrade.', directory='profiles/to_416', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/upgrade/v42/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='profiles.zcml')
with genericsetup.upgradeSteps__cm(source='4115', destination='4200', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.alphas.to42alpha1')
with genericsetup.upgradeSteps__cm(source='4200', destination='4201', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.alphas.to42alpha2')
with genericsetup.upgradeSteps__cm(source='4201', destination='4202', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Repair owner tuples', description='', handler='.betas.to42beta1_owner_tuples')
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to42beta1')
with genericsetup.upgradeSteps__cm(source='4202', destination='4203', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to42beta2')
with genericsetup.upgradeSteps__cm(source='4203', destination='4204', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to42rc1')
genericsetup.upgradeStep(title='Fix discussion', description='', handler='.betas.to42rc1_discussion')
genericsetup.upgradeStep(title="Add Member role to 'Portlets: View dashboard' permission", description='', handler='.betas.to42rc1_member_dashboard')
with genericsetup.upgradeSteps__cm(source='4204', destination='4205', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.betas.to42rc2')
with genericsetup.upgradeSteps__cm(source='4205', destination='4206', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Install the CMFEditions component registry bases modifier', handler='.final.to42final_cmfeditions_registry_bases')
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to42final')
with genericsetup.upgradeSteps__cm(source='4206', destination='4207', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to421')
with genericsetup.upgradeSteps__cm(source='4207', destination='4208', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to422')
with genericsetup.upgradeSteps__cm(source='4208', destination='4209', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to423')
with genericsetup.upgradeSteps__cm(source='4209', destination='4210', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to424')
with genericsetup.upgradeSteps__cm(source='4210', destination='4211', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='.final.to425')
with genericsetup.upgradeSteps__cm(source='4211', destination='4212', profile='Products.CMFPlone:plone'):
genericsetup.upgradeStep(title='Miscellaneous', description='', handler='..utils.null_upgrade_step')
# ----------------------------------------------------
# plone/app/upgrade/v42/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='to42alpha1', title='Upgrade profile for Plone 4.1.x to Plone 4.2alpha1', description='', directory='profiles/to_alpha1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to42alpha2', title='Upgrade profile for Plone 4.2a1 to Plone 4.2a2', description='', directory='profiles/to_alpha2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to42beta1', title='Upgrade profile for Plone 4.2a2 to Plone 4.2b1', description='', directory='profiles/to_beta1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to42beta2', title='Upgrade profile for Plone 4.2b1 to Plone 4.2b2', description='', directory='profiles/to_beta2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to42rc1', title='Upgrade profile for Plone 4.2b2 to Plone 4.2rc1', description='', directory='profiles/to_rc1', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to42rc2', title='Upgrade profile for Plone 4.2rc1 to Plone 4.2rc2', description='', directory='profiles/to_rc2', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to42final', title='Upgrade profile for Plone 4.2rc2 to Plone 4.2', description='', directory='profiles/to_final', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to421', title='Upgrade profile for Plone 4.2 to Plone 4.2.1', description='', directory='profiles/to_421', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to422', title='Upgrade profile for Plone 4.2.1 to Plone 4.2.2', description='', directory='profiles/to_422', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to423', title='Upgrade profile for Plone 4.2.2 to Plone 4.2.3', description='', directory='profiles/to_423', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to424', title='Upgrade profile for Plone 4.2.3 to Plone 4.2.4', description='', directory='profiles/to_424', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='to425', title='Upgrade profile for Plone 4.2.4 to Plone 4.2.5', description='', directory='profiles/to_425', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/app/users/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.users'):
zope.include(package='plone.app.controlpanel')
zope.include(package='Products.CMFCore', file='permissions.zcml')
zope.utility(provides='.userdataschema.IUserDataSchemaProvider', factory='.userdataschema.UserDataSchemaProvider')
zope.include(package='.browser')
browser.page(name='member-registration', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.registration.RegistrationControlPanel', permission='plone.app.controlpanel.UsersAndGroups')
zope.adapter(factory='.registration.RegistrationControlPanelAdapter')
# ----------------------------------------------------
# plone/app/users/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
# Join form definition
browser.page(name='register', for_='plone.app.layout.navigation.interfaces.INavigationRoot', class_='.register.RegistrationForm', permission='cmf.AddPortalMember')
browser.page(name='new-user', for_='plone.app.layout.navigation.interfaces.INavigationRoot', class_='.register.AddUserForm', permission='plone.app.controlpanel.UsersAndGroups')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='change-password', class_='.personalpreferences.PasswordAccountPanel', permission='cmf.SetOwnPassword')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='account-macro', class_='.account.AccountPanelView', attribute='getMacro', permission='cmf.SetOwnProperties')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='personal-preferences', class_='.personalpreferences.PersonalPreferencesPanel', permission='cmf.SetOwnProperties')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='user-preferences', class_='.personalpreferences.PersonalPreferencesConfiglet', permission='plone.app.controlpanel.UsersAndGroups')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='personal-information', class_='.personalpreferences.UserDataPanel', permission='cmf.SetOwnProperties')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='user-information', class_='.personalpreferences.UserDataConfiglet', permission='plone.app.controlpanel.UsersAndGroups')
zope.utility(provides='zope.schema.interfaces.IVocabularyFactory', component='.register.getGroupIds', name='Group Ids')
zope.adapter(provides='.personalpreferences.IPersonalPreferences', for_='plone.app.layout.navigation.interfaces.INavigationRoot', factory='.personalpreferences.PersonalPreferencesPanelAdapter')
zope.adapter(provides='..userdataschema.IUserDataSchema', for_='plone.app.layout.navigation.interfaces.INavigationRoot', factory='.personalpreferences.UserDataPanelAdapter')
zope.adapter(factory='.personalpreferences.PasswordPanelAdapter')
# ----------------------------------------------------
# plone/app/workflow/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='permissions.zcml')
zope.include(file='exportimport.zcml')
zope.include(package='.browser')
# Local roles managed in the @@sharing view
zope.utility(name='Reader', factory='.localroles.ReaderRole')
zope.utility(name='Editor', factory='.localroles.EditorRole')
zope.utility(name='Contributor', factory='.localroles.ContributorRole')
zope.utility(name='Reviewer', factory='.localroles.ReviewerRole')
#
# <utility
# name="Manager"
# factory=".localroles.ManagerRole"
# />
#
# <utility
# name="Owner"
# factory=".localroles.OwnerRole"
# />
#
# <utility
# name="Member"
# factory=".localroles.MemberRole"
# />
#
# ----------------------------------------------------
# plone/app/workflow/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.workflow'):
# Permissions that Five don't give us
zope.permission(id='cmf.ChangeLocalRoles', title='Change local roles')
# Our custom permissions
zope.permission(id='plone.DelegateRoles', title='Sharing page: Delegate roles')
zope.permission(id='plone.DelegateReaderRole', title='Sharing page: Delegate Reader role')
zope.permission(id='plone.DelegateEditorRole', title='Sharing page: Delegate Editor role')
zope.permission(id='plone.DelegateContributorRole', title='Sharing page: Delegate Contributor role')
zope.permission(id='plone.DelegateReviewerRole', title='Sharing page: Delegate Reviewer role')
# ----------------------------------------------------
# plone/app/workflow/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.exportimport.SharingXMLAdapter', name='plone.app.workflow.sharing')
with gs.importStep__cm(name='sharing', title='Sharing (local) roles', description='The roles that are used on the sharing page', handler='.exportimport.import_sharing'):
zope.depends(name='rolemap')
gs.exportStep(name='sharing', title='Sharing (local) roles', description='The roles that are used on the sharing page', handler='.exportimport.export_sharing')
# ----------------------------------------------------
# plone/app/workflow/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(name='sharing', for_='*', class_='.sharing.SharingView', permission='plone.DelegateRoles')
browser.page(name='updateSharingInfo', for_='*', class_='.sharing.SharingView', attribute='updateSharingInfo', permission='plone.DelegateRoles')
# ----------------------------------------------------
# plone/batching/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
five.registerPackage(package='.')
browser.page(name='batch_macros', for_='*', permission='zope.Public', class_='.browser.BatchMacrosView', template='batch_macros.pt')
browser.page(name='batchnavigation', for_='*', permission='zope.Public', class_='.browser.PloneBatchView', template='batchnavigation.pt')
# ----------------------------------------------------
# plone/memoize/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='zope.annotation')
zope.utility(component='.ram.global_cache', provides='zope.ramcache.interfaces.ram.IRAMCache')
zope.utility(component='.ram.choose_cache', provides='.interfaces.ICacheChooser')
# ----------------------------------------------------
# plone/session/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
five.registerPackage(package='.', initialize='.initialize')
zope.include(package='plone.protect')
zope.include(file='resources.zcml')
if config.eval_condition('installed Products.CMFPlone'):
zope.include(file='profiles.zcml')
# ----------------------------------------------------
# plone/protect/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.protect'):
zope.include(package='plone.keyring')
browser.page(for_='*', name='authenticator', class_='.authenticator.AuthenticatorView', permission='zope.Public', allowed_interface='.interfaces.IAuthenticatorView')
if config.eval_condition('installed Products.CMFCore'):
genericsetup.registerProfile(name='default', directory='profiles/default', title='plone.protect configuration', description='Local configuration for plone.protect', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# plone/keyring/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.keyring'):
if config.eval_condition('installed Products.GenericSetup'):
genericsetup.registerProfile(name='default', directory='profiles/default', title='plone.keyring KeyManager registration', description='Registers a persistent plone.keyring KeyManager', provides='Products.GenericSetup.interfaces.EXTENSION', for_='zope.component.interfaces.IComponentRegistry')
# ----------------------------------------------------
# plone/session/resources.zcml
# ----------------------------------------------------
def includeme(config):
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with browser.configure__cm():
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.resource(name='plone.session.refreshsupport.js', file='resources/refreshsupport.js')
# ----------------------------------------------------
# plone/session/profiles.zcml
# ----------------------------------------------------
def includeme(config):
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with genericsetup.configure__cm(i18n_domain='plone'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup.registerProfile(name='default', title='Session refresh support', directory='profiles/default', description='Optional plone.session refresh support.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/browserlayer/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.browserlayer'):
with genericsetup.importStep__cm(name='browserlayer', title='Package browser layers', description='Enables use of skin layers for installed products.', handler='plone.browserlayer.exportimport.importLayers'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='browserlayer', title='Package browser layers', description='Export package browser layers', handler='plone.browserlayer.exportimport.exportLayers')
zope.subscriber(for_='Products.CMFCore.interfaces.ISiteRoot zope.traversing.interfaces.IBeforeTraverseEvent', handler='.layer.mark_layer')
zope.adapter(factory='.exportimport.BrowserLayerXMLAdapter', name='plone.browserlayer')
# ----------------------------------------------------
# plone/theme/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.subscriber(for_='Products.CMFCore.interfaces.ISiteRoot zope.traversing.interfaces.IBeforeTraverseEvent', handler='.layer.mark_layer')
# ----------------------------------------------------
# plone/portlet/static/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
plone = config.get_namespace('http://namespaces.plone.org/plone')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
five.registerPackage(package='.')
genericsetup.registerProfile(name='default', title='Static text portlet', directory='profiles/default', description='A simple portlet that displays static HTML', provides='Products.GenericSetup.interfaces.EXTENSION')
zope.permission(id='plone.portlet.static.AddStaticPortlet', title='plone.portlet.static: Add static portlet')
# Register the portlet
plone.portlet(name='plone.portlet.static.Static', interface='.static.IStaticPortlet', assignment='.static.Assignment', view_permission='zope2.View', edit_permission='plone.portlet.static.AddStaticPortlet', renderer='.static.Renderer', addview='.static.AddForm', editview='.static.EditForm')
# ----------------------------------------------------
# plone/portlet/collection/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
plone = config.get_namespace('http://namespaces.plone.org/plone')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
five.registerPackage(package='.')
genericsetup.registerProfile(name='default', title='Collection portlet', directory='profiles/default', description='A simple portlet that displays the results of a collection object', provides='Products.GenericSetup.interfaces.EXTENSION')
zope.permission(id='plone.portlet.collection.AddCollectionPortlet', title='plone.portlet.collection: Add collection portlet')
# Register the portlet
plone.portlet(name='plone.portlet.collection.Collection', interface='.collection.ICollectionPortlet', assignment='.collection.Assignment', view_permission='zope2.View', edit_permission='plone.portlet.collection.AddCollectionPortlet', renderer='.collection.Renderer', addview='.collection.AddForm', editview='.collection.EditForm')
# ----------------------------------------------------
# borg/localrole/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='borg.localrole'):
five.registerPackage(package='.', initialize='.initialize')
# Register GenericSetup profile used for installation
genericsetup.registerProfile(name='default', title='b-org local role plug-in', directory='profiles/default', description='This is a PAS plug-in that makes it easy to determine local roles via an adapter lookup', provides='Products.GenericSetup.interfaces.EXTENSION')
# Installs the Factory Tool adapter if Plone is installed
if config.eval_condition('installed Products.CMFPlone'):
with zope.class__cm(class_='Products.CMFPlone.FactoryTool.TempFolder'):
zope.implements(interface='.interfaces.IFactoryTempFolder')
if config.eval_condition('installed Products.CMFPlone'):
zope.adapter(factory='.factory_adapter.FactoryTempFolderProvider')
zope.include(file='exportimport.zcml')
zope.include(package='plone.memoize')
# ----------------------------------------------------
# borg/localrole/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# XXX should probably define an IWorkspaceLocalRolesPlugin
# interface in the next release instead of using the class as
# the 'for' value
zope.adapter(factory='Products.PluggableAuthService.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='borg.localrole.workspace.WorkspaceLocalRoleManager')
zope.adapter(factory='Products.PluggableAuthService.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='borg.localrole.workspace.WorkspaceLocalRoleManager')
# ----------------------------------------------------
# borg/localrole/default.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope.adapter(factory='.default_adapter.DefaultLocalRoleAdapter', name='default')
# ----------------------------------------------------
# Products/CMFPlone/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(file='admin.zcml')
with zope.class__cm(class_='Products.CMFPlone.Portal.PloneSite'):
zope.implements(interface='plone.app.layout.navigation.interfaces.INavigationRoot')
with zope.class__cm(class_='.navtree.NavtreeQueryBuilder'):
zope.allow(interface='plone.app.layout.navigation.interfaces.INavigationQueryBuilder')
browser.page(for_='*', name='breadcrumbs_view', class_='.navigation.PhysicalNavigationBreadcrumbs', permission='zope.Public', allowed_attributes='breadcrumbs')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='breadcrumbs_view', class_='.navigation.RootPhysicalNavigationBreadcrumbs', permission='zope.Public', allowed_attributes='breadcrumbs')
browser.page(for_='*', name='plone_javascript_variables.js', class_='.jsvariables.JSVariables', permission='zope.Public')
browser.page(for_='*', name='navtree_builder_view', class_='.navigation.CatalogNavigationTree', permission='zope.Public', allowed_attributes='navigationTree')
browser.page(for_='*', name='sitemap_builder_view', class_='.navigation.CatalogSiteMap', permission='zope.Public', allowed_attributes='siteMap')
browser.page(for_='*', name='portal_tabs_view', class_='.navigation.CatalogNavigationTabs', permission='zope.Public', allowed_attributes='topLevelTabs')
browser.page(for_='*', name='plone', class_='.ploneview.Plone', permission='zope.Public', allowed_interface='.interfaces.IPlone')
browser.page(for_='*', name='sitemap', class_='.sitemap.SitemapView', template='templates/sitemap.pt', permission='zope.Public', allowed_interface='.interfaces.ISitemapView')
zope.adapter(for_='* .interfaces.INavigationTree', factory='.navtree.DefaultNavtreeStrategy', provides='plone.app.layout.navigation.interfaces.INavtreeStrategy')
zope.adapter(for_='* .interfaces.ISiteMap', factory='.navtree.SitemapNavtreeStrategy', provides='plone.app.layout.navigation.interfaces.INavtreeStrategy')
# Useful for cross domain iframe proxying
browser.resource(file='blank.html', name='blank.html')
zope.include(package='.syndication')
# ----------------------------------------------------
# Products/CMFPlone/browser/admin.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.view(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='plone-frontpage-setup', class_='.admin.FrontPage', permission='zope.Public')
browser.page(for_='OFS.interfaces.IApplication', name='plone-addsite', class_='.admin.AddPloneSite', permission='zope2.ViewManagementScreens', template='templates/plone-addsite.pt')
browser.page(for_='OFS.Folder.Folder', name='plone-addsite', class_='.admin.AddPloneSite', permission='zope2.ViewManagementScreens', template='templates/plone-addsite.pt')
browser.page(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', name='plone-upgrade', class_='.admin.Upgrade', permission='cmf.ManagePortal', template='templates/plone-upgrade.pt')
browser.page(for_='OFS.interfaces.IApplication', name='plone-overview', class_='.admin.Overview', permission='zope.Public', template='templates/plone-overview.pt')
browser.page(for_='OFS.interfaces.IApplication', name='plone-root-login', class_='.admin.RootLoginRedirect', permission='cmf.ManagePortal')
browser.page(for_='plone.app.layout.navigation.interfaces.INavigationRoot', name='plone-root-logout', class_='.admin.RootLogout', permission='zope.Public')
zope.adapter(factory='.admin.AppTraverser')
browser.resource(file='plone-logo.png', name='plone-logo.png')
browser.resource(file='plone-admin-ui.css', name='plone-admin-ui.css')
# ----------------------------------------------------
# Products/CMFPlone/browser/syndication/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='Products.CMFPlone'):
if config.eval_condition('installed plone.dexterity'):
with zope.class__cm(class_='plone.dexterity.content.Container'):
zope.implements(interface='Products.CMFPlone.interfaces.syndication.ISyndicatable')
zope.adapter(factory='.settings.FeedSettings')
zope.adapter(factory='.adapters.FolderFeed', for_='Products.CMFCore.interfaces._content.IFolderish')
if config.eval_condition('installed plone.app.collection'):
zope.adapter(factory='.adapters.CollectionFeed', for_='plone.app.collection.interfaces.ICollection')
if config.eval_condition('installed Products.ATContentTypes'):
zope.adapter(factory='.adapters.CollectionFeed', for_='Products.ATContentTypes.interfaces.topic.IATTopic')
zope.adapter(factory='.adapters.SearchFeed', for_='Products.CMFPlone.interfaces.siteroot.IPloneSiteRoot', provides='Products.CMFPlone.interfaces.syndication.ISearchFeed')
if config.eval_condition('installed plone.dexterity'):
zope.adapter(factory='.adapters.DexterityItem', for_='plone.dexterity.interfaces.IDexterityContent Products.CMFPlone.interfaces.syndication.IFeed', provides='Products.CMFPlone.interfaces.syndication.IFeedItem')
browser.page(for_='Products.CMFPlone.interfaces.syndication.ISyndicatable', name='synPropertiesForm', class_='.views.SettingsFormView', permission='cmf.ModifyPortalContent')
browser.page(for_='*', name='syndication-util', class_='.utils.SyndicationUtil', allowed_interface='Products.CMFPlone.interfaces.syndication.ISyndicationUtil', permission='zope2.View')
browser.page(for_='Products.CMFPlone.interfaces.syndication.ISyndicatable', class_='.views.FeedView', name='atom.xml', permission='zope2.View', template='templates/atom.xml.pt')
browser.page(for_='Products.CMFPlone.interfaces.syndication.ISyndicatable', class_='.views.FeedView', name='rss.xml', permission='zope2.View', template='templates/rss.xml.pt')
browser.page(for_='Products.CMFPlone.interfaces.syndication.ISyndicatable', class_='.views.FeedView', name='RSS', permission='zope2.View', template='templates/RSS.pt')
browser.page(for_='Products.CMFPlone.interfaces.syndication.ISyndicatable', class_='.views.FeedView', name='itunes.xml', permission='zope2.View', template='templates/itunes.xml.pt')
browser.page(for_='*', class_='.views.SearchFeedView', name='search_rss', permission='zope2.View', template='templates/search-rss.pt')
zope.utility(factory='.tool.SyndicationTool', provides='Products.CMFCore.interfaces.ISyndicationTool')
# ----------------------------------------------------
# Products/CMFPlone/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
with genericsetup.importStep__cm(name='content', title='Content', description="Import the site's structure and content.", handler='Products.CMFCore.exportimport.content.importSiteStructure'):
zope.depends(name='typeinfo')
with genericsetup.importStep__cm(name='cssregistry', title='Stylesheet registry', description='Import stylesheet registry', handler='Products.ResourceRegistries.exportimport.cssregistry.importCSSRegistry'):
zope.depends(name='skins')
zope.depends(name='toolset')
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='jsregistry', title='Javascript registry', description='Import javascript registry', handler='Products.ResourceRegistries.exportimport.jsregistry.importJSRegistry'):
zope.depends(name='skins')
zope.depends(name='toolset')
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='viewlets', title='Viewlet Settings', description='Import viewlet settings', handler='plone.app.viewletmanager.exportimport.storage.importViewletSettingsStorage'):
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='controlpanel', handler='Products.CMFPlone.exportimport.controlpanel.importControlPanel', title='Control Panel', description='Import Plone control panel actions.'):
zope.depends(name='actions')
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='factorytool', handler='Products.CMFPlone.exportimport.factorytool.importFactoryTool', title='Portal Factory Tool', description='Import type registration for the portal factory tool.'):
zope.depends(name='componentregistry')
zope.depends(name='typeinfo')
with genericsetup.importStep__cm(name='memberdata-properties', handler='Products.CMFPlone.exportimport.memberdata_properties.importMemberDataProperties', title='MemberData Properties', description='Import MemberData properties.'):
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='plone-content', handler='Products.CMFPlone.setuphandlers.importContent', title='Plone Content Import', description='Plone content import.'):
zope.depends(name='plone-final')
with genericsetup.importStep__cm(name='plone-final', handler='Products.CMFPlone.setuphandlers.importFinalSteps', title='Final Plone Config', description='Final Plone configuration.'):
zope.depends(name='portlets')
zope.depends(name='rolemap')
zope.depends(name='tinymce_settings')
zope.depends(name='cssregistry')
zope.depends(name='jsregistry')
zope.depends(name='viewlets')
zope.depends(name='controlpanel')
zope.depends(name='propertiestool')
with genericsetup.importStep__cm(name='propertiestool', handler='Products.CMFPlone.exportimport.propertiestool.importPloneProperties', title='Plone Properties', description='Import plone properties tool and subobjects.'):
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='update-workflow-rolemap', title='Update workflow role mappings', description="Update workflow role map after workflow changes in an extension profile. This is only necessary if the 'structure' step has imported content.", handler='Products.CMFPlone.setuphandlers.updateWorkflowRoleMappings'):
zope.depends(name='workflow')
genericsetup.importStep(name='plone-difftool', handler='Products.CMFDiffTool.exportimport.difftool.importDiffTool', title='Diff Tool', description='Import CMFDiffTool settings')
genericsetup.exportStep(name='content', title='Content', description="Export the site's structure and content.", handler='Products.CMFCore.exportimport.content.exportSiteStructure')
genericsetup.exportStep(name='controlpanel', title='Control Panel', description='Export Plone control panel actions.', handler='Products.CMFPlone.exportimport.controlpanel.exportControlPanel')
genericsetup.exportStep(name='cssregistry', title='Stylesheet registry', description='Export stylesheet registry', handler='Products.ResourceRegistries.exportimport.cssregistry.exportCSSRegistry')
genericsetup.exportStep(name='factorytool', title='Portal Factory Tool', description='Export type registration for the portal factory tool.', handler='Products.CMFPlone.exportimport.factorytool.exportFactoryTool')
genericsetup.exportStep(name='jsregistry', title='Javascript registry', description='Export javascript registry', handler='Products.ResourceRegistries.exportimport.jsregistry.exportJSRegistry')
genericsetup.exportStep(name='memberdata-properties', title='MemberData properties', description='Export MemberData properties', handler='Products.CMFPlone.exportimport.memberdata_properties.exportMemberDataProperties')
genericsetup.exportStep(name='propertiestool', title='Plone Properties', description='Export plone properties tool and subobjects.', handler='Products.CMFPlone.exportimport.propertiestool.exportPloneProperties')
genericsetup.exportStep(name='viewlets', title='Viewlet Settings', description='Export viewlet settings', handler='plone.app.viewletmanager.exportimport.storage.exportViewletSettingsStorage')
zope.adapter(factory='.factorytool.PortalFactoryXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFPlone.interfaces.IFactoryTool Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.propertiestool.PlonePropertiesToolXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFPlone.interfaces.IPropertiesTool Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.propertiestool.SimpleItemWithPropertiesXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFPlone.interfaces.ISimpleItemWithProperties Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='Products.CMFCore.exportimport.content.StructureFolderWalkingAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.CMFCore.interfaces.ISiteRoot')
if config.eval_condition('not-installed Products.CMFCore.exportimport.memberdata'):
zope.adapter(factory='.propertiestool.SimpleItemWithPropertiesXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFCore.interfaces.IMemberDataTool Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.controlpanel.ControlPanelXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.CMFPlone.interfaces.IControlPanel Products.GenericSetup.interfaces.ISetupEnviron')
# ----------------------------------------------------
# Products/CMFPlone/deprecated.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
# The following declarations are deprecated and will be removed in
# Plone 4.0.
five.deprecatedManageAddDelete(class_='.Portal.PloneSite')
five.deprecatedManageAddDelete(class_='.PloneFolder.PloneFolder')
five.deprecatedManageAddDelete(class_='.CatalogTool.CatalogTool')
if config.eval_condition('installed Products.kupu'):
five.deprecatedManageAddDelete(class_='Products.kupu.plone.plonelibrarytool.PloneKupuLibraryTool')
# ----------------------------------------------------
# Products/CMFPlone/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='plone', title='Plone Site', directory='profiles/default', description='Profile for a default Plone.', for_='Products.CMFPlone.interfaces.IPloneSiteRoot')
genericsetup.registerProfile(name='dependencies', title='Mandatory dependencies for a Plone site', directory='profiles/dependencies', description='Load all profiles from other packages/products that are needed for a full Plone site.', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='plone-content', title='Plone Initial Content', directory='profiles/content', description='Extension profile to configure initial content', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='testfixture', title='Plone Test Fixture', directory='profiles/testfixture', description='Extension profile to configure a test fixture', for_='Products.CMFPlone.interfaces.ITestCasePloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/CMFPlone/catalog.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone'):
# Register the default indexable object wrapper
zope.adapter(for_='Products.CMFCore.interfaces.ICatalogAware Products.CMFPlone.interfaces.IPloneCatalogTool', factory='plone.indexer.wrapper.IndexableObjectWrapper', provides='plone.indexer.interfaces.IIndexableObject')
# Register the default indexers
zope.adapter(factory='.CatalogTool.allowedRolesAndUsers', name='allowedRolesAndUsers')
zope.adapter(factory='.CatalogTool.object_provides', name='object_provides')
zope.adapter(factory='.CatalogTool.sortable_title', name='sortable_title')
zope.adapter(factory='.CatalogTool.getObjPositionInParent', name='getObjPositionInParent')
zope.adapter(factory='.CatalogTool.getObjSize', name='getObjSize')
zope.adapter(factory='.CatalogTool.is_folderish', name='is_folderish')
zope.adapter(factory='.CatalogTool.is_default_page', name='is_default_page')
zope.adapter(factory='.CatalogTool.getIcon', name='getIcon')
zope.adapter(factory='.CatalogTool.location', name='location')
# ----------------------------------------------------
# archetypes/kss/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
kss = config.get_namespace('http://namespaces.zope.org/kss')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Include command macro definitions
zope.include(package='.commands')
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', attribute='kssValidateField', class_='.validation.ValidationView', name='kssValidateField', permission='cmf.ModifyPortalContent')
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', attribute='kssValidateForm', class_='.validation.ValidationView', name='kssValidateForm', permission='cmf.ModifyPortalContent')
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', class_='.fields.FieldsView', name='replaceField', attribute='replaceField', permission='zope.Public')
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', class_='.fields.FieldsView', name='replaceWithView', attribute='replaceWithView', permission='zope.Public')
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', class_='.fields.FieldsView', name='saveField', attribute='saveField', permission='cmf.ModifyPortalContent')
browser.page(for_='Products.ATContentTypes.interface.IATDocument', class_='.fields.ATDocumentFieldsView', name='replaceField', attribute='replaceField', permission='zope.Public')
browser.page(for_='Products.ATContentTypes.interface.IATDocument', class_='.fields.ATDocumentFieldsView', name='replaceWithView', attribute='replaceWithView', permission='zope.Public')
browser.page(for_='Products.ATContentTypes.interface.IATDocument', class_='.fields.ATDocumentFieldsView', name='saveField', attribute='saveField', permission='cmf.ModifyPortalContent')
zope.adapter(for_='Products.Archetypes.interfaces.IBaseObject zope.publisher.interfaces.http.IHTTPRequest', provides='archetypes.kss.interfaces.IInlineEditingEnabled', factory='.fields.InlineEditingEnabledView', permission='zope2.View')
# field decorator (non-ajax) views
browser.page(for_='Products.Archetypes.interfaces.IBaseObject', name='kss_field_decorator_view', permission='zope2.View', class_='.fields.ATFieldDecoratorView', allowed_attributes='getKssUIDClass getKssClassesInlineEditable getKssClasses')
# event listener for versioning of inline edit
zope.subscriber(handler='.fields_versioning.versionObjectBecauseFieldChanged')
# ----------------------------------------------------
# archetypes/kss/commands/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
kss = config.get_namespace('http://namespaces.zope.org/kss')
kss.commandset(name='atvalidation', for_='plone.app.kss.interfaces.IPloneKSSView', provides='.interfaces.IValidationCommands', class_='.validation.ValidationCommands')
# ----------------------------------------------------
# plone/alterego/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.configure(i18n_domain='plone.alterego')
# ----------------------------------------------------
# plone/behavior/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.behavior'):
zope.utility(component='.vocab.BehaviorsVocabularyFactory', name='Behaviors')
# ----------------------------------------------------
# plone/cachepurging/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.cachepurging'):
zope.include(package='zope.annotation')
zope.include(package='five.globalrequest')
zope.include(package='plone.registry')
# Default rewriter and purge urls
zope.adapter(factory='.rewrite.DefaultRewriter')
zope.adapter(factory='.paths.TraversablePurgePaths', name='default')
# Publisher event hooks
zope.subscriber(handler='.hooks.queuePurge')
zope.subscriber(handler='.hooks.purge')
# Purge queue
zope.utility(component='.purger.DEFAULT_PURGER')
# Make sure we can annotate the request
with zope.class__cm(class_='ZPublisher.BaseRequest.BaseRequest'):
zope.implements(interface='zope.annotation.interfaces.IAttributeAnnotatable')
# Views to explicitly purge the context
zope.permission(id='plone.cachepurging.InitiatePurge', title='plone.cachepurging: Manually purge objects')
browser.view(for_='*', name='plone.cachepurging.purge', class_='.browser.PurgeImmediately', permission='plone.cachepurging.InitiatePurge')
browser.view(for_='*', name='plone.cachepurging.queue', class_='.browser.QueuePurge', permission='plone.cachepurging.InitiatePurge')
# ----------------------------------------------------
# plone/caching/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.caching'):
zope.include(package='five.globalrequest')
zope.include(package='z3c.caching', file='meta.zcml')
zope.include(package='z3c.caching')
zope.include(package='plone.registry')
zope.include(package='plone.transformchain')
# Default lookup
zope.adapter(factory='.lookup.DefaultRulesetLookup')
# The 'Chain' operation
zope.adapter(factory='.operations.Chain', name='plone.caching.operations.chain')
zope.utility(component='.operations.Chain', name='plone.caching.operations.chain')
# Intercepts are performed by raising an exception prior to view
# invocation. There is a view on this exception which renders the
# intercepted response.
#
zope.subscriber(handler='.hooks.intercept')
browser.page(name='index.html', for_='.hooks.Intercepted', class_='.hooks.InterceptorResponse', permission='zope2.Public')
# Mutator: plone.transformchain order 12000
zope.adapter(factory='.hooks.MutatorTransform', name='plone.caching.mutator')
# Mutator for streaming responses
zope.subscriber(handler='.hooks.modifyStreamingResponse')
# ----------------------------------------------------
# z3c/caching/meta.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
meta = config.get_namespace('http://namespaces.zope.org/meta')
with meta.directives__cm(namespace='http://namespaces.zope.org/cache'):
meta.directive(name='rulesetType', schema='.interfaces.IRulesetType', handler='.zcml.rulesetType')
meta.directive(name='ruleset', schema='.zcml.IRuleset', handler='.zcml.ruleset')
# ----------------------------------------------------
# z3c/caching/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='z3c.caching'):
zope.adapter(factory='.registry.RulesetRegistry')
zope.adapter(factory='.lastmodified.viewDelegateLastModified')
zope.subscriber(handler='.purge.purgeOnModified')
zope.subscriber(handler='.purge.purgeOnMovedOrRemoved')
# ----------------------------------------------------
# plone/transformchain/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.transformchain'):
# For Zope 2.10, we need to backport the relevant events
if config.eval_condition('installed ZPublisherEventsBackport'):
zope.include(package='ZPublisherEventsBackport')
# Default transformation utility which delegates to ITransform adapters
zope.utility(factory='.transformer.Transformer')
# Hooks for ZPublisher
zope.subscriber(handler='.zpublisher.applyTransformOnSuccess')
zope.subscriber(handler='.zpublisher.applyTransformOnFailure')
# ----------------------------------------------------
# plone/dexterity/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='plone.dexterity'):
i18n.registerTranslations(directory='locales')
zope.include(package='Products.CMFCore')
zope.include(package='plone.behavior')
zope.include(package='plone.folder')
zope.include(package='plone.supermodel')
zope.include(package='plone.rfc822')
zope.include(package='plone.uuid')
zope.include(package='plone.z3cform')
zope.include(package='.browser')
zope.include(package='.fti')
# Re-index content when it's modified
zope.subscriber(for_='.interfaces.IDexterityContent zope.lifecycleevent.interfaces.IObjectModifiedEvent', handler='.content.reindexOnModify')
# Support for dynamic schemata
zope.utility(factory='.schema.DexteritySchemaPolicy', name='dexterity')
zope.utility(factory='.schema.SchemaModuleFactory', name='plone.dexterity.schema.generated')
# Schema cache
zope.subscriber(handler='.schema.invalidate_schema')
# Support for plone.behavior behaviors
zope.adapter(factory='.behavior.DexterityBehaviorAssignable')
# Register the content classes
five.registerClass(class_='.content.Item', meta_type='Dexterity Item', permission='cmf.AddPortalContent', icon='plone.dexterity.item.gif')
zope.class_(class_='.content.Item')
five.registerClass(class_='.content.Container', meta_type='Dexterity Container', permission='cmf.AddPortalContent', icon='plone.dexterity.item.gif')
zope.class_(class_='.content.Container')
# Register FTI class
five.registerClass(class_='.fti.DexterityFTI', meta_type='Dexterity FTI', addview='plone.dexterity.fti', permission='cmf.ManagePortal', icon='plone.dexterity.fti.gif', global_='False')
# Register FTI add/remove/modify handlers
zope.subscriber(for_='.interfaces.IDexterityFTI zope.container.interfaces.IObjectAddedEvent', handler='.fti.ftiAdded')
zope.subscriber(for_='.interfaces.IDexterityFTI zope.container.interfaces.IObjectRemovedEvent', handler='.fti.ftiRemoved')
zope.subscriber(for_='.interfaces.IDexterityFTI zope.container.interfaces.IObjectMovedEvent', handler='.fti.ftiRenamed')
zope.subscriber(for_='.interfaces.IDexterityFTI zope.lifecycleevent.interfaces.IObjectModifiedEvent', handler='.fti.ftiModified')
# File representation (FTP/WebDAV support)
zope.adapter(factory='.filerepresentation.DefaultDirectoryFactory')
zope.adapter(factory='.filerepresentation.DefaultFileFactory')
zope.adapter(provides='zope.filerepresentation.interfaces.IRawReadFile', factory='.filerepresentation.DefaultReadFile')
zope.adapter(factory='.filerepresentation.DefaultWriteFile')
# PrimaryFieldInfo
zope.adapter(factory='.primary.PrimaryFieldInfo')
# ----------------------------------------------------
# plone/rfc822/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.rfc822'):
# Standard IFromUnicode marshaler
zope.adapter(factory='.defaultfields.UnicodeFieldMarshaler')
# Text, TextLine, Password, SourceText may be ASCII safe
zope.adapter(for_='* zope.schema.interfaces.IText', factory='.defaultfields.UnicodeValueFieldMarshaler')
# Bool and Choice omit to declare that they supports IFromUnicode in zope.schema 3.3
zope.adapter(for_='* zope.schema.interfaces.IBool', factory='.defaultfields.ASCIISafeFieldMarshaler')
zope.adapter(for_='* zope.schema.interfaces.IChoice', factory='.defaultfields.UnicodeValueFieldMarshaler')
# Int and Float are ASCII safe
zope.adapter(for_='* zope.schema.interfaces.IInt', factory='.defaultfields.ASCIISafeFieldMarshaler')
zope.adapter(for_='* zope.schema.interfaces.IFloat', factory='.defaultfields.ASCIISafeFieldMarshaler')
# Somehow this is necessary because these are in _bootstrapfields
zope.adapter(for_='* zope.schema.Text', factory='.defaultfields.UnicodeValueFieldMarshaler')
zope.adapter(for_='* zope.schema.TextLine', factory='.defaultfields.UnicodeValueFieldMarshaler')
zope.adapter(for_='* zope.schema.Password', factory='.defaultfields.UnicodeValueFieldMarshaler')
zope.adapter(for_='* zope.schema.Int', factory='.defaultfields.ASCIISafeFieldMarshaler')
zope.adapter(factory='.defaultfields.BytesFieldMarshaler')
zope.adapter(factory='.defaultfields.DatetimeMarshaler')
zope.adapter(factory='.defaultfields.DateMarshaler')
zope.adapter(factory='.defaultfields.TimedeltaMarshaler')
zope.adapter(factory='.defaultfields.CollectionMarshaler')
# Configure plone.supermodel handler if available
if config.eval_condition('installed plone.supermodel'):
zope.utility(factory='.supermodel.PrimaryFieldMetadataHandler', name='plone.rfc822.marshal')
# ----------------------------------------------------
# plone/dexterity/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.dexterity'):
# Standard view
browser.page(for_='..interfaces.IDexterityContent', name='view', class_='.view.DefaultView', template='item.pt', permission='zope2.View')
# Content core views
browser.page(for_='..interfaces.IDexterityItem', name='content-core', class_='.view.DefaultView', template='itemcontentcore.pt', permission='zope2.View')
browser.page(for_='..interfaces.IDexterityContainer', name='content-core', class_='.view.DefaultView', template='containercontentcore.pt', permission='zope2.View')
# Standard IPublishTraverse adapter
zope.adapter(factory='.traversal.DexterityPublishTraverse')
# Standard add view and form - invoked from ++add++ traverser
zope.adapter(for_='Products.CMFCore.interfaces.IFolderish Products.CMFDefault.interfaces.ICMFDefaultSkin ..interfaces.IDexterityFTI', provides='zope.publisher.interfaces.browser.IBrowserPage', factory='.add.DefaultAddView')
with zope.class__cm(class_='.add.DefaultAddView'):
zope.require(permission='cmf.AddPortalContent', interface='zope.publisher.interfaces.browser.IBrowserPage')
# Standard edit view
browser.page(for_='..interfaces.IDexterityContent', name='edit', class_='.edit.DefaultEditView', permission='cmf.ModifyPortalContent')
# FTI add form
browser.page(for_='zope.browser.interfaces.IAdding', name='plone.dexterity.fti', template='fti.pt', class_='.fti.FTIAddView', permission='cmf.ManagePortal')
# Resources for icons
browser.resource(name='plone.dexterity.item.gif', file='icons/item_icon.gif')
browser.resource(name='plone.dexterity.container.gif', file='icons/container_icon.gif')
browser.resource(name='plone.dexterity.fti.gif', file='icons/typeinfo.gif')
# ----------------------------------------------------
# plone/namedfile/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.namedfile'):
browser.page(name='download', for_='*', class_='.browser.Download', permission='zope2.View')
browser.page(name='display-file', for_='*', class_='.browser.DisplayFile', permission='zope2.View')
zope.include(file='z3c-blobfile.zcml')
if config.eval_condition('installed plone.supermodel'):
zope.include(file='handler.zcml')
if config.eval_condition('installed plone.rfc822'):
zope.include(file='marshaler.zcml')
if config.eval_condition('installed plone.schemaeditor'):
zope.include(file='editor.zcml')
if config.eval_condition('installed plone.scale'):
zope.include(file='scaling.zcml')
# ----------------------------------------------------
# plone/namedfile/z3c-blobfile.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='zope'):
zope.utility(name='__builtin__.str', provides='.interfaces.IStorage', factory='.storages.StringStorable')
zope.utility(name='__builtin__.unicode', provides='.interfaces.IStorage', factory='.storages.UnicodeStorable')
zope.utility(name='plone.namedfile.file.FileChunk', provides='.interfaces.IStorage', factory='.storages.FileChunkStorable')
zope.utility(name='__builtin__.file', provides='.interfaces.IStorage', factory='.storages.FileDescriptorStorable')
zope.utility(name='zope.publisher.browser.FileUpload', provides='.interfaces.IStorage', factory='.storages.FileUploadStorable')
zope.adapter(factory='.copy.BlobFileCopyHook')
# ----------------------------------------------------
# plone/namedfile/handler.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.namedfile'):
zope.include(package='plone.supermodel')
# plone.supermodel configuration
zope.utility(component='.handler.NamedFileHandler', name='plone.namedfile.field.NamedFile')
zope.utility(component='.handler.NamedImageHandler', name='plone.namedfile.field.NamedImage')
zope.utility(component='.handler.NamedBlobFileHandler', name='plone.namedfile.field.NamedBlobFile')
zope.utility(component='.handler.NamedBlobImageHandler', name='plone.namedfile.field.NamedBlobImage')
# ----------------------------------------------------
# plone/namedfile/marshaler.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.namedfile'):
zope.adapter(factory='.marshaler.NamedFileFieldMarshaler')
zope.adapter(factory='.marshaler.NamedImageFieldMarshaler')
zope.adapter(factory='.marshaler.NamedBlobFileFieldMarshaler')
zope.adapter(factory='.marshaler.NamedBlobImageFieldMarshaler')
# ----------------------------------------------------
# plone/namedfile/editor.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.class__cm(class_='.field.NamedBlobFile'):
zope.implements(interface='.editor.INamedBlobFileField')
zope.utility(name='plone.namedfile.field.NamedBlobFile', component='.editor.NamedBlobFileFactory')
with zope.class__cm(class_='.field.NamedBlobImage'):
zope.implements(interface='.editor.INamedBlobImageField')
zope.utility(name='plone.namedfile.field.NamedBlobImage', component='.editor.NamedBlobImageFactory')
# ----------------------------------------------------
# plone/namedfile/scaling.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='zope.annotation')
browser.page(name='images', for_='.interfaces.IImageScaleTraversable', class_='.scaling.ImageScaling', allowed_attributes='scale', permission='zope2.View')
# ----------------------------------------------------
# plone/openid/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
five.registerPackage(package='.', initialize='.initialize')
zope.include(package='plone.session')
# ----------------------------------------------------
# plone/outputfilters/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.outputfilters'):
zope.include(package='.browser')
zope.include(package='.filters')
gs.registerProfile(name='default', title='HTML Output Filters', directory='profiles/default', description='Framework for applying filters to HTML as it is rendered.', provides='Products.GenericSetup.interfaces.EXTENSION')
with gs.importStep__cm(name='plone_outputfilters_various', title='HTML Output Filters installation', description='Import various plone.outputfilters', handler='plone.outputfilters.setuphandlers.importVarious'):
zope.depends(name='componentregistry')
# ----------------------------------------------------
# plone/outputfilters/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(name='plone.outputfilters_captioned_image', for_='*', class_='.captioned_image.CaptionedImageView', template='captioned_image.pt', permission='zope.Public')
browser.page(name='resolveuid', for_='*', class_='.resolveuid.ResolveUIDView', permission='zope.Public')
# ----------------------------------------------------
# plone/outputfilters/filters/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.adapter(provides='..interfaces.IFilter', name='resolveuid_and_caption', for_='* *', factory='.resolveuid_and_caption.ResolveUIDAndCaptionFilter')
# ----------------------------------------------------
# plone/resource/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone'):
zope.include(file='meta.zcml')
zope.include(file='permissions.zcml')
zope.include(file='browser.zcml')
zope.include(file='profiles.zcml')
zope.include(file='caching.zcml')
zope.include(file='file.zcml')
# ----------------------------------------------------
# plone/resource/permissions.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone'):
zope.permission(id='plone.resource.ExportZip', title='plone.resource: Export ZIP file')
# ----------------------------------------------------
# plone/resource/browser.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
browser.view(name='download-zip', for_='.interfaces.IResourceDirectory', permission='plone.resource.ExportZip', class_='.download.DownloadView')
# Unique traverser
zope.adapter(name='unique', for_='.interfaces.IResourceDirectory zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='.traversal.UniqueResourceTraverser')
# ----------------------------------------------------
# plone/resource/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
gs.registerProfile(name='default', directory='profiles/default', title='Static resource storage', description='A folder for storing and serving static resource files', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plone/resource/caching.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
cache = config.get_namespace('http://namespaces.zope.org/cache')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='z3c.caching')
zope.include(package='z3c.caching', file='meta.zcml')
cache.ruleset(for_='.file.FilesystemFile', ruleset='plone.resource')
# Unique resource ruleset lookup
zope.adapter(factory='.caching.UniqueResourceLookup')
# ----------------------------------------------------
# plone/resource/file.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.file.rawReadFile')
zope.adapter(factory='.file.FileLastModified')
# ----------------------------------------------------
# plone/resourceeditor/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='plone.resource')
zope.permission(id='plone.resourceeditor.ManageSources', title='plone.resourceeditor: Manage Sources')
browser.resourceDirectory(name='plone.resourceeditor', directory='resources')
browser.page(name='plone.resourceeditor.filemanager', for_='plone.resource.interfaces.IResourceDirectory', class_='.browser.FileManager', template='editor.pt', permission='plone.resourceeditor.ManageSources')
browser.page(name='plone.resourceeditor.getfile', for_='plone.resource.interfaces.IResourceDirectory', class_='.browser.FileManager', attribute='getFile', permission='plone.resourceeditor.ManageSources')
browser.page(name='plone.resourceeditor.savefile', for_='plone.resource.interfaces.IResourceDirectory', class_='.browser.FileManager', attribute='saveFile', permission='plone.resourceeditor.ManageSources')
browser.page(name='plone.resourceeditor.filetree', for_='plone.resource.interfaces.IResourceDirectory', class_='.browser.FileManager', attribute='filetree', permission='plone.resourceeditor.ManageSources')
# ----------------------------------------------------
# plone/schemaeditor/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='plone.schemaeditor'):
zope.include(package='plone.z3cform')
i18n.registerTranslations(directory='locales')
zope.include(file='schema.zcml')
zope.permission(id='plone.schemaeditor.ManageSchemata', title='Manage schemata')
# adapter for adding/removing fields on schemata
zope.adapter(factory='.utils.EditableSchema')
zope.include(file='fields.zcml')
zope.include(package='.browser')
# ----------------------------------------------------
# plone/schemaeditor/schema.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.class__cm(class_='zope.schema.Bool'):
zope.implements(interface='.schema.IBool')
with zope.class__cm(class_='zope.schema.Float'):
zope.implements(interface='.schema.IFloat')
with zope.class__cm(class_='zope.schema.Datetime'):
zope.implements(interface='.schema.IDatetime')
with zope.class__cm(class_='zope.schema.Date'):
zope.implements(interface='.schema.IDate')
with zope.class__cm(class_='zope.schema.Choice'):
zope.implements(interface='.schema.IChoice')
zope.adapter(factory='z3c.form.browser.textlines.TextLinesFieldWidgetFactory', for_='.schema.ITextLinesField zope.schema.interfaces.ITextLine z3c.form.interfaces.IFormLayer')
# ----------------------------------------------------
# plone/schemaeditor/fields.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.schemaeditor'):
zope.adapter(factory='.fields.getFirstFieldSchema')
zope.utility(component='.fields.FieldsVocabularyFactory', provides='zope.schema.interfaces.IVocabularyFactory', name='Fields')
zope.utility(name='zope.schema._bootstrapfields.TextLine', component='.fields.TextLineFactory')
zope.utility(name='zope.schema._bootstrapfields.Text', component='.fields.TextFactory')
zope.utility(name='zope.schema._bootstrapfields.Int', component='.fields.IntFactory')
zope.utility(name='zope.schema._field.Float', component='.fields.FloatFactory')
zope.utility(name='zope.schema._bootstrapfields.Bool', component='.fields.BoolFactory')
zope.utility(name='zope.schema._bootstrapfields.Password', component='.fields.PasswordFactory')
zope.utility(name='zope.schema._field.Datetime', component='.fields.DatetimeFactory')
zope.utility(name='zope.schema._field.Date', component='.fields.DateFactory')
zope.adapter(factory='.fields.getChoiceFieldSchema')
zope.utility(name='zope.schema._field.Choice', component='.fields.ChoiceFactory')
zope.adapter(factory='.fields.TextLineChoiceField')
zope.adapter(factory='.fields.VocabularyValuesValidator')
zope.adapter(factory='.fields.getMultiChoiceFieldSchema')
zope.utility(name='zope.schema._field.Set', component='.fields.MultiChoiceFactory')
zope.adapter(factory='.fields.TextLineMultiChoiceField')
zope.subscriber(handler='.fields.setBoolWidget')
# ----------------------------------------------------
# plone/schemaeditor/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.schemaeditor'):
zope.include(package='.field')
zope.include(package='.schema')
# ----------------------------------------------------
# plone/schemaeditor/browser/field/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.dexterity'):
browser.page(name='edit', for_='...interfaces.IFieldContext', class_='.edit.EditView', permission='plone.schemaeditor.ManageSchemata')
zope.adapter(factory='.edit.FieldTitleAdapter')
browser.page(name='order', for_='...interfaces.IFieldContext', class_='.order.FieldOrderView', attribute='move', permission='plone.schemaeditor.ManageSchemata')
browser.page(name='delete', for_='...interfaces.IFieldContext', class_='.order.FieldOrderView', attribute='delete', permission='plone.schemaeditor.ManageSchemata')
# ----------------------------------------------------
# plone/schemaeditor/browser/schema/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.schemaeditor'):
browser.page(name='edit', for_='plone.schemaeditor.interfaces.ISchemaContext', class_='.listing.SchemaListingPage', permission='plone.schemaeditor.ManageSchemata')
browser.page(name='add-field', for_='plone.schemaeditor.interfaces.ISchemaContext', class_='.add_field.FieldAddFormPage', permission='plone.schemaeditor.ManageSchemata')
browser.resource(name='schemaeditor.js', file='schemaeditor.js')
# ----------------------------------------------------
# plone/stringinterp/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='stringinterp_info', class_='.browser.SubstitutionInfo', allowed_interface='.interfaces.IStringSubstitutionInfo', permission='zope.Public')
zope.adapter(for_='zope.interface.Interface', provides='plone.stringinterp.interfaces.IStringInterpolator', factory='.dollarReplace.Interpolator')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.UrlSubstitution', name='absolute_url')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.UrlSubstitution', name='url')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ParentUrlSubstitution', name='parent_url')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.IdSubstitution', name='id')
zope.adapter(for_='Products.CMFCore.interfaces.IMinimalDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.TitleSubstitution', name='title')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ParentTitleSubstitution', name='parent_title')
zope.adapter(for_='Products.CMFCore.interfaces.IMinimalDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.DescriptionSubstitution', name='description')
zope.adapter(for_='Products.CMFCore.interfaces.IMinimalDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.TypeSubstitution', name='type')
zope.adapter(for_='Products.CMFCore.interfaces.IWorkflowAware', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ReviewStateSubstitution', name='review_state')
zope.adapter(for_='Products.CMFCore.interfaces.IWorkflowAware', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ReviewStateTitleSubstitution', name='review_state_title')
zope.adapter(for_='Products.CMFCore.interfaces.ICatalogableDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.CreatedSubstitution', name='created')
zope.adapter(for_='Products.CMFCore.interfaces.ICatalogableDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.EffectiveSubstitution', name='effective')
zope.adapter(for_='Products.CMFCore.interfaces.ICatalogableDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ExpiresSubstitution', name='expires')
zope.adapter(for_='Products.CMFCore.interfaces.ICatalogableDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ModifiedSubstitution', name='modified')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.CreatorsSubstitution', name='creators')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ContributorsSubstitution', name='contributors')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.SubjectSubstitution', name='subject')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.SubjectSubstitution', name='keywords')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.FormatSubstitution', name='format')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.LanguageSubstitution', name='language')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.RightsSubstitution', name='rights')
zope.adapter(for_='Products.CMFCore.interfaces.IDublinCore', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.IdentifierSubstitution', name='identifier')
zope.adapter(for_='AccessControl.interfaces.IRoleManager', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.OwnerEmailSubstitution', name='owner_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ReviewerEmailSubstitution', name='reviewer_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ReaderEmailSubstitution', name='reader_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.EditorEmailSubstitution', name='editor_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ContributorEmailSubstitution', name='contributor_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.ManagerEmailSubstitution', name='manager_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.MemberEmailSubstitution', name='member_emails')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.UserEmailSubstitution', name='user_email')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.UserFullNameSubstitution', name='user_fullname')
zope.adapter(for_='*', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.UserIdSubstitution', name='user_id')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.LastChangeCommentSubstitution', name='change_comment')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.LastChangeTitleSubstitution', name='change_title')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.LastChangeTypeSubstitution', name='change_type')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='plone.stringinterp.interfaces.IStringSubstitution', factory='.adapters.LastChangeActorIdSubstitution', name='change_authorid')
# ----------------------------------------------------
# plone/subrequest/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='five.globalrequest')
# ----------------------------------------------------
# plone/app/caching/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.app.caching'):
zope.include(package='z3c.zcmlhook', file='meta.zcml')
zope.include(package='plone.caching')
zope.include(package='plone.cachepurging')
zope.include(package='plone.app.registry')
zope.include(package='plone.memoize')
zope.include(package='plone.protect')
zope.include(package='.browser')
zope.include(package='.operations')
genericsetup.registerProfile(name='default', title='HTTP caching support', directory='profiles/default', description='Installs plone.app.caching', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.importStep(name='plone.app.caching', title='Plone caching - additional installation steps', description='Imperative configuration for plone.app.caching', handler='.setuphandlers.importVarious')
zcml.customAction(handler='.setuphandlers.enableExplicitMode', order='1000000')
# Default caching configuration
zope.include(file='caching.zcml')
# Lookup for content item views and page template resources
zope.adapter(for_='zope.publisher.interfaces.browser.IBrowserView *', factory='.lookup.ContentItemLookup')
zope.adapter(for_='zope.pagetemplate.interfaces.IPageTemplate *', factory='.lookup.ContentItemLookup')
# Add GZip compression: plone.transformchain order 10000
zope.adapter(factory='.gzip.GZipTransform', name='plone.app.caching.gzip')
# Purging
zope.subscriber(handler='.purge.purgeOnModified')
zope.subscriber(handler='.purge.purgeOnMovedOrRemoved')
# ILastModified adapters
zope.adapter(factory='.lastmodified.PageTemplateDelegateLastModified')
zope.adapter(factory='.lastmodified.FSPageTemplateDelegateLastModified')
zope.adapter(factory='.lastmodified.OFSFileLastModified')
zope.adapter(factory='.lastmodified.ImageScaleLastModified')
zope.adapter(factory='.lastmodified.FSObjectLastModified')
zope.adapter(factory='.lastmodified.CatalogableDublinCoreLastModified')
zope.adapter(factory='.lastmodified.DCTimesLastModified')
zope.adapter(factory='.lastmodified.ResourceLastModified')
zope.adapter(factory='.lastmodified.CookedFileLastModified')
# ----------------------------------------------------
# plone/app/caching/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.caching'):
browser.page(name='caching-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.controlpanel.ControlPanel', template='controlpanel.pt', permission='cmf.ManagePortal')
browser.page(name='caching-controlpanel-import', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.controlpanel.Import', template='import.pt', permission='cmf.ManagePortal')
browser.page(name='caching-controlpanel-purge', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.controlpanel.Purge', template='purge.pt', permission='cmf.ManagePortal')
browser.page(name='caching-controlpanel-ramcache', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.controlpanel.RAMCache', template='ramcache.pt', permission='cmf.ManagePortal')
browser.resource(name='plone.app.caching.gif', image='plone.app.caching.gif')
# ----------------------------------------------------
# plone/app/caching/operations/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.app.caching'):
zope.include(package='plone.caching')
zope.include(package='plone.app.registry')
# Caching operations
# ~~~~~~~~~~~~~~~~~~
zope.adapter(factory='.default.StrongCaching', name='plone.app.caching.strongCaching')
zope.utility(component='.default.StrongCaching', name='plone.app.caching.strongCaching')
zope.adapter(factory='.default.ModerateCaching', name='plone.app.caching.moderateCaching')
zope.utility(component='.default.ModerateCaching', name='plone.app.caching.moderateCaching')
zope.adapter(factory='.default.WeakCaching', name='plone.app.caching.weakCaching')
zope.utility(component='.default.WeakCaching', name='plone.app.caching.weakCaching')
zope.adapter(factory='.default.NoCaching', name='plone.app.caching.noCaching')
zope.utility(component='.default.NoCaching', name='plone.app.caching.noCaching')
# Uncomment to show the "Generic caching" in the UI (also see profiles/default/registry.xml)
# <adapter factory=".default.BaseCaching" name="plone.app.caching.baseCaching" />
# <utility component=".default.BaseCaching" name="plone.app.caching.baseCaching" />
#
# Special handling for content in Plone's ResourceRegistries, if installed
if config.eval_condition('installed Products.ResourceRegistries'):
zope.adapter(factory='.default.ResourceRegistriesCaching', name='plone.app.caching.strongCaching')
# RAM cache storage: a transformation at the very end of the chain
zope.adapter(factory='.ramcache.Store', name='plone.app.caching.operations.ramcache')
# ETag components
zope.adapter(factory='.etags.UserID', name='userid')
zope.adapter(factory='.etags.Roles', name='roles')
zope.adapter(factory='.etags.Language', name='language')
zope.adapter(factory='.etags.UserLanguage', name='userLanguage')
zope.adapter(factory='.etags.GZip', name='gzip')
zope.adapter(factory='.etags.LastModified', name='lastModified')
zope.adapter(factory='.etags.CatalogCounter', name='catalogCounter')
zope.adapter(factory='.etags.ObjectLocked', name='locked')
zope.adapter(factory='.etags.Skin', name='skin')
zope.adapter(factory='.etags.ResourceRegistries', name='resourceRegistries')
zope.adapter(factory='.etags.AnonymousOrRandom', name='anonymousOrRandom')
zope.adapter(factory='.etags.CopyCookie', name='copy')
# ----------------------------------------------------
# plone/app/caching/caching.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
cache = config.get_namespace('http://namespaces.zope.org/cache')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.app.caching'):
# Out-of-the-box cache profiles
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
genericsetup.registerProfile(name='with-caching-proxy', title='With caching proxy', description='Settings useful for setups with a caching proxy such as Squid or Varnish', directory='profiles/with-caching-proxy', provides='Products.GenericSetup.interfaces.EXTENSION', for_='plone.app.caching.interfaces.ICacheProfiles')
genericsetup.registerProfile(name='without-caching-proxy', title='Without caching proxy', description='Settings useful for setups without a caching proxy such as Squid or Varnish', directory='profiles/without-caching-proxy', provides='Products.GenericSetup.interfaces.EXTENSION', for_='plone.app.caching.interfaces.ICacheProfiles')
genericsetup.registerProfile(name='with-caching-proxy-splitviews', title='With caching proxy (and split-view caching)', description='An example profile for a caching proxy setup with split-view caching enabled.', directory='profiles/with-caching-proxy-splitviews', provides='Products.GenericSetup.interfaces.EXTENSION', for_='plone.app.caching.interfaces.ICacheProfiles')
# Default caching ruleset types
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cache.rulesetType(name='plone.resource', title='File and image resources', description='Includes images and files created or customised through the ZMI, those exposed in the portal_skins tool, and images registered in resource directories on the filesystem.')
cache.rulesetType(name='plone.stableResource', title='Stable file and image resources', description="These are resources which can be cached 'forever'. Normally this means that if the object does change, its URL changes too.")
cache.rulesetType(name='plone.content.file', title='Content files and images', description='Includes files and images in content space.')
cache.rulesetType(name='plone.content.itemView', title='Content item view', description='A public-facing view for a content item that is not a folder or container for other items')
cache.rulesetType(name='plone.content.folderView', title='Content folder view', description='A public-facing view for a content item that is a folder or container for other items')
cache.rulesetType(name='plone.content.feed', title='Content feed', description='A dynamic feed, e.g. using RSS or ATOM')
# Default caching ruleset assignments
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# CMF filesystem (skin layer) files and images
if config.eval_condition('installed Products.CMFCore'):
cache.ruleset(ruleset='plone.resource', for_='Products.CMFCore.FSFile.FSFile')
cache.ruleset(ruleset='plone.resource', for_='Products.CMFCore.FSImage.FSImage')
# OFS (in-ZODB) files, images
if config.eval_condition('installed OFS.Image'):
cache.ruleset(ruleset='plone.resource', for_='OFS.Image.File')
# Automatically purge these always
with zope.class__cm(class_='OFS.Image.File'):
zope.implements(interface='z3c.caching.interfaces.IPurgeable')
# Zope resources (including those in resource directories)
cache.ruleset(ruleset='plone.resource', for_='zope.browserresource.interfaces.IResource')
# Resources cooked in ResourceRegistries
if config.eval_condition('installed Products.ResourceRegistries'):
cache.ruleset(ruleset='plone.stableResource', for_='Products.ResourceRegistries.interfaces.ICookedFile')
# Standard Plone (non-blob) file and image content objects
if config.eval_condition('installed Products.ATContentTypes'):
cache.ruleset(ruleset='plone.content.file', for_='Products.ATContentTypes.interfaces.IATFile')
cache.ruleset(ruleset='plone.content.file', for_='Products.ATContentTypes.interfaces.IATImage')
# Standard image content saved in an Archetype field, like ATImage scales
if config.eval_condition('installed Products.Archetypes'):
cache.ruleset(ruleset='plone.content.file', for_='Products.Archetypes.Field.Image')
# Archetypes based folders and non-folderish content items
if config.eval_condition('installed Products.Archetypes'):
# These rely on the ContentItemLookup delegation
cache.ruleset(ruleset='plone.content.itemView', for_='Products.Archetypes.BaseContent.BaseContent')
cache.ruleset(ruleset='plone.content.folderView', for_='Products.Archetypes.BaseFolder.BaseFolder')
# Dexterity based folders and non-folderish content items
if config.eval_condition('installed plone.dexterity'):
# These rely on the ContentItemLookup delegation
cache.ruleset(ruleset='plone.content.itemView', for_='plone.dexterity.interfaces.IDexterityItem')
cache.ruleset(ruleset='plone.content.folderView', for_='plone.dexterity.interfaces.IDexterityContainer')
# plone.namedfile downloadable
if config.eval_condition('installed plone.namedfile'):
# These rely on the ContentItemLookup delegation
cache.ruleset(ruleset='plone.content.file', for_='plone.namedfile.browser.Download')
cache.ruleset(ruleset='plone.stableResource', for_='plone.namedfile.scaling.ImageScale')
# plone.app.blob content
if config.eval_condition('installed plone.app.blob'):
cache.ruleset(ruleset='plone.content.file', for_='plone.app.blob.interfaces.IATBlob')
# Paths to purge
# Standard CMF content
zope.adapter(factory='.purge.ContentPurgePaths', name='plone.content')
# Discussion items
zope.adapter(factory='.purge.DiscussionItemPurgePaths', name='plone.content')
# Archetypes object fields
if config.eval_condition('installed Products.Archetypes'):
zope.adapter(factory='.purge.ObjectFieldPurgePaths', name='plone.atobjectfields')
# ----------------------------------------------------
# plone/app/iterate/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='zope.annotation')
zope.include(package='Products.CMFCore', file='permissions.zcml')
zope.include(package='.subscribers')
zope.include(package='.browser')
# Set up as a Zope product and register an extension profile
five.registerPackage(package='.')
genericsetup.registerProfile(name='plone.app.iterate', title='Working Copy Support (Iterate)', directory='profiles/default', description='Adds working copy support (aka. in-place staging) to Plone.', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='test', title='plone.app.iterate: Test fixture', directory='profiles/test', description='Extension profile to configure a test fixture', for_='Products.CMFPlone.interfaces.ITestCasePloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.upgradeStep(source='*', destination='121', title='Reinstall plone.app.iterate', description='', profile='plone.app.iterate:plone.app.iterate', handler='plone.app.iterate.util.upgrade_by_reinstall')
# Policy and behaviour for basic objects
with zope.class__cm(class_='Products.Archetypes.BaseObject.BaseObject'):
zope.implements(interface='.interfaces.IIterateAware')
zope.adapter(factory='.policy.CheckinCheckoutPolicyAdapter')
zope.adapter(factory='.relation.CheckinCheckoutReferenceAdapter')
zope.adapter(factory='.archiver.ContentArchiver')
zope.adapter(factory='.copier.ContentCopier')
# Checkout folder locators
zope.adapter(factory='.containers.HomeFolderLocator', name='plone.app.iterate.home')
zope.adapter(factory='.containers.ParentFolderLocator', name='plone.app.iterate.parent')
# Handle deletions of working copies
zope.subscriber(for_='.interfaces.IWorkingCopyRelation zope.lifecycleevent.interfaces.IObjectRemovedEvent', handler='.event.handleDeletion')
# ----------------------------------------------------
# plone/app/iterate/subscribers/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# Locking
zope.subscriber(for_='..interfaces.ICheckoutEvent', handler='.locking.handleCheckout')
zope.subscriber(for_='..interfaces.ICheckinEvent', handler='.locking.handleCheckin')
zope.subscriber(for_='..interfaces.ICancelCheckoutEvent', handler='.locking.handleCancelCheckout')
zope.subscriber(for_='..interfaces.IWorkingCopyDeletedEvent', handler='.locking.handleWCDeleted')
# Marker
zope.subscriber(for_='..interfaces.ICheckoutEvent', handler='.marker.handleCheckout')
zope.subscriber(for_='..interfaces.ICheckinEvent', handler='.marker.handleCheckin')
zope.subscriber(for_='..interfaces.ICancelCheckoutEvent', handler='.marker.handleCancelCheckout')
zope.subscriber(for_='..interfaces.IWorkingCopyDeletedEvent', handler='.marker.handleWCDeleted')
# Metadata
zope.subscriber(for_='..interfaces.ICheckoutEvent', handler='.metadata.handleCheckout')
# Versioning
zope.subscriber(for_='..interfaces.IBeforeCheckoutEvent', handler='.versioning.handleBeforeCheckout')
zope.subscriber(for_='..interfaces.IAfterCheckinEvent', handler='.versioning.handleAfterCheckin')
# Workflow
zope.subscriber(for_='..interfaces.ICheckoutEvent', handler='.workflow.handleCheckout')
zope.subscriber(for_='..interfaces.ICheckinEvent', handler='.workflow.handleCheckin')
# ----------------------------------------------------
# plone/app/iterate/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Control view (public)
browser.page(for_='*', name='iterate_control', class_='.control.Control', permission='zope2.View', allowed_attributes='checkin_allowed checkout_allowed cancel_allowed')
# Forms
browser.page(for_='..interfaces.IIterateAware', name='content-checkout', class_='.checkout.Checkout', template='checkout.pt', permission='zope2.View')
browser.page(for_='..interfaces.IIterateAware', name='content-checkin', class_='.checkin.Checkin', template='checkin.pt', permission='cmf.ModifyPortalContent')
browser.page(for_='..interfaces.IIterateAware', name='content-cancel-checkout', class_='.cancel.Cancel', template='cancel.pt', permission='cmf.ModifyPortalContent')
# Information
browser.page(for_='..interfaces.IIterateManagedContent', class_='.diff.DiffView', name='iterate_diff', template='diff.pt', permission='zope2.View')
browser.viewlet(name='plone.app.iterate.baseline_info', manager='plone.app.layout.viewlets.interfaces.IAboveContent', class_='.info.BaselineInfoViewlet', permission='zope2.View', for_='..interfaces.IBaseline', view='plone.app.layout.globals.interfaces.IViewView')
browser.viewlet(name='plone.app.iterate.checkout_info', manager='plone.app.layout.viewlets.interfaces.IAboveContent', class_='.info.CheckoutInfoViewlet', permission='zope2.View', for_='..interfaces.IWorkingCopy', view='plone.app.layout.globals.interfaces.IViewView')
# Resources
browser.resource(name='checkin.png', image='checkin.png')
browser.resource(name='checkout.png', image='checkout.png')
browser.resource(name='cancel-checkout.png', image='cancel.png')
# ----------------------------------------------------
# plone/app/kss/configure.zcml
# ----------------------------------------------------
def includeme(config):
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
kss = config.get_namespace('http://namespaces.zope.org/kss')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
five.registerPackage(package='.', initialize='.initialize')
# kss
zope.include(package='kss.core')
zope.include(package='archetypes.kss')
# Include command macro definitions
zope.include(package='.commands')
zope.include(package='.plugins')
zope.include(package='.exportimport')
# Utilities and site creation view for selenium testing
# (It is safe to include this any time, even in production.
#
if config.eval_condition('installed kss.demo'):
zope.include(package='.demo')
# bind interfaces
with zope.class__cm(class_='Products.CMFCore.PortalContent.PortalContent'):
zope.implements(interface='.interfaces.IPortalObject')
with zope.class__cm(class_='Products.CMFCore.PortalFolder.PortalFolder'):
zope.implements(interface='.interfaces.IPortalObject')
if config.eval_condition('installed Products.Archetypes'):
with zope.class__cm(class_='Products.Archetypes.BaseContent.BaseContent'):
zope.implements(interface='.interfaces.IPortalObject')
with zope.class__cm(class_='Products.Archetypes.BaseFolder.BaseFolder'):
zope.implements(interface='.interfaces.IPortalObject')
# the kukitresponse methods
browser.page(for_='.interfaces.IPortalObject', attribute='replaceByMacro', class_='.macro_replacer.MacroView', name='replaceByMacro', permission='zope2.View')
browser.page(for_='.interfaces.IPortalObject', attribute='replaceInnerByMacro', class_='.macro_replacer.MacroView', name='replaceInnerByMacro', permission='zope2.View')
browser.page(for_='.interfaces.IPortalObject', attribute='replaceContentRegion', class_='.content_replacer.ContentView', name='replaceContentRegion', permission='zope2.View')
browser.page(for_='.interfaces.IPortalObject', attribute='refreshPortlet', class_='.portlet_refresher.PortletView', name='refreshPortlet', permission='zope2.View')
browser.page(for_='.interfaces.IPortalObject', attribute='refreshCalendar', class_='.calendar.CalendarView', name='refreshCalendar', permission='zope2.View')
browser.page(for_='Products.CMFCore.interfaces.IContentish', attribute='save', class_='.kupu.KupuSaveView', name='savekupu', permission='cmf.ModifyPortalContent')
browser.page(for_='Products.CMFCore.interfaces.IContentish', attribute='contentMenuRefresh', class_='.refresh_content_menu.ContentMenuView', name='contentmenurefresh', permission='zope2.View')
# deprecate this
browser.page(for_='.interfaces.IPortalObject', attribute='replaceMacro', class_='.macro_replacer.MacroView', name='replaceMacro', permission='zope2.View')
browser.page(for_='Products.CMFDynamicViewFTI.interface.ISelectableBrowserDefault', attribute='changeViewTemplate', class_='.content_replacer.ContentMenuView', name='changeViewTemplate', permission='cmf.ModifyPortalContent')
browser.page(for_='.interfaces.IPortalObject', attribute='cutObject', class_='.content_replacer.ContentMenuView', name='cutObject', permission='zope2.CopyOrMove')
browser.page(for_='.interfaces.IPortalObject', attribute='copyObject', class_='.content_replacer.ContentMenuView', name='copyObject', permission='zope2.CopyOrMove')
browser.page(for_='.interfaces.IPortalObject', attribute='changeWorkflowState', class_='.content_replacer.ContentMenuView', name='changeWorkflowState', permission='zope2.View')
# proper base url in header
browser.viewlet(name='plone.htmlhead.kss-base-url', manager='plone.app.layout.viewlets.interfaces.IHtmlHead', class_='.headerviewlet.KSSBaseUrlViewlet', permission='zope2.View')
# stylesheet registration
# reload parts of page event hookup
zope.subscriber(handler='.portlets.attributesTriggerNavigationPortletReload')
zope.subscriber(handler='.portlets.attributesTriggerRecentPortletReload')
zope.subscriber(handler='.globalui.attributesTriggerPortalTabsReload')
zope.subscriber(handler='.globalui.attributesTriggerBreadcrumbsReload')
zope.subscriber(handler='.globalui.attributesTriggerHeadTitleReload')
zope.subscriber(handler='.globalui.attributesTriggerDocumentBylineReload')
zope.subscriber(handler='.portlets.workflowTriggersNavigationPortletReload')
zope.subscriber(handler='.portlets.workflowTriggersRecentPortletReload')
zope.subscriber(handler='.portlets.workflowTriggersReviewPortletReload')
genericsetup.registerProfile(name='default', directory='profile/default', title='plone.app.kss', description='Add kinetic stylesheet (KSS) functionality to Plone', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# kss/core/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(file='meta.zcml')
zope.include(file='permission.zcml')
# This include MUST come first!
zope.include(package='.pluginregistry')
# The next file defines all the default components
# XXX edit that file to enable javascript debugging support
zope.include(file='concatresource.zcml')
# Include the core plugins
zope.include(package='.plugins')
# javascript testing support
zope.include(package='.tests', file='configure-online.zcml')
# Javascript resources that are used by the core
# (Resources used by plugins are loaded from the component)
#
browser.resource(file='kukit/3rd_party/sarissa.js', name='sarissa.js')
browser.resource(file='kukit/3rd_party/cssQuery.js', name='cssQuery.js')
browser.resource(file='kukit/3rd_party/cssQuery-compat.js', name='cssQuery-compat.js')
browser.resource(file='kukit/3rd_party/MochiKit.js', name='MochiKit.js')
browser.resourceDirectory(name='firebuglite', directory='kukit/3rd_party/firebuglite')
browser.resource(file='kukit/3rd_party/base2-dom-fp.js', name='base2-dom-fp.js')
# Adapter used to render KSS commands
zope.adapter(for_='.interfaces.IKSSCommands zope.publisher.interfaces.browser.IBrowserRequest', provides='.interfaces.IKSSCommandView', factory='.commands.CommandView')
# (non-kss) browser view
browser.page(for_='*', name='kss_view', permission='zope.Public', class_='.browserview.KSSBrowserView', allowed_attributes='attach_error')
browser.page(for_='*', name='kss_javascript', permission='zope.Public', template='browser/kss_javascript.pt')
# ----------------------------------------------------
# kss/core/permission.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
if config.eval_condition('installed kss.demo'):
zope.permission(id='zope.View', title='View')
# ----------------------------------------------------
# kss/core/pluginregistry/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# XXX concatresource is now included locally.
zope.include(package='._concatresource')
zope.include(package='.json')
zope.include(package='.browser')
# Register an adapter for concatresource
zope.utility(provides='concatresource.interfaces.IConcatResourceAddon', name='kukit.js', component='.registry.kssConcatResourceAddon')
zope.utility(provides='concatresource.interfaces.IConcatResourceAddon', name='kukit-src.js', component='.registry.kssConcatResourceAddon')
zope.utility(provides='concatresource.interfaces.IConcatResourceAddon', name='kukit-devel.js', component='.registry.kssConcatResourceAddon')
# ----------------------------------------------------
# kss/core/pluginregistry/_concatresource/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(for_='.interfaces.IContextFile', provides='.interfaces.ICachedResource', factory='.cachingadapter.CachedResource')
# Include the next line for testing only.
#include package=".test" /
# ----------------------------------------------------
# kss/core/pluginregistry/json/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# We do not import things directly from jsonserver, as
# its presence is optional. We import these locally
# and if the import fails, blind stubs are provided
# for the necessary interfaces and factories. This
# ensures that this zcml will always execute.
# XXX But this should actually be done via
# features / conditionals from here.
#
# View that renders the command
zope.adapter(for_='kss.core.interfaces.IKSSCommands .interfaces.IJSONRPCRequest', provides='zope.interface.Interface', factory='.utils.JsonCommandView', name='render')
# Json representation of commands
zope.adapter(for_='kss.core.interfaces.IKSSCommand .interfaces.IJSONWriter', provides='.interfaces.IJSONStreamWriteable', factory='.utils.KSSCommandWriter')
# provide z3 security for command elements
with zope.class__cm(class_='kss.core.commands.KSSCommands'):
zope.require(permission='zope.Public', attributes='__iter__')
with zope.class__cm(class_='kss.core.commands.KSSCommand'):
zope.require(permission='zope.Public', attributes='__dict__')
with zope.class__cm(class_='kss.core.commands.KSSParam'):
zope.require(permission='zope.Public', attributes='name content')
# ----------------------------------------------------
# kss/core/pluginregistry/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Register a view to compute development mode
browser.page(for_='*', class_='.develview.DevelView', name='kss_devel_mode', permission='zope.Public', allowed_interface='.interfaces.IDevelView')
browser.resource(name='kss_devel_ui.js', file='develui.js', permission='zope.Public')
browser.resource(name='kss_devel_ui.css', file='develui.css', permission='zope.Public')
browser.resource(name='kss_devel_ui.kss', file='develui.kss', permission='zope.Public')
# ----------------------------------------------------
# kss/core/concatresource.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Add
#
# caching="memory"
#
# to cache concatenation of kukit.js
#
#
# Available values for compress_level in javascript:
#
# - none: the raw sources
# - devel: like none but the ;;;-s themselves are removed
# - stripped: the production version unpacked, readable
# - safe-devel: safe packing, devel version
# - safe: safe packing of the production version
# - full-devel: full packing, devel version
# - full: full packing of the production version
#
#
# Production version
browser.concatresource(files=' kukit/kukit/kukit.js kukit/kukit/utils.js kukit/kukit/errors.js kukit/kukit/oper.js kukit/kukit/tokenizer.js kukit/kukit/providerreg.js kukit/kukit/resourcedata.js kukit/kukit/kssparser.js kukit/kukit/eventreg.js kukit/kukit/actionreg.js kukit/kukit/dom.js kukit/kukit/commandreg.js kukit/kukit/serveraction.js kukit/kukit/requestmanager.js kukit/kukit/commandprocessor.js kukit/kukit/selectorreg.js kukit/kukit/forms.js kukit/kukit/plugin.js', name='kukit.js', compress_level='safe', caching='memory', lmt_check_period='300')
# Development version
browser.concatresource(files=' kukit/kukit/kukit.js kukit/kukit/utils.js kukit/kukit/errors.js kukit/kukit/oper.js kukit/kukit/tokenizer.js kukit/kukit/providerreg.js kukit/kukit/resourcedata.js kukit/kukit/kssparser.js kukit/kukit/eventreg.js kukit/kukit/actionreg.js kukit/kukit/dom.js kukit/kukit/commandreg.js kukit/kukit/serveraction.js kukit/kukit/requestmanager.js kukit/kukit/commandprocessor.js kukit/kukit/selectorreg.js kukit/kukit/forms.js kukit/kukit/plugin.js', name='kukit-devel.js', compress_level='devel', caching='memory', lmt_check_period='0')
# Old source version used by RR
browser.concatresource(files='kukit/kukit/utils.js kukit/kukit/errors.js kukit/kukit/oper.js kukit/kukit/kukit.js kukit/kukit/tokenizer.js kukit/kukit/providerreg.js kukit/kukit/resourcedata.js kukit/kukit/kssparser.js kukit/kukit/eventreg.js kukit/kukit/actionreg.js kukit/kukit/dom.js kukit/kukit/commandreg.js kukit/kukit/serveraction.js kukit/kukit/requestmanager.js kukit/kukit/commandprocessor.js kukit/kukit/selectorreg.js kukit/kukit/forms.js kukit/kukit/plugin.js', name='kukit-src.js', compress_level='devel')
# ----------------------------------------------------
# kss/core/plugins/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Configuration of all the plugins distributed
# with the core system.
# Individual lines can be commented out.
#
# The core plugins
zope.include(package='.core')
# The scriptaculous effects
zope.include(package='.effects')
# The drag and drop
# This plugin will be deprecated, do not enable by default
#include package=".draganddrop" /
# ----------------------------------------------------
# kss/core/plugins/core/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
kss = config.get_namespace('http://namespaces.zope.org/kss')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Include demo setup conditionally
if config.eval_condition('installed kss.demo'):
zope.include(package='.demo')
# example plugin registration
#
# <kss:eventtype
# name="myCustomEventType"
# jsfile="browser/my_plugins.js"
# />
#
# <kss:action
# name="myCustomAction"
# jsfile="browser/my_plugins.js"
# command_factory="selector/global"
# params_mandatory="param1 param2 ... paramN"
# params_optional=""
# />
#
# <kss:selectortype
# name="myCustomSelectorType"
# jsfile="browser/my_plugins.js"
# />
#
# <kss:commandset
# name="core"
# provides=".interfaces.IKSSCoreCommands"
# />
#
#
# register core plugins
# jsfile is omitted since these are defined in the core
# and the plugin.js file is included statically in kukit.
#
# Event types
kss.eventtype(name='blur')
kss.eventtype(name='focus')
kss.eventtype(name='resize')
kss.eventtype(name='click')
kss.eventtype(name='dblclick')
kss.eventtype(name='mousedown')
kss.eventtype(name='mouseup')
kss.eventtype(name='mousemove')
kss.eventtype(name='mouseover')
kss.eventtype(name='mouseout')
kss.eventtype(name='change')
kss.eventtype(name='reset')
kss.eventtype(name='select')
kss.eventtype(name='submit')
kss.eventtype(name='keydown')
kss.eventtype(name='keypress')
kss.eventtype(name='keyup')
kss.eventtype(name='timeout')
kss.eventtype(name='load')
kss.eventtype(name='iload')
kss.eventtype(name='spinneron')
kss.eventtype(name='spinneroff')
# This does not work yet.
#kss:eventtype
# name="unload"
# /
# the special error action
kss.action(name='error', command_factory='global', params_optional='message')
# Client actions & commands
kss.action(name='logDebug', command_factory='global', params_mandatory='message')
kss.action(name='log', command_factory='global', params_mandatory='message')
kss.action(name='alert', command_factory='global', params_mandatory='message')
kss.action(name='replaceInnerHTML', command_factory='selector', params_mandatory='html')
kss.action(name='replaceHTML', command_factory='selector', params_mandatory='html')
kss.action(name='appendHTML', command_factory='selector', params_mandatory='html')
kss.action(name='insertHTMLBefore', command_factory='selector', params_mandatory='html')
kss.action(name='insertHTMLAfter', command_factory='selector', params_mandatory='html')
kss.action(name='insertHTMLAsFirstChild', command_factory='selector', params_mandatory='html')
kss.action(name='insertHTMLAsLastChild', command_factory='selector', params_mandatory='html')
kss.action(name='deleteNodeAfter', command_factory='selector')
kss.action(name='deleteNodeBefore', command_factory='selector')
kss.action(name='deleteNode', command_factory='selector')
kss.action(name='clearChildNodes', command_factory='selector')
kss.action(name='moveNodeAfter', command_factory='selector', params_mandatory='html_id')
kss.action(name='moveNodeBefore', command_factory='selector', params_mandatory='html_id')
kss.action(name='copyChildNodesFrom', command_factory='selector', params_mandatory='html_id')
kss.action(name='copyChildNodesTo', command_factory='selector', params_mandatory='html_id')
kss.action(name='setAttribute', command_factory='selector', params_mandatory='name value')
kss.action(name='setKssAttribute', command_factory='selector', params_mandatory='name value')
kss.action(name='setStyle', command_factory='selector', params_mandatory='name value')
kss.action(name='toggleClass', command_factory='selector', params_mandatory='value')
kss.action(name='addClass', command_factory='selector', params_mandatory='value')
kss.action(name='removeClass', command_factory='selector', params_mandatory='value')
kss.action(name='focus', command_factory='selector')
kss.action(name='blur', command_factory='selector')
kss.action(name='setStateVar', command_factory='global', params_mandatory='varname value')
kss.action(name='continueEvent', command_factory='global', params_mandatory='name', params_optional='allnodes')
kss.action(name='executeCommand')
# Old command names (XXX compatibility, to be deprecated)
kss.action(name='setHtmlAsChild', command_factory='selector', params_mandatory='html', deprecated='use setInnerHTML instead')
kss.action(name='addAfter', command_factory='selector', params_mandatory='html', deprecated='use insertHTMLAfter instead')
kss.action(name='removeNextSibling', command_factory='selector', deprecated='use deleteNodeAfter instead')
kss.action(name='removePreviousSibling', command_factory='selector', deprecated='use deleteNodeBefore instead')
kss.action(name='removeNode', command_factory='selector', deprecated='use deleteNode instead')
kss.action(name='clearChildren', command_factory='selector', deprecated='use clearChildNodes instead')
kss.action(name='copyChildrenFrom', command_factory='selector', params_mandatory='html_id', deprecated='use copyChildNodesFrom instead')
kss.action(name='copyChildrenTo', command_factory='selector', params_mandatory='html_id', deprecated='use copyChildNodesTo instead')
kss.action(name='setStatevar', command_factory='global', params_mandatory='varname value', deprecated='use setInnerHTML instead')
# Selector types
kss.selectortype(name='css')
kss.selectortype(name='htmlid')
kss.selectortype(name='samenode')
kss.selectortype(name='parentnode')
# Parameter producers
kss.paramprovider(name='formVar')
kss.paramprovider(name='currentFormVar')
kss.paramprovider(name='currentFormVarFromKssAttr')
kss.paramprovider(name='form')
kss.paramprovider(name='currentForm')
kss.paramprovider(name='nodeAttr')
kss.paramprovider(name='kssAttr')
kss.paramprovider(name='nodeContent')
kss.paramprovider(name='stateVar')
kss.paramprovider(name='pass')
# Command sets
kss.commandset(name='core', for_='kss.core.interfaces.IKSSView', provides='.interfaces.IKSSCoreCommands', class_='.commands.KSSCoreCommands')
# ----------------------------------------------------
# kss/core/plugins/effects/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
kss = config.get_namespace('http://namespaces.zope.org/kss')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Third party library dependencies
browser.resource(file='3rd_party/prototype.js', name='prototype.js')
browser.resource(file='3rd_party/effects.js', name='effects.js')
# example plugin registration
#
# <kss:eventtype
# name="myCustomEventType"
# jsfile="browser/my_plugins.js"
# />
#
# <kss:action
# name="myCustomAction"
# jsfile="browser/my_plugins.js"
# command_factory="selector/global"
# params_mandatory="param1 param2 ... paramN"
# params_optional=""
# />
#
# <kss:selectortype
# name="myCustomSelectorType"
# jsfile="browser/my_plugins.js"
# />
#
#
# Event types
# Client actions & commands
kss.action(name='effect', jsfile='browser/plugin.js', command_factory='selector', params_mandatory='type')
# Command sets
kss.commandset(name='effects', for_='kss.core.interfaces.IKSSView', class_='.commands.ScriptaculousEffectsCommands', provides='.interfaces.IScriptaculousEffectsCommands')
# ----------------------------------------------------
# kss/core/tests/configure-online.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# testing support. Allows testing from a browser,
# by loading kukittestsuite
browser.page(for_='*', class_='.ecmaview.EcmaView', name='kukittestsuite', permission='zope.Public')
browser.resource(file='../kukit/3rd_party/johnnydebris.net/minisax.js/minisax.js', name='minisax.js')
browser.resource(file='../kukit/3rd_party/johnnydebris.net/jsbase/string.js', name='jsbase-string.js')
browser.resource(file='../kukit/3rd_party/johnnydebris.net/jsbase/array.js', name='jsbase-array.js')
browser.resource(file='../kukit/3rd_party/johnnydebris.net/dommer/dommer.js', name='dommer-dommer.js')
# ----------------------------------------------------
# plone/app/kss/commands/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
kss = config.get_namespace('http://namespaces.zope.org/kss')
kss.commandset(name='zope', for_='kss.core.interfaces.IKSSView', class_='.zopecommands.ZopeCommands', provides='.interfaces.IZopeCommands')
kss.commandset(name='plone', for_='kss.core.interfaces.IKSSView', class_='.plonecommands.PloneCommands', provides='.interfaces.IPloneCommands')
kss.commandset(name='plone-legacy', for_='kss.core.interfaces.IKSSView', class_='.legacycommands.PloneLegacyCommands', provides='.interfaces.IPloneLegacyCommands')
zope.subscriber(handler='.zopecommands.addRefreshViewletCommands')
# DEPRECATED commands - will be gone in Plone 3.5.
#
# This functionality exists in the 'zope' and 'plone'
# command sets
#
#
kss.commandset(name='refreshportlet', for_='kss.core.interfaces.IKSSView', class_='.refreshportlet.RefreshPortletCommand', provides='.interfaces.IRefreshPortletCommand')
kss.commandset(name='refreshviewlet', for_='kss.core.interfaces.IKSSView', class_='.refreshViewlet.KSSRefreshViewlet', provides='.interfaces.IKSSRefreshViewlet')
kss.commandset(name='plone-portlets', for_='kss.core.interfaces.IKSSView', class_='.portlets.KSSPortletCommands', provides='.interfaces.IKSSPlonePortletCommands')
kss.commandset(name='portalmessage', for_='kss.core.interfaces.IKSSView', class_='.issueportalmessage.IssuePortalMessageCommand', provides='.interfaces.IIssuePortalMessageCommand')
kss.commandset(name='replacecontentmenu', for_='kss.core.interfaces.IKSSView', class_='.replacecontentmenu.ReplaceContentMenuCommand', provides='.interfaces.IReplaceContentMenuCommand')
kss.commandset(name='contentmenu', for_='kss.core.interfaces.IKSSView', class_='.refreshContentMenu.KSSRefreshContentMenu', provides='.interfaces.IKSSRefreshContentMenu')
kss.commandset(name='refreshprovider', for_='kss.core.interfaces.IKSSView', class_='.refreshprovider.RefreshProviderCommand', provides='.interfaces.IRefreshProviderCommand')
# ----------------------------------------------------
# plone/app/kss/plugins/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Configuration of all the plugins distributed
# with plone.app.kss .
# Individual lines can be commented out.
#
# plone base plugins
zope.include(package='.plone')
# Legacy plugins
zope.include(package='.legacy')
# ----------------------------------------------------
# plone/app/kss/plugins/plone/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
kss = config.get_namespace('http://namespaces.zope.org/kss')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# plugin registration
kss.action(name='plone-removeLockProtection', command_factory='selector', jsfile='plugin.js')
kss.action(name='plone-initLockingProtection', command_factory='selector', jsfile='plugin.js')
kss.action(name='plone-initKupu', command_factory='selector', jsfile='plugin.js')
kss.action(name='plone-followLink', command_factory='selector', jsfile='plugin.js')
kss.action(name='plone-submitCurrentForm', command_factory='selector', jsfile='plugin.js')
kss.eventtype(name='plone-formProtectionChecked', jsfile='plugin.js')
kss.action(name='plone-initShiftDetection', command_factory='global', jsfile='plugin.js')
kss.action(name='plone-initCheckBoxSelection', command_factory='global', jsfile='plugin.js')
kss.action(name='plone-createCheckBoxSelection', command_factory='selector', jsfile='plugin.js')
kss.action(name='plone-initDragAndDrop', command_factory='global', jsfile='plugin.js')
# ----------------------------------------------------
# plone/app/kss/plugins/legacy/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
kss = config.get_namespace('http://namespaces.zope.org/kss')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# reload plugin for content menus
kss.action(name='bindExternalLinks', jsfile='reload/bindextlinks.js')
kss.action(name='initializeCollapsible', jsfile='reload/initializeCollapsible.js')
kss.action(name='createTableOfContents', command_factory='global', jsfile='reload/createTableOfContents.js')
# ----------------------------------------------------
# plone/app/kss/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
with genericsetup.importStep__cm(name='kssregistry', title='KSS registry', description='Import KSS registry', handler='Products.ResourceRegistries.exportimport.kssregistry.importKSSRegistry'):
zope.depends(name='toolset')
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='kss_mimetype', title='KSS setup / mimetype', description='KSS (Kinetic Style Sheet) setup. Register kss mimetype.', handler='plone.app.kss.exportimport.setup.setupMimetype'):
zope.depends(name='mimetypes-registry-various')
genericsetup.importStep(name='kss_caching', title='KSS setup / caching', description='KSS (Kinetic Style Sheet) setup. Register caching for portal_kss.', handler='plone.app.kss.exportimport.setup.addCacheForResourceRegistry')
genericsetup.exportStep(name='kssregistry', title='KSS registry', description='Export stylesheet registry', handler='Products.ResourceRegistries.exportimport.kssregistry.exportKSSRegistry')
# ----------------------------------------------------
# plone/app/openid/configure.zcml
# ----------------------------------------------------
def includeme(config):
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
five.registerPackage(package='.')
genericsetup.importStep(name='ploneopenid-various', title='Set up OpenID authentication in Plone', handler='plone.app.openid.setuphandlers.importVarious', description='Add OpenID authentication support to Plone. This adds a new OpenID login portlet and modifies the login form to add OpenID support.')
if config.eval_condition('installed openid.yadis'):
genericsetup.registerProfile(name='default', title='OpenID Authentication Support', description='Adds support for authenticating with OpenID credentials in a Plone site', directory='profiles/default', provides='Products.GenericSetup.interfaces.EXTENSION')
cmf.registerDirectory(name='ploneopenid')
zope.include(package='.portlets')
zope.include(package='plone.openid')
# ----------------------------------------------------
# plone/app/openid/portlets/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
zope.include(package='plone.app.portlets')
plone.portlet(name='portlets.OpenIDLogin', interface='.login.ILoginPortlet', assignment='.login.Assignment', renderer='.login.Renderer', addview='.login.AddForm')
# ----------------------------------------------------
# plone/app/textfield/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
# Configure plone.supermodel support if available
if config.eval_condition('installed plone.supermodel'):
zope.include(file='handler.zcml')
# Configure PortalTransforms based transformer if available
if config.eval_condition('installed Products.PortalTransforms'):
zope.include(file='transform.zcml')
# Configure z3c.form widget if z3c.form is installed
if config.eval_condition('installed z3c.form'):
zope.include(file='widget.zcml')
# Configure plone.rfc822 marshaler if installed
if config.eval_condition('installed plone.rfc822'):
zope.include(file='marshaler.zcml')
# Configure plone.schemaeditor field factory if installed
if config.eval_condition('installed plone.schemaeditor'):
zope.include(file='editor.zcml')
# Configure transform invocation browser view
zope.include(file='browser.zcml')
# ----------------------------------------------------
# plone/app/textfield/handler.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
# plone.supermodel configuration
zope.utility(component='.handler.RichTextHandler', name='plone.app.textfield.RichText')
zope.adapter(factory='.handler.RichTextToUnicode')
# ----------------------------------------------------
# plone/app/textfield/transform.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
zope.adapter(factory='.transform.PortalTransformsTransformer', for_='Products.CMFCore.interfaces.IContentish')
zope.adapter(factory='.transform.PortalTransformsTransformer', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# plone/app/textfield/widget.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
zope.include(package='z3c.form', file='meta.zcml')
zope.include(package='z3c.form')
zope.adapter(factory='.widget.RichTextFieldWidget')
zope.adapter(factory='.widget.RichTextConverter')
with zope.class__cm(class_='.widget.RichTextWidget'):
zope.require(permission='zope.Public', interface='.widget.IRichTextWidget')
z3c.widgetTemplate(mode='display', widget='.widget.IRichTextWidget', layer='z3c.form.interfaces.IFormLayer', template='widget_display.pt')
z3c.widgetTemplate(mode='input', widget='.widget.IRichTextWidget', layer='z3c.form.interfaces.IFormLayer', template='widget_input.pt')
# ----------------------------------------------------
# plone/app/textfield/marshaler.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
zope.adapter(factory='.marshaler.RichTextFieldMarshaler')
# ----------------------------------------------------
# plone/app/textfield/editor.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
with zope.class__cm(class_='.RichText'):
zope.implements(interface='.editor.IRichText')
zope.utility(name='plone.app.textfield.RichText', component='.editor.RichTextFactory')
# ----------------------------------------------------
# plone/app/textfield/browser.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone.app.textfield'):
# Generic transform browser view
browser.page(for_='*', name='text-transform', permission='zope2.View', class_='.browser.Transform')
# ----------------------------------------------------
# plone/app/theming/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
plone = config.get_namespace('http://namespaces.plone.org/plone')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone'):
#
# <i18n:registerTranslations directory="locales"/>
#
zope.include(package='plone.resource', file='meta.zcml')
zope.include(package='plone.resource')
zope.include(package='plone.resourceeditor')
zope.include(package='five.globalrequest')
zope.include(package='plone.transformchain')
zope.include(package='plone.app.registry')
zope.include(package='diazo', file='diazo-debug.zcml')
zope.include(package='.browser')
zope.include(package='.exportimport')
zope.include(package='.plugins')
gs.registerProfile(name='default', title='Diazo theme support', description='Installs a control panel to allow on-the-fly theming with Diazo', directory='profiles/default', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='Products.GenericSetup.interfaces.EXTENSION')
gs.upgradeStep(title='Update registry', source='*', destination='1000', handler='.upgrade.update_registry', sortkey='1', profile='plone.app.theming:default')
gs.upgradeStep(title='Combine Theming control panels', source='1000', destination='1001', handler='.upgrade.update_controlpanel', sortkey='2', profile='plone.app.theming:default')
# Transform order 8850 - apply theme transform
zope.adapter(name='plone.app.theming.transform', factory='.transform.ThemeTransform')
zope.subscriber(for_='.interfaces.IThemeSettings plone.registry.interfaces.IRecordModifiedEvent', handler='.transform.invalidateCache')
# Set X-Theme-Enabled header in the request if theming is enabled
zope.subscriber(for_='Products.CMFCore.interfaces.ISiteRoot zope.traversing.interfaces.IBeforeTraverseEvent', handler='.header.setHeader')
# Resource traverser
zope.adapter(name='theme', for_='* zope.publisher.interfaces.IRequest', provides='zope.traversing.interfaces.ITraversable', factory='.traversal.ThemeTraverser')
# Themes
plone.static(type='theme', name='template', directory='themes/template')
plone.static(type='theme', name='example', directory='themes/example')
# ----------------------------------------------------
# diazo/diazo-debug.zcml
# ----------------------------------------------------
def includeme(config):
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
plone = config.get_namespace('http://namespaces.plone.org/plone')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
# Static resources
browser.resourceDirectory(name='diazo-debug', directory='debug_resources')
# ----------------------------------------------------
# plone/app/theming/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
browser.resource(name='plone.app.theming.gif', image='icon.gif')
browser.resourceDirectory(name='plone.app.theming', directory='resources')
browser.page(name='theming-controlpanel', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.controlpanel.ThemingControlpanel', template='controlpanel.pt', permission='cmf.ManagePortal')
browser.page(name='theming-controlpanel-help', for_='Products.CMFPlone.interfaces.IPloneSiteRoot', class_='.help.Help', permission='zope2.View')
browser.page(name='theming-controlpanel-mapper', for_='plone.resource.interfaces.IResourceDirectory', class_='.mapper.ThemeMapper', template='mapper.pt', permission='cmf.ManagePortal')
browser.page(name='theming-controlpanel-mapper-getframe', for_='plone.resource.interfaces.IResourceDirectory', class_='.mapper.ThemeMapper', attribute='getFrame', permission='cmf.ManagePortal')
browser.page(name='theming-controlpanel-mapper-save', for_='plone.resource.interfaces.IResourceDirectory', class_='.mapper.ThemeMapper', attribute='save', permission='cmf.ManagePortal')
# ----------------------------------------------------
# plone/app/theming/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
gs = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone.app.theming'):
with gs.importStep__cm(name='plone.app.theming', title='Apply Diazo theme', description='Applies a theme configured in a theme.xml file', handler='.handler.importTheme'):
gs.depends(name='toolset')
# ----------------------------------------------------
# plone/app/theming/plugins/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone'):
zope.subscriber(for_='Products.CMFCore.interfaces.ISiteRoot zope.traversing.interfaces.IBeforeTraverseEvent', handler='.hooks.onRequest')
zope.subscriber(for_='zope.processlifetime.DatabaseOpenedWithRoot', handler='.hooks.onStartup')
# ----------------------------------------------------
# plone/formwidget/namedfile/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
z3c = config.get_namespace('http://namespaces.zope.org/z3c')
with zope.configure__cm(i18n_domain='plone.formwidget.namedfile'):
zope.include(package='z3c.form', file='meta.zcml')
zope.include(package='z3c.form')
zope.include(package='plone.namedfile')
i18n.registerTranslations(directory='locales')
zope.adapter(factory='.converter.NamedDataConverter')
zope.adapter(factory='.validator.NamedFileWidgetValidator')
with zope.class__cm(class_='.widget.NamedFileWidget'):
zope.require(permission='zope.Public', interface='.interfaces.INamedFileWidget')
with zope.class__cm(class_='.widget.NamedImageWidget'):
zope.require(permission='zope.Public', interface='.interfaces.INamedImageWidget')
zope.adapter(factory='.widget.NamedFileFieldWidget')
zope.adapter(factory='.widget.NamedImageFieldWidget')
z3c.widgetTemplate(mode='display', widget='.interfaces.INamedFileWidget', layer='z3c.form.interfaces.IFormLayer', template='file_display.pt')
z3c.widgetTemplate(mode='display', widget='.interfaces.INamedImageWidget', layer='z3c.form.interfaces.IFormLayer', template='image_display.pt')
z3c.widgetTemplate(mode='input', widget='.interfaces.INamedFileWidget', layer='z3c.form.interfaces.IFormLayer', template='file_input.pt')
z3c.widgetTemplate(mode='input', widget='.interfaces.INamedImageWidget', layer='z3c.form.interfaces.IFormLayer', template='image_input.pt')
browser.page(name='download', for_='.interfaces.INamedFileWidget', class_='.widget.Download', permission='zope2.View')
# ----------------------------------------------------
# plonetheme/classic/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='.browser')
cmf.registerDirectory(name='classic_templates')
cmf.registerDirectory(name='classic_styles')
cmf.registerDirectory(name='classic_ecmascript')
five.registerPackage(package='.')
genericsetup.registerProfile(name='default', title='Plone Classic Theme', directory='profiles/default', description='The old theme used in Plone 3 and earlier.', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='uninstall', title='Plone Classic Theme Uninstall Profile', directory='profiles/uninstall', description='Uninstall profile for Plone Classic theme.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# plonetheme/classic/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
zope.interface(interface='.interfaces.IThemeSpecific', type='zope.publisher.interfaces.browser.IBrowserSkinType', name='Plone Classic Theme')
zope.interface(interface='.interfaces.IThemeSpecific', type='zope.publisher.interfaces.browser.IBrowserSkinType', name='Old Plone 3 Custom Theme')
# move site actions to portalheader manager
browser.viewlet(name='plone.site_actions', layer='.interfaces.IThemeSpecific', manager='plone.app.layout.viewlets.interfaces.IPortalHeader', class_='plone.app.layout.viewlets.common.SiteActionsViewlet', permission='zope2.View')
# move language selector to the portaltop manager
with zope.configure__cm(package='plone.app.i18n'):
browser.viewlet(name='plone.app.i18n.locales.languageselector', layer='plonetheme.classic.browser.interfaces.IThemeSpecific', manager='plone.app.layout.viewlets.interfaces.IPortalTop', class_='plone.app.i18n.locales.browser.selector.LanguageSelector', template='locales/browser/languageselector.pt', permission='zope2.View')
# move personal bar to portaltop manager, and replace template
browser.viewlet(name='plone.personal_bar', layer='.interfaces.IThemeSpecific', manager='plone.app.layout.viewlets.interfaces.IPortalTop', class_='plone.app.layout.viewlets.common.PersonalBarViewlet', template='personal_bar.pt', permission='zope2.View')
# move path bar to portaltop manager
browser.viewlet(name='plone.path_bar', layer='.interfaces.IThemeSpecific', manager='plone.app.layout.viewlets.interfaces.IPortalTop', class_='plone.app.layout.viewlets.common.PathBarViewlet', permission='zope2.View')
# move keywords below content title
with zope.configure__cm(package='plone.app.layout.viewlets'):
browser.viewlet(name='plone.belowcontenttitle.keywords', layer='plonetheme.classic.browser.interfaces.IThemeSpecific', manager='plone.app.layout.viewlets.interfaces.IBelowContentTitle', template='keywords.pt', permission='zope2.View')
# ----------------------------------------------------
# plonetheme/sunburst/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='.browser')
cmf.registerDirectory(name='sunburst_images')
cmf.registerDirectory(name='sunburst_styles')
cmf.registerDirectory(name='sunburst_templates')
five.registerPackage(package='.')
genericsetup.registerProfile(name='default', title='Sunburst Theme', directory='profiles/default', description='Sunburst is a modern, minimalist, grid-based theme for Plone 4.', provides='Products.GenericSetup.interfaces.EXTENSION')
with genericsetup.importStep__cm(name='plonetheme.sunburst-various', title='Sunburst Theme Configuration', description='Custom configuration for plonetheme.sunburst', handler='.setuphandlers.importVarious'):
genericsetup.depends(name='actions')
with genericsetup.upgradeSteps__cm(source='2', destination='3', profile='plonetheme.sunburst:default'):
genericsetup.upgradeStep(title='Upgrade to plonetheme.sunburst 1.4', description='Migrate to plonetheme.sunburst with seperated styles and register new reset.css.', handler='.setuphandlers.upgrade_step_2_3')
# ----------------------------------------------------
# plonetheme/sunburst/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='plone'):
# 'Sunburst Theme' Zope 3 browser layer
zope.interface(interface='.interfaces.IThemeSpecific', type='zope.publisher.interfaces.browser.IBrowserSkinType', name='Sunburst Theme')
# Sunburst special view
browser.page(for_='*', name='sunburstview', class_='.sunburstview.SunburstView', permission='zope.Public', allowed_interface='.interfaces.ISunburstView')
# ----------------------------------------------------
# Products/DCWorkflow/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='cmf_default'):
if config.eval_condition('installed AccessControl.security'):
# for Zope 2.13
zope.include(package='Products.CMFCore', file='permissions.zcml')
zope.include(package='.browser')
zope.include(file='exportimport.zcml')
zope.include(file='tool.zcml')
# profiles
genericsetup.registerProfile(name='revision2', title='CMF Default Workflow [Revision 2]', description='Adds revision 2 of default workflow.', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFCore.interfaces.ISiteRoot')
# ----------------------------------------------------
# Products/DCWorkflow/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope = config.get_namespace('http://namespaces.zope.org/zope')
with zope.configure__cm(package='Products.GenericSetup.browser'):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser.page(for_='zope.browser.interfaces.IAdding', name='addDCWorkflowDefinition.html', template='addWithPresettings.pt', class_='Products.DCWorkflow.browser.workflow.DCWorkflowDefinitionAddView', permission='cmf.ManagePortal')
# ----------------------------------------------------
# Products/DCWorkflow/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.DCWorkflowDefinitionBodyAdapter')
# ----------------------------------------------------
# Products/DCWorkflow/tool.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
five.registerClass(class_='.DCWorkflow.DCWorkflowDefinition', meta_type='Workflow', addview='addDCWorkflowDefinition.html', permission='cmf.ManagePortal', global_='False')
# ----------------------------------------------------
# Products/Marshall/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.profile.MarshallRegistryFileExportImportAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.interfaces.IMarshallRegistry')
zope.adapter(factory='.profile.MarshallRegistryFileExportImportAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.interfaces.IMarshallRegistry')
# ----------------------------------------------------
# Products/OFSP/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='OFS', file='configure.zcml')
# ----------------------------------------------------
# Products/PageTemplates/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.utility(provides='Products.PageTemplates.interfaces.IUnicodeEncodingConflictResolver', component='Products.PageTemplates.unicodeconflictresolver.PreferredCharsetResolver')
# ----------------------------------------------------
# Products/PasswordResetTool/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='Products.PasswordResetTool'):
cmf.registerDirectory(name='skins', directory='skins', recursive='True')
genericsetup.registerProfile(name='PasswordResetTool', title='PasswordResetTool', directory='profiles/default', description='Extension profile for default PasswordResetTool setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
browser.page(name='passwordreset_view', for_='*', class_='.browser.PasswordResetToolView', allowed_interface='.interfaces.IPasswordResetToolView', permission='zope.Public')
# ----------------------------------------------------
# Products/PlacelessTranslationService/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
five.registerPackage(package='.', initialize='.initialize2')
i18n.registerTranslations(directory='locales')
# We need to make the request annotatable
zope.include(package='zope.annotation')
with zope.class__cm(class_='ZPublisher.BaseRequest.BaseRequest'):
zope.implements(interface='zope.annotation.interfaces.IAttributeAnnotatable')
with zope.class__cm(class_='ZPublisher.HTTPRequest.HTTPRequest'):
zope.implements(interface='zope.publisher.interfaces.browser.IBrowserRequest')
# ----------------------------------------------------
# Products/PloneLanguageTool/configure.zcml
# ----------------------------------------------------
def includeme(config):
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(file='profiles.zcml')
five.deprecatedManageAddDelete(class_='.LanguageTool.LanguageTool')
cmf.registerDirectory(name='skins', directory='skins', recursive='True')
zope.adapter(factory='.exportimport.LanguageToolXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='.interfaces.ILanguageTool Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.LanguageTool.NegotiateLanguage', for_='* *')
# ----------------------------------------------------
# Products/PloneLanguageTool/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
genericsetup.registerProfile(name='PloneLanguageTool', title='PloneLanguageTool', directory='profiles/default', description='Extension profile for default PloneLanguageTool setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/PlonePAS/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='.browser')
zope.include(file='profiles.zcml')
zope.include(file='exportimport.zcml')
with genericsetup.importStep__cm(name='plonepas', title='PlonePAS setup', description='Configure PlonePas', handler='Products.PlonePAS.setuphandlers.setupPlonePAS'):
zope.depends(name='componentregistry')
zope.depends(name='controlpanel')
zope.depends(name='memberdata-properties')
zope.depends(name='rolemap')
five.deprecatedManageAddDelete(class_='.plugins.cookie_handler.ExtendedCookieAuthHelper')
five.deprecatedManageAddDelete(class_='.plugins.role.GroupAwareRoleManager')
# ----------------------------------------------------
# Products/PlonePAS/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='Five'):
zope.permission(id='PAS.SearchPrincipals', title='Search for principals')
browser.page(for_='*', name='pas_info', class_='.info.PASInfoView', permission='zope2.View', allowed_interface='Products.PlonePAS.interfaces.browser.IPASInfoView')
browser.page(for_='*', name='pas_member', class_='.member.PASMemberView', permission='zope2.View', allowed_interface='Products.PlonePAS.interfaces.browser.IPASMemberView')
browser.page(for_='*', name='pas_search', class_='.search.PASSearchView', permission='zope2.View', allowed_interface='Products.PlonePAS.interfaces.browser.IPASSearchView')
# ----------------------------------------------------
# Products/PlonePAS/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='plonepas'):
genericsetup.registerProfile(name='PlonePAS', title='PlonePAS', directory='profiles/default', description='Extension profile for default PlonePAS setup.', provides='Products.GenericSetup.interfaces.EXTENSION')
# ----------------------------------------------------
# Products/PlonePAS/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='Products.PluggableAuthService.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.PluggableAuthService.interfaces.plugins.IUserFactoryPlugin')
zope.adapter(factory='Products.PluggableAuthService.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.PluggableAuthService.interfaces.plugins.IUserFactoryPlugin')
# XXX This should point to an own export/import class! TitleOnly is far not enough
zope.adapter(factory='Products.PluggableAuthService.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.PlonePAS.interfaces.plugins.IMutablePropertiesPlugin')
zope.adapter(factory='Products.PluggableAuthService.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.PlonePAS.interfaces.plugins.IMutablePropertiesPlugin')
# ----------------------------------------------------
# Products/PluggableAuthService/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='*', name='csrf_token', class_='.utils.CSRFToken', permission='zope.Public')
zope.include(file='exportimport.zcml')
zope.include(file='events.zcml')
zope.include(file='compatibility.zcml')
# ----------------------------------------------------
# Products/PluggableAuthService/exportimport.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.PAS_PR_ContentFactory', provides='Products.GenericSetup.interfaces.IContentFactory', for_='.interfaces.authservice.IPluggableAuthService', name='Plugin Registry')
zope.adapter(factory='Products.GenericSetup.content.FolderishExporterImporter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.interfaces.authservice.IPluggableAuthService')
zope.adapter(factory='Products.GenericSetup.content.FolderishExporterImporter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.interfaces.authservice.IPluggableAuthService')
zope.adapter(factory='.plugins.exportimport.ChallengeProtocolChooserExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.ChallengeProtocolChooser.IChallengeProtocolChooserPlugin')
zope.adapter(factory='.plugins.exportimport.ChallengeProtocolChooserExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.ChallengeProtocolChooser.IChallengeProtocolChooserPlugin')
zope.adapter(factory='.plugins.exportimport.CookieAuthHelperExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.CookieAuthHelper.ICookieAuthHelper')
zope.adapter(factory='.plugins.exportimport.CookieAuthHelperExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.CookieAuthHelper.ICookieAuthHelper')
zope.adapter(factory='.plugins.exportimport.DelegatePathExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.DelegatingMultiPlugin.IDelegatingMultiPlugin')
zope.adapter(factory='.plugins.exportimport.DelegatePathExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.DelegatingMultiPlugin.IDelegatingMultiPlugin')
zope.adapter(factory='.plugins.exportimport.DomainAuthHelperExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.DomainAuthHelper.IDomainAuthHelper')
zope.adapter(factory='.plugins.exportimport.DynamicGroupsPluginExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.DynamicGroupsPlugin.IDynamicGroupsPlugin')
zope.adapter(factory='.plugins.exportimport.DynamicGroupsPluginExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.DynamicGroupsPlugin.IDynamicGroupsPlugin')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.HTTPBasicAuthHelper.IHTTPBasicAuthHelper')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.HTTPBasicAuthHelper.IHTTPBasicAuthHelper')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.InlineAuthHelper.IInlineAuthHelper')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.InlineAuthHelper.IInlineAuthHelper')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.LocalRolePlugin.ILocalRolePlugin')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.LocalRolePlugin.ILocalRolePlugin')
zope.adapter(factory='.plugins.exportimport.NotCompetent_byRolesExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.NotCompetentHelper.NotCompetent_byRoles')
zope.adapter(factory='.plugins.exportimport.NotCompetent_byRolesExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.NotCompetentHelper.NotCompetent_byRoles')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.RecursiveGroupsPlugin.IRecursiveGroupsPlugin')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.RecursiveGroupsPlugin.IRecursiveGroupsPlugin')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.RequestTypeSniffer.IRequestTypeSnifferPlugin')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.RequestTypeSniffer.IRequestTypeSnifferPlugin')
zope.adapter(factory='.plugins.exportimport.DelegatePathExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.SearchPrincipalsPlugin.ISearchPrincipalsPlugin')
zope.adapter(factory='.plugins.exportimport.DelegatePathExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.SearchPrincipalsPlugin.ISearchPrincipalsPlugin')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.SessionAuthHelper.ISessionAuthHelper')
zope.adapter(factory='.plugins.exportimport.TitleOnlyExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.SessionAuthHelper.ISessionAuthHelper')
zope.adapter(factory='.plugins.exportimport.ZODBUserManagerExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.ZODBUserManager.IZODBUserManager')
zope.adapter(factory='.plugins.exportimport.ZODBUserManagerExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.ZODBUserManager.IZODBUserManager')
zope.adapter(factory='.plugins.exportimport.ZODBGroupManagerExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.ZODBGroupManager.IZODBGroupManager')
zope.adapter(factory='.plugins.exportimport.ZODBGroupManagerExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.ZODBGroupManager.IZODBGroupManager')
zope.adapter(factory='.plugins.exportimport.ZODBRoleManagerExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.ZODBRoleManager.IZODBRoleManager')
zope.adapter(factory='.plugins.exportimport.ZODBRoleManagerExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.ZODBRoleManager.IZODBRoleManager')
zope.adapter(factory='.plugins.exportimport.ScriptablePluginExportImport', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.plugins.ScriptablePlugin.IScriptablePlugin')
zope.adapter(factory='.plugins.exportimport.ScriptablePluginExportImport', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.plugins.ScriptablePlugin.IScriptablePlugin')
zope.adapter(factory='.plugins.exportimport.PythonScriptFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='Products.GenericSetup.PythonScripts.interfaces.IPythonScript')
zope.adapter(factory='.plugins.exportimport.PythonScriptFileAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='Products.GenericSetup.PythonScripts.interfaces.IPythonScript')
# ----------------------------------------------------
# Products/PluggableAuthService/events.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.subscriber(handler='.events.PASEventNotify')
zope.subscriber(for_='.interfaces.authservice.IBasicUser .interfaces.events.ICredentialsUpdatedEvent', handler='.events.userCredentialsUpdatedHandler')
# ----------------------------------------------------
# Products/PluggableAuthService/compatibility.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
five.deprecatedManageAddDelete(class_='Products.PluggableAuthService.PluggableAuthService.PluggableAuthService')
five.deprecatedManageAddDelete(class_='Products.PluggableAuthService.plugins.ZODBRoleManager.ZODBRoleManager')
# ----------------------------------------------------
# Products/PluginRegistry/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.exportimport.PluginRegistryFileExportImportAdapter', provides='Products.GenericSetup.interfaces.IFilesystemExporter', for_='.interfaces.IPluginRegistry')
zope.adapter(factory='.exportimport.PluginRegistryFileExportImportAdapter', provides='Products.GenericSetup.interfaces.IFilesystemImporter', for_='.interfaces.IPluginRegistry')
# ----------------------------------------------------
# Products/PythonScripts/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
five.deprecatedManageAddDelete(class_='Products.PythonScripts.PythonScript.PythonScript')
# ----------------------------------------------------
# Products/ResourceRegistries/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
zope.include(package='.browser')
zope.include(package='.exportimport')
five.registerPackage(package='.', initialize='.initialize')
zope.adapter(for_='.interfaces.IResourceRegistry', name='persistent', factory='.tools.BaseRegistry.PersistentResourceProvider')
zope.subscriber(for_='.interfaces.settings.IResourceRegistriesSettings plone.registry.interfaces.IRecordModifiedEvent', handler='.tools.BaseRegistry.cookWhenChangingSettings')
# ----------------------------------------------------
# Products/ResourceRegistries/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.viewlet(name='plone.resourceregistries', manager='plone.app.layout.viewlets.interfaces.IHtmlHead', template='resourceregistries.pt', permission='zope2.View')
browser.viewletManager(name='plone.resourceregistries.scripts', provides='Products.ResourceRegistries.interfaces.IHtmlHeadScripts', template='scripts.pt', permission='zope2.View')
browser.viewletManager(name='plone.resourceregistries.styles', provides='Products.ResourceRegistries.interfaces.IHtmlHeadStyles', template='styles.pt', permission='zope2.View')
browser.viewletManager(name='plone.resourceregistries.kineticstylesheets', provides='Products.ResourceRegistries.interfaces.IHtmlHeadStyles', template='kss.pt', permission='zope2.View')
browser.page(for_='*', name='resourceregistries_scripts_view', class_='.scripts.ScriptsView', permission='zope.Public', allowed_interface='.interfaces.IScriptsView')
browser.page(for_='*', name='resourceregistries_styles_view', class_='.styles.StylesView', permission='zope.Public', allowed_interface='.interfaces.IStylesView')
browser.page(for_='*', name='resourceregistries_kss_view', class_='.kss.KSSView', permission='zope.Public', allowed_interface='.interfaces.IKSSView')
# ----------------------------------------------------
# Products/ResourceRegistries/exportimport/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='plone'):
zope.adapter(factory='.jsregistry.JSRegistryNodeAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.ResourceRegistries.interfaces.IJSRegistry Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.cssregistry.CSSRegistryNodeAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.ResourceRegistries.interfaces.ICSSRegistry Products.GenericSetup.interfaces.ISetupEnviron')
zope.adapter(factory='.kssregistry.KSSRegistryNodeAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='Products.ResourceRegistries.interfaces.IKSSRegistry Products.GenericSetup.interfaces.ISetupEnviron')
# ----------------------------------------------------
# Products/StandardCacheManagers/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.subscriber(for_='Products.StandardCacheManagers.RAMCacheManager.RAMCacheManager OFS.interfaces.IObjectClonedEvent', handler='Products.StandardCacheManagers.subscribers.cloned')
zope.subscriber(for_='Products.StandardCacheManagers.RAMCacheManager.RAMCacheManager zope.lifecycleevent.ObjectRemovedEvent', handler='Products.StandardCacheManagers.subscribers.removed')
zope.subscriber(for_='Products.StandardCacheManagers.AcceleratedHTTPCacheManager.AcceleratedHTTPCacheManager OFS.interfaces.IObjectClonedEvent', handler='Products.StandardCacheManagers.subscribers.cloned')
zope.subscriber(for_='Products.StandardCacheManagers.AcceleratedHTTPCacheManager.AcceleratedHTTPCacheManager zope.lifecycleevent.ObjectRemovedEvent', handler='Products.StandardCacheManagers.subscribers.removed')
# ----------------------------------------------------
# Products/TinyMCE/configure.zcml
# ----------------------------------------------------
def includeme(config):
i18n = config.get_namespace('http://namespaces.zope.org/i18n')
cmf = config.get_namespace('http://namespaces.zope.org/cmf')
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
with zope.configure__cm(i18n_domain='tinymce'):
zope.permission(id='plone.app.controlpanel.TinyMCE', title='Plone Site Setup: TinyMCE')
zope.include(package='plone.outputfilters')
zope.include(package='.browser')
zope.include(package='.adapters')
zope.include(file='profiles.zcml')
zope.adapter(factory='.exportimport.TinyMCESettingsXMLAdapter', provides='Products.GenericSetup.interfaces.IBody', for_='.interfaces.utility.ITinyMCE Products.GenericSetup.interfaces.ISetupEnviron')
zope.utility(factory='.utility.ImageCaptioningEnabler', name='tinymce')
zope.utility(factory='.utility.ResolveUidsEnabler', name='tinymce')
i18n.registerTranslations(directory='locales')
# register shortcuts
zope.utility(name='Current Folder', provides='.interfaces.shortcut.ITinyMCEShortcut', factory='.shortcut.CurrentFolderShortcut')
zope.utility(name='Home', provides='.interfaces.shortcut.ITinyMCEShortcut', factory='.shortcut.HomeShortcut')
# ----------------------------------------------------
# Products/TinyMCE/browser/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='tinymce'):
if config.eval_condition('have plone-41'):
zope.include(package='Products.CMFCore', file='permissions.zcml')
browser.page(for_='..interfaces.utility.ITinyMCE', name='tinymce-controlpanel', class_='.controlpanel.TinyMCEControlPanelForm', permission='plone.app.controlpanel.TinyMCE')
browser.page(for_='..interfaces.utility.ITinyMCE', name='tinymce-getstyle', class_='.style.TinyMCEStyle', attribute='getStyle', permission='zope2.View')
browser.page(for_='..interfaces.utility.ITinyMCE', name='tinymce-getpathbyuid', class_='.url.TinyMCEUrl', attribute='getPathByUID', permission='zope2.View')
# don't change the name of this. the gzip part is vital for the
# identification of the file
browser.page(for_='*', name='tiny_mce_gzip.js', class_='.compressor.TinyMCECompressorView', permission='zope2.View')
browser.page(for_='*', name='checkDocument', class_='.browser.ATDProxyView', permission='zope2.View', attribute='checkDocument')
with browser.pages__cm(for_='*', class_='.browser.TinyMCEBrowserView', permission='zope2.View'):
browser.page(attribute='jsonLinkableFolderListing', name='tinymce-jsonlinkablefolderlisting')
browser.page(attribute='jsonImageFolderListing', name='tinymce-jsonimagefolderlisting')
browser.page(attribute='jsonLinkableSearch', name='tinymce-jsonlinkablesearch')
browser.page(attribute='jsonImageSearch', name='tinymce-jsonimagesearch')
browser.page(attribute='jsonDetails', name='tinymce-jsondetails')
browser.page(attribute='jsonConfiguration', name='tinymce-jsonconfiguration')
with browser.pages__cm(for_='*', class_='.browser.TinyMCEBrowserView', permission='cmf.ModifyPortalContent'):
browser.page(attribute='save', name='tinymce-save')
browser.page(attribute='setDescription', name='tinymce-setDescription')
with browser.pages__cm(for_='*', class_='.browser.TinyMCEBrowserView', permission='cmf.AddPortalContent'):
browser.page(attribute='upload', name='tinymce-upload')
browser.resourceDirectory(name='tinymce.images', directory='images')
browser.resourceDirectory(name='tinymce.stylesheets', directory='stylesheets')
if config.eval_condition('installed Products.Archetypes'):
browser.view(name='content_anchors', for_='Products.Archetypes.interfaces.IBaseObject', class_='.atanchors.ATAnchorView', permission='zope2.View')
if config.eval_condition('installed plone.dexterity'):
browser.view(name='content_anchors', for_='plone.dexterity.interfaces.IDexterityContent', class_='.dxanchors.DexterityAnchorView', permission='zope2.View')
# TinyMCE configuration
# <browser:viewlet
# name="tinymce.configuration"
# manager="plone.app.layout.viewlets.interfaces.IHtmlHead"
# class=".browser.ConfigurationViewlet"
# permission="zope2.View"
# />
# ----------------------------------------------------
# Products/TinyMCE/adapters/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
browser = config.get_namespace('http://namespaces.zope.org/browser')
with zope.configure__cm(i18n_domain='tinymce'):
zope.adapter(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', factory='.JSONDetails.JSONDetails')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='.interfaces.JSONDetails.IJSONDetails', factory='.JSONDetails.JSONDetails')
zope.adapter(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='.interfaces.JSONFolderListing.IJSONFolderListing', factory='.JSONFolderListing.JSONFolderListing')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='.interfaces.JSONFolderListing.IJSONFolderListing', factory='.JSONFolderListing.JSONFolderListing')
zope.adapter(for_='Products.CMFPlone.interfaces.IPloneSiteRoot', provides='.interfaces.Upload.IUpload', factory='.Upload.Upload')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='.interfaces.Upload.IUpload', factory='.Upload.Upload')
zope.adapter(for_='Products.CMFCore.interfaces.IContentish', provides='.interfaces.Save.ISave', factory='.Save.Save')
zope.adapter(for_='Products.CMFCore.interfaces.IFolderish', provides='.interfaces.JSONSearch.IJSONSearch', factory='.JSONSearch.JSONSearch')
# Caching adapter
zope.adapter(factory='.caching.TinyMCEResourceLookup')
# ----------------------------------------------------
# Products/TinyMCE/profiles.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
with zope.configure__cm(i18n_domain='tinymce'):
genericsetup.registerProfile(name='TinyMCE', title='TinyMCE Editor Support', directory='profiles/default', description='Adds the TinyMCE editor to the site.', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.registerProfile(name='upgrade_10_to_11', title='Upgrade TinyMCE 1.0 to 1.1', directory='profiles/upgrade_10_to_11', description='Upgrades the TinyMCE editor from version 1.0 to 1.1', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot')
genericsetup.registerProfile(name='upgrade_12_to_13', title='Upgrade TinyMCE 1.2 to 1.3', directory='profiles/upgrade_12_to_13', description='Upgrades the TinyMCE editor from version 1.2 to 1.3', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot')
genericsetup.registerProfile(name='upgrade_to_profile_5', title='Upgrade TinyMCE 1.3b6 to 1.3b7', directory='profiles/upgrade_to_profile_5', description='Upgrades the TinyMCE editor from version 1.3b6 to 1.3b7', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot')
genericsetup.registerProfile(name='upgrade_to_profile_6', title='Upgrade TinyMCE 1.3b7 to 1.3b8', directory='profiles/upgrade_to_profile_6', description='Upgrades the TinyMCE editor from version 1.3b7 to 1.3b8', provides='Products.GenericSetup.interfaces.EXTENSION', for_='Products.CMFPlone.interfaces.IMigratingPloneSiteRoot')
genericsetup.registerProfile(name='uninstall', title='Remove TinyMCE Editor Support', directory='profiles/uninstall', description='Removes the TinyMCE editor from the site.', provides='Products.GenericSetup.interfaces.EXTENSION')
genericsetup.upgradeStep(title='Upgrade TinyMCE', description='Upgrade TinyMCE 1.0 to 1.1', source='1.0', destination='1.1', handler='.upgrades.upgrade_10_to_11', sortkey='10', profile='Products.TinyMCE:TinyMCE')
genericsetup.upgradeStep(title='Upgrade TinyMCE', description='Upgrade TinyMCE 1.2.x to 1.3', source='3', destination='4', handler='.upgrades.upgrade_12_to_13', sortkey='15', profile='Products.TinyMCE:TinyMCE')
genericsetup.upgradeStep(title='Upgrade TinyMCE 1.3b6 to 1.3b7', description='This changes how the TinyMCE resources are registered to improve cachability.', source='4', destination='5', profile='Products.TinyMCE:TinyMCE', handler='.upgrades.upgrade_to_profile_5')
genericsetup.upgradeStep(title='Upgrade TinyMCE 1.3b7 to 1.3b8', description='This changes how the TinyMCE resources are registered to improve cachability.', source='5', destination='6', profile='Products.TinyMCE:TinyMCE', handler='.upgrades.upgrade_to_profile_6')
genericsetup.upgradeStep(title='Upgrade TinyMCE 1.3.4 to 1.3.5', description='Remove space from style to prevent bogus class', source='6', destination='7', profile='Products.TinyMCE:TinyMCE', handler='.upgrades.upgrade_to_profile_7')
genericsetup.upgradeStep(title='Install plone.outputfilters', description='This replaces the old TinyMCE-specific resolveuid and captioning transform.', source='1.1', destination='2', handler='.upgrades.upgrade_11_to_2', profile='Products.TinyMCE:TinyMCE')
with genericsetup.importStep__cm(name='tinymce_various', title='TinyMCE plug-in installation', description='Import various Products.TinyMCE', handler='Products.TinyMCE.setuphandlers.importVarious'):
zope.depends(name='componentregistry')
with genericsetup.importStep__cm(name='tinymce_settings', title='TinyMCE Settings', description='Import Product.TinyMCE settings', handler='Products.TinyMCE.exportimport.importTinyMCESettings'):
zope.depends(name='componentregistry')
genericsetup.exportStep(name='tinymce_settings', title='TinyMCE Settings', description='Export Product.TinyMCE settings', handler='Products.TinyMCE.exportimport.exportTinyMCESettings')
# ----------------------------------------------------
# Products/contentmigration/configure.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.configure(i18n_domain='Products.contentmigration')
# ----------------------------------------------------
# Products/CMFCore/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.include(package='five.localsitemanager', file='overrides.zcml')
# ----------------------------------------------------
# five/localsitemanager/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
browser.page(for_='OFS.interfaces.IObjectManager', name='components.html', class_='.browser.ObjectManagerSiteView', template='components.pt', permission='five.ManageSite')
# ----------------------------------------------------
# Products/CMFPlone/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
genericsetup = config.get_namespace('http://namespaces.zope.org/genericsetup')
zcml = config.get_namespace('http://namespaces.zope.org/zcml')
with zope.configure__cm(i18n_domain='plone'):
zope.include(package='Products.CMFCore', file='overrides.zcml')
zope.include(package='Products.PlacelessTranslationService', file='overrides.zcml')
zope.include(package='plone.app.form', file='overrides.zcml')
zope.include(package='plone.app.portlets', file='overrides.zcml')
zope.utility(provides='Products.PageTemplates.interfaces.IUnicodeEncodingConflictResolver', component='Products.CMFPlone.unicodeconflictresolver.UTF8EncodingConflictResolver')
# include plone plugins with z3c.autoinclude
if config.eval_condition('not-have disable-autoinclude'):
zope.includePluginsOverrides(package='plone', file='overrides.zcml')
# ----------------------------------------------------
# Products/PlacelessTranslationService/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(for_='zope.publisher.interfaces.http.IHTTPRequest', provides='zope.i18n.interfaces.IUserPreferredLanguages', factory='Products.PlacelessTranslationService.Negotiator.PTSLanguages')
# ----------------------------------------------------
# plone/app/form/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
browser = config.get_namespace('http://namespaces.zope.org/browser')
zope.include(package='.widgets', file='overrides.zcml')
zope.view(type='zope.publisher.interfaces.browser.IBrowserRequest', for_='zope.formlib.interfaces.IWidgetInputError', provides='zope.formlib.interfaces.IWidgetInputErrorView', factory='.exception.WidgetInputErrorView', permission='zope.Public')
zope.adapter(for_='zope.formlib.interfaces.IAction', factory='plone.app.form.render_submit_button', name='render', provides='zope.formlib.namedtemplate.INamedTemplate')
zope.adapter(for_='zope.formlib.interfaces.IPageForm', factory='plone.app.form.default_named_template_adapter', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
zope.adapter(for_='zope.formlib.interfaces.ISubPageForm', factory='plone.app.form.default_subpage_template', name='default', provides='zope.formlib.namedtemplate.INamedTemplate')
# ----------------------------------------------------
# plone/app/form/widgets/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
five = config.get_namespace('http://namespaces.zope.org/five')
browser = config.get_namespace('http://namespaces.zope.org/browser')
# Edit widgets
zope.view(type='zope.publisher.interfaces.browser.IBrowserRequest', for_='zope.schema.interfaces.IBool', provides='zope.formlib.interfaces.IInputWidget', factory='.CheckBoxWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.ITuple zope.schema.interfaces.IField zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.TupleSequenceWidget', permission='zope.Public')
zope.adapter(for_='zope.schema.interfaces.IList zope.schema.interfaces.IField zope.publisher.interfaces.browser.IBrowserRequest', provides='zope.formlib.interfaces.ISimpleInputWidget', factory='.ListSequenceWidget', permission='zope.Public')
# ----------------------------------------------------
# plone/app/portlets/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.adapter(factory='.assignable.localPortletAssignmentMappingAdapter')
zope.adapter(factory='.manager.PortletManagerRenderer', provides='plone.portlets.interfaces.IPortletManagerRenderer')
# ----------------------------------------------------
# plone/z3cform/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
# This file is no longer necessary, but left here in case people
# reference it
#
# ----------------------------------------------------
# plone/app/z3cform/overrides.zcml
# ----------------------------------------------------
def includeme(config):
zope = config.get_namespace('http://namespaces.zope.org/zope')
zope.includeOverrides(package='plone.z3cform', file='overrides.zcml')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment