Added configuration directives to remove static dependencies with ztfy.skin and zopyx.zxng3.core packages
--- a/src/ztfy/utils/browser/configure.zcml Wed May 07 19:04:14 2014 +0200
+++ b/src/ztfy/utils/browser/configure.zcml Sat May 10 11:15:34 2014 +0200
@@ -2,6 +2,7 @@
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:z3c="http://namespaces.zope.org/z3c"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="ztfy.i18n">
<!-- ZEO connection views -->
@@ -11,22 +12,24 @@
class="..zodb.ZEOConnectionUtility"
permission="zope.ManageServices" />
- <z3c:pagelet
- name="properties.html"
- for="..interfaces.IZEOConnection"
- class=".zodb.ZEOConnectionEditForm"
- layer="ztfy.skin.layer.IZTFYBrowserLayer"
- permission="ztfy.ViewManagementScreens" />
+ <configure zcml:condition="installed ztfy.skin">
+ <z3c:pagelet
+ name="properties.html"
+ for="..interfaces.IZEOConnection"
+ class=".zodb.ZEOConnectionEditForm"
+ layer="ztfy.skin.layer.IZTFYBrowserLayer"
+ permission="ztfy.ViewManagementScreens" />
- <browser:viewlet
- name="Properties"
- viewURL="@@properties.html"
- for="..interfaces.IZEOConnection"
- manager="ztfy.skin.viewlets.actions.interfaces.IActionsViewletManager"
- class="ztfy.skin.menu.PropertiesMenuItem"
- permission="ztfy.ViewManagementScreens"
- layer="ztfy.skin.layer.IZTFYBackLayer"
- weight="10" />
+ <browser:viewlet
+ name="Properties"
+ viewURL="@@properties.html"
+ for="..interfaces.IZEOConnection"
+ manager="ztfy.skin.viewlets.actions.interfaces.IActionsViewletManager"
+ class="ztfy.skin.menu.PropertiesMenuItem"
+ permission="ztfy.ViewManagementScreens"
+ layer="ztfy.skin.layer.IZTFYBackLayer"
+ weight="10" />
+ </configure>
<!-- Encoding selection widget -->
<adapter factory=".encoding.EncodingSelectFieldWidget" />
--- a/src/ztfy/utils/catalog/configure.zcml Wed May 07 19:04:14 2014 +0200
+++ b/src/ztfy/utils/catalog/configure.zcml Sat May 10 11:15:34 2014 +0200
@@ -1,16 +1,19 @@
<configure
xmlns="http://namespaces.zope.org/zope"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="ztfy.utils">
- <class class=".index.TextIndexNG">
- <require
- interface="zope.catalog.interfaces.IAttributeIndex
- zope.index.interfaces.IStatistics"
- set_schema="zope.catalog.interfaces.IAttributeIndex"
- permission="zope.ManageServices" />
- <require
- interface="zope.index.interfaces.IIndexSearch"
- permission="zope.View" />
- </class>
+ <configure zcml:condition="installed zopyx.txng3.core">
+ <class class=".index.TextIndexNG">
+ <require
+ interface="zope.catalog.interfaces.IAttributeIndex
+ zope.index.interfaces.IStatistics"
+ set_schema="zope.catalog.interfaces.IAttributeIndex"
+ permission="zope.ManageServices" />
+ <require
+ interface="zope.index.interfaces.IIndexSearch"
+ permission="zope.View" />
+ </class>
+ </configure>
</configure>