[Checkins] SVN: zam.api/trunk/ Implemented better management views, now we are able to use forms which can be used as add forms for plugins.

Roger Ineichen roger at projekt01.ch
Sun Mar 2 09:02:17 EST 2008


Log message for revision 84398:
  Implemented better management views, now we are able to use forms which can be used as add forms for plugins.
  Changed layer concept, it's possible to define new skins and only use selective zamplugin.* layers
  Added notes about the new layer concept, any better idea is very welcome here, see notes in README.txt
  Cleanup
  
  srichter, now we can use forms for plugin management

Changed:
  U   zam.api/trunk/CHANGES.txt
  U   zam.api/trunk/src/zam/api/README.txt
  U   zam.api/trunk/src/zam/api/breadcrumb.py
  U   zam.api/trunk/src/zam/api/browser/README.txt
  U   zam.api/trunk/src/zam/api/browser/configure.zcml
  U   zam.api/trunk/src/zam/api/browser/plugin.py
  U   zam.api/trunk/src/zam/api/browser/plugins.pt
  U   zam.api/trunk/src/zam/api/browser/tests/__init__.py
  U   zam.api/trunk/src/zam/api/browser/tests/ftesting.zcml
  U   zam.api/trunk/src/zam/api/interfaces.py
  U   zam.api/trunk/src/zam/api/layer.py
  U   zam.api/trunk/src/zam/api/layer.zcml
  U   zam.api/trunk/src/zam/api/menu.zcml
  U   zam.api/trunk/src/zam/api/menuitem.zcml

-=-
Modified: zam.api/trunk/CHANGES.txt
===================================================================
--- zam.api/trunk/CHANGES.txt	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/CHANGES.txt	2008-03-02 14:02:16 UTC (rev 84398)
@@ -5,4 +5,9 @@
 Version 0.5.0 (unreleased)
 --------------------------
 
+- Now plugin provide it's own management form. By default the PluginManagement
+  page can be used which is a mixin of IContentProvider and IForm. This makes 
+  itpossible to write intelligent plugin management views whihc can do more 
+  then just install and uninstall.
+
 - Initial Release

Modified: zam.api/trunk/src/zam/api/README.txt
===================================================================
--- zam.api/trunk/src/zam/api/README.txt	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/README.txt	2008-03-02 14:02:16 UTC (rev 84398)
@@ -152,3 +152,82 @@
   False
   >>> len(sm.__bases__)
   1
+
+
+Layers
+------
+
+We offer a fine graind layer concept which allows you to use the ZAM skin
+out of the box or you can define your own skins offering what you need.
+Each ZAM plugin should configure it's component for the IZAMBrwoserLayer and
+not for the IZAMCoreLayer. This allows others to use the IZAMCoreLayer without
+any plugin configuration. See the different layer descriptions below for more 
+information about the ZAM layer concept.
+
+
+Big note
+~~~~~~~~
+
+This is only important if you like to define a own skin which uses 
+selective zam plugins.
+
+The layer concept has some limitations if it comes to the adapter lookup. It's 
+not possible to define a custom layer and make an existing layer act like it
+whould inherit this layer. Implements and provide concept only work on classes 
+but not on interfaces. Let's be correct, they work but doesn't affet the 
+request. Which means the request doesn't know about such applied layers. This 
+means there is no[*] way to apply an later defined layer to an existing layer. 
+This is there reason why we offer all plugin layer in the zam.api.layer package.
+But what does this mean if you like to define custom plugins and their layers? 
+You have to define your own skin and inherit your new layers in this skin. 
+You can skip the named skin configuration and configure your custom skin.
+
+[*] Ok, there is a way to apply layers to an existing layer or at least it will
+do the same effect. There are two ways, you can add a SkinChangedEvent which
+will do a alsoProvide and inject your layer or you can use a before traversal
+event subscriber which does the same. I decided not using this patterns here
+as default because such subscriber will affect every skin and will cost 
+processing time on every request. The option we have with defining an explicit
+configuration for a custom skin is to small to pay that price.
+
+
+IZAMCoreLayer
+~~~~~~~~~~~~~
+
+The core layer provides the ZAM core management views but no plugins and 
+skin configuration. This allows us to write skins with a selective choice
+of plugins. Of corse we each plugin must be configured again for your
+cusotm skin. There is no way to offer out of the box a working set wihtout
+to configure a plugin twice using two different layers.
+
+
+IZAMPluginLayer
+~~~~~~~~~~~~~~~
+
+The zam plugin layer should be used in plugins. Configure all component which
+need a layer with this layer. The IZAMBrowserSkin will use this layer and
+offer all configuration of a zam plugin. This layer allows you too to 
+use the zam plugin configuration without the skin.
+
+
+IZAMBrowserLayer
+~~~~~~~~~~~~~~~~
+
+This is the "all in one" layer which can be used for build skins which knows
+about all plugin configurations. All plugin should use this layer.
+
+
+IZAMSkinLayer
+~~~~~~~~~~~~~
+
+The IZAMSkinLayer offers the UI part for ZAM but is not registered as skin.
+You can use this layer as base if you like to develope a custom skin. This 
+layer contains the nested div menu implementation.
+
+
+IZAMBrowserSkin
+~~~~~~~~~~~~~~~
+
+The IZAMBrowserSkin uses the IZAMSkinLayer and IZAMBrowserLayer and offers the 
+UI part for ZAM as named skin. This means the IZAMBrowserSkin is accessible 
+as ++skin++ZAM.

Modified: zam.api/trunk/src/zam/api/breadcrumb.py
===================================================================
--- zam.api/trunk/src/zam/api/breadcrumb.py	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/breadcrumb.py	2008-03-02 14:02:16 UTC (rev 84398)
@@ -26,7 +26,7 @@
     """Breadcrumbs implementation using IBreadcrum adapters."""
 
     zope.component.adapts(zope.location.interfaces.ILocation,
-        layer.IZAMBrowserLayer, zope.interface.Interface)
+        layer.IZAMCoreLayer, zope.interface.Interface)
 
     def __init__(self, context, request, view):
         self.context = context

Modified: zam.api/trunk/src/zam/api/browser/README.txt
===================================================================
--- zam.api/trunk/src/zam/api/browser/README.txt	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/browser/README.txt	2008-03-02 14:02:16 UTC (rev 84398)
@@ -65,42 +65,27 @@
   <meta http-equiv="pragma" content="no-cache" />
   </head>
   <body>
-  <form action="http://localhost/++skin++ZAMTest/first/plugins.html"
-        method="post" enctype="multipart/form-data"
-        class="edit-form" name="form" id="form">
+  <form action="./plugins.html" method="post" enctype="multipart/form-data" class="plugin-form">
+    <h1>ZAM Plugin Management</h1>
+    <fieldset id="pluginManagement">
+      <strong class="notInstalledPlugin">ZAM test plugin</strong>
+      <div class="description">ZAM test plugin.</div>
     <div class="viewspace">
         <div class="required-info">
            <span class="required">*</span>
            &ndash; required
         </div>
       <div>
-    <h1>ZAM Plugin Management</h1>
-    <fieldset>
-      <legend>
-        ZAM test plugin&nbsp;
-      (not installed)
-    </legend>
-    <br />
-    <div><p>ZAM test plugin.</p>
-  </div>
-    <br />
-    <span>install</span>
-    <input type="radio" class="radio-widget"
-           name="zam.api.testing" value="install">
-    <span>uninstall</span>
-    <input type="radio" class="radio-widget"
-           name="zam.api.testing" value="uninstall"
-           checked="checked">
-     </fieldset>
+      </div>
     </div>
-    </div>
     <div>
       <div class="buttons">
-        <input type="submit" id="form-buttons-apply"
-               name="form.buttons.apply"
-               class="submit-widget button-field" value="Apply" />
+        <input type="submit" id="zam-api-testing-buttons-install"
+         name="zam.api.testing.buttons.install"
+         class="submit-widget button-field" value="Install" />
       </div>
     </div>
+    </fieldset>
   </form>
   </body>
   </html>
@@ -124,30 +109,30 @@
 plugin:
 
   >>> manager.open(firstSiteURL + '/plugins.html')
-  >>> manager.getControl(name='zam.api.testing').value = ['install']
-  >>> manager.getControl('Apply').click()
+  >>> manager.getControl(name='zam.api.testing.buttons.install').click()
 
 Now we can see that the plugin is installed:
 
   >>> print manager.contents
   <!DOCTYPE...
-   <input type="radio" class="radio-widget"
-         name="zam.api.testing" value="install"
-         checked="checked">
+  <h1>ZAM Plugin Management</h1>
+  <fieldset id="pluginManagement">
+    <strong class="installedPlugin">ZAM test plugin</strong>
+    <div class="description">ZAM test plugin.</div>
+  <div class="viewspace">
   ...
-   <input type="radio" class="radio-widget"
-         name="zam.api.testing" value="uninstall">
+  <div>
+    <div class="buttons">
+      <input type="submit" id="zam-api-testing-buttons-uninstall"
+       name="zam.api.testing.buttons.uninstall"
+       class="submit-widget button-field" value="Uninstall" />
+    </div>
+  </div>
   ...
 
-Now make test coverage happy and test to install a alreay installed
-plugin:
+Now make test coverage happy and test different things. The zam plugin test 
+page is available at the ``first`` site
 
-  >>> manager.open(firstSiteURL + '/plugins.html')
-  >>> manager.getControl(name='zam.api.testing').value = ['install']
-  >>> manager.getControl('Apply').click()
-
-And the zam plugin test page is available at the ``first`` site
-
   >>> manager.open(firstSiteURL + '/test.html')
   >>> manager.url
   'http://localhost/++skin++ZAMTest/first/test.html'
@@ -162,8 +147,7 @@
 Let's unsinstall the plugin:
 
   >>> manager.open(firstSiteURL + '/plugins.html')
-  >>> manager.getControl(name='zam.api.testing').value = ['uninstall']
-  >>> manager.getControl('Apply').click()
+  >>> manager.getControl(name='zam.api.testing.buttons.uninstall').click()
 
 And check if the site is not available anymore:
 
@@ -171,10 +155,3 @@
   Traceback (most recent call last):
   ...
   NotFound: Object: <ZAMTestSite u'first'>, name: u'test.html'
-
-Now make test coverage happy and test to uninstall a alreay uninstalled
-plugin:
-
-  >>> manager.open(firstSiteURL + '/plugins.html')
-  >>> manager.getControl(name='zam.api.testing').value = ['uninstall']
-  >>> manager.getControl('Apply').click()

Modified: zam.api/trunk/src/zam/api/browser/configure.zcml
===================================================================
--- zam.api/trunk/src/zam/api/browser/configure.zcml	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/browser/configure.zcml	2008-03-02 14:02:16 UTC (rev 84398)
@@ -8,14 +8,14 @@
       name="plugins.html"
       for="zope.location.interfaces.ISite"
       class=".plugin.PluginsPage"
-      layer="zam.api.layer.IZAMBrowserLayer"
+      layer="zam.api.layer.IZAMCoreLayer"
       permission="zope.ManageSite"
       />
 
   <z3c:template
       template="plugins.pt"
       for=".plugin.PluginsPage"
-      layer="zam.api.layer.IZAMBrowserLayer"
+      layer="zam.api.layer.IZAMCoreLayer"
       />
 
 </configure>

Modified: zam.api/trunk/src/zam/api/browser/plugin.py
===================================================================
--- zam.api/trunk/src/zam/api/browser/plugin.py	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/browser/plugin.py	2008-03-02 14:02:16 UTC (rev 84398)
@@ -16,6 +16,9 @@
 """
 __docformat__ = "reStructuredText"
 
+import base64
+import binascii
+
 import zope.component
 import zope.interface
 from zope.publisher.interfaces import NotFound
@@ -36,35 +39,92 @@
     return rest.ReStructuredTextToHTMLRenderer(text, request).render()
 
 
-class PluginsPage(form.Form):
+def showInstall(form):
+    if form.isInstalled:
+        return False
+    return True
+
+def showUnInstall(form):
+    if form.isInstalled:
+        return True
+    return False
+    
+
+class PluginManagement(form.Form):
+    """Single plugin management form."""
+
+    zope.interface.implements(interfaces.IPluginManagement)
+
+    template = getPageTemplate('subform')
+    _prefix = 'will_be_set_by_parent'
+
+    installedCSS = 'installedPlugin'
+    notInstalledCSS = 'notInstalledPlugin'
+
+    installMessage = _('Plugin status successfully installed.')
+    uninstallMessage = _('Plugin status successfully un-installed.')
+
+    def __init__(self, context, request, site):
+        super(PluginManagement, self).__init__(context, request)
+        self.site = site
+
+    @apply
+    def prefix():
+        # parent page will set the prefix for each plugin form
+        def get(self):
+            return self._prefix
+        def set(self, prefix):
+            # base registry (utility) names are unicode
+            prefix = prefix.encode('utf-8')
+            self._prefix = prefix
+        return property(get, set)
+
+    @property
+    def title(self):
+        return self.context.title
+
+    @property
+    def description(self):
+        return self.context.description
+
+    @property
+    def isInstalled(self):
+        return self.context.isInstalled(self.site)
+
+    @property
+    def statusCSS(self):
+        return self.isInstalled and self.installedCSS or self.notInstalledCSS
+
+    @button.buttonAndHandler(_('Install'), name='install',
+        condition=showInstall)
+    def handleInstall(self, action):
+        self.context.install(self.site)
+        self.status = self.installMessage
+        self.request.response.redirect(self.request.getURL())
+        return u''
+
+    @button.buttonAndHandler(_('Uninstall'), name='uninstall',  
+        condition=showUnInstall)
+    def handleUnInstall(self, action):
+        self.context.uninstall(self.site)
+        self.status = self.uninstallMessage
+        self.request.response.redirect(self.request.getURL())
+        return u''
+
+
+class PluginsPage(browser.BrowserPagelet):
     """Plugin management page."""
 
     template = getPageTemplate()
 
-    successMessage = _('Plugins status successfully changed.')
-    NoChangesMessage = _('No plugin status get changed.')
-
-    def plugins(self):
+    def pluginForms(self):
+        forms = []
         for name, plugin in zope.component.getUtilitiesFor(interfaces.IPlugin):
-            yield {
-                'name': name,
-                'title': plugin.title,
-                'description': render(plugin.description, self.request),
-                'isInstalled': plugin.isInstalled(self.context)
-                }
-
-    @button.buttonAndHandler(_('Apply'), name='apply')
-    def handleApply(self, action):
-        changed = False
-        for name, plugin in zope.component.getUtilitiesFor(interfaces.IPlugin):
-            action = self.request.get(name)
-            if action == 'uninstall' and plugin.isInstalled(self.context):
-                plugin.uninstall(self.context)
-                changed = True
-            elif action == 'install' and not plugin.isInstalled(self.context):
-                plugin.install(self.context)
-                changed = True
-        if changed:
-            self.status = self.successMessage
-        else:
-            self.status = self.NoChangesMessage
+            pluginForm = zope.component.queryMultiAdapter(
+                (plugin, self.request, self.context),
+                interface=interfaces.IPluginManagement)
+            if pluginForm is not None:
+                pluginForm.prefix = name
+                pluginForm.update()
+                forms.append(pluginForm)
+        return forms

Modified: zam.api/trunk/src/zam/api/browser/plugins.pt
===================================================================
--- zam.api/trunk/src/zam/api/browser/plugins.pt	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/browser/plugins.pt	2008-03-02 14:02:16 UTC (rev 84398)
@@ -1,33 +1,13 @@
-<div metal:use-macro="macro:form">
-  <div metal:fill-slot="main">
+<form action="./plugins.html" method="post" enctype="multipart/form-data" class="plugin-form">
   <h1 i18n:translate="">ZAM Plugin Management</h1>
-  <fieldset tal:repeat="plugin view/plugins">
-    <legend>
-      <tal:block content="plugin/title">Plugin Title</tal:block>&nbsp;
-	  <tal:block condition="plugin/isInstalled" i18n:translate="">(installed)</tal:block>
-	  <tal:block condition="not:plugin/isInstalled" i18n:translate="">(not installed)</tal:block>
-	</legend>
-	<br />
-    <div tal:content="structure plugin/description">
-      Describes the plugin in detail.
+  <fieldset id="pluginManagement" tal:repeat="plugin view/pluginForms">
+    <strong class="title" tal:content="structure plugin/title"
+         tal:attributes="class plugin/statusCSS">
+      title
+    </strong>
+    <div class="description" tal:content="structure plugin/description">
+      desription
     </div>
-	<br />
-	<span i18n:translate="">install</span>
-	<input type="radio" class="radio-widget" name="" value="install" checked="checked"
-           tal:condition="plugin/isInstalled"
-           tal:attributes="name plugin/name">
-	<input type="radio" class="radio-widget" name="" value="install"
-           tal:condition="not:plugin/isInstalled"
-           tal:attributes="name plugin/name">
-	<span i18n:translate="">uninstall</span>
-	<input type="radio" class="radio-widget" name="" value="uninstall" checked="checked"
-           tal:condition="not:plugin/isInstalled"
-           tal:attributes="name plugin/name">
-	<input type="radio" class="radio-widget" name="" value="uninstall"
-           tal:condition="plugin/isInstalled"
-           tal:attributes="name plugin/name">
+    <tal:block content="structure plugin/render" />
   </fieldset>
-
-  </div>
-</div>
-
+</form>

Modified: zam.api/trunk/src/zam/api/browser/tests/__init__.py
===================================================================
--- zam.api/trunk/src/zam/api/browser/tests/__init__.py	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/browser/tests/__init__.py	2008-03-02 14:02:16 UTC (rev 84398)
@@ -15,14 +15,20 @@
 $Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
 """
 
+from zope.publisher.interfaces.browser import IBrowserRequest
+
 from z3c.pagelet import browser
 import zam.api.layer
 
 
-class IZAMTestBrowserSkin(zam.api.layer.IZAMBrowserLayer):
-    """The ``ZAMTest`` browser skin."""
+class IZAMTestPluginLayer(IBrowserRequest):
+    """test plugin layer."""
 
 
+class IZAMTestBrowserSkin(zam.api.layer.IZAMBrowserLayer, IZAMTestPluginLayer):
+    """The ``ZAMTest`` browser skin including test plugin layer."""
+
+
 class TestPage(browser.BrowserPagelet):
     """Test page."""
 

Modified: zam.api/trunk/src/zam/api/browser/tests/ftesting.zcml
===================================================================
--- zam.api/trunk/src/zam/api/browser/tests/ftesting.zcml	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/browser/tests/ftesting.zcml	2008-03-02 14:02:16 UTC (rev 84398)
@@ -21,6 +21,14 @@
       name="zam.api.testing"
       />
 
+  <!-- plugin management for NavigationPlugin -->
+  <adapter
+      factory="zam.api.browser.plugin.PluginManagement"
+      for="zam.api.testing.ZAMTestPlugin
+           zam.api.browser.tests.IZAMTestPluginLayer
+           zope.app.component.interfaces.ISite"
+      provides="zam.api.interfaces.IPluginManagement"
+      />
 
   <!-- setup test skin -->
   <interface

Modified: zam.api/trunk/src/zam/api/interfaces.py
===================================================================
--- zam.api/trunk/src/zam/api/interfaces.py	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/interfaces.py	2008-03-02 14:02:16 UTC (rev 84398)
@@ -18,6 +18,7 @@
 import zope.interface
 import zope.component
 import zope.schema
+from zope.contentprovider.interfaces import IContentProvider
 
 from zam.api.i18n import MessageFactory as _
 
@@ -60,6 +61,10 @@
         required=True)
 
 
+class IPluginManagement(IContentProvider):
+    """Plugin management content provider."""
+
+
 # selected menu marker for pages
 class IRootMenuItemPage(zope.interface.Interface):
     """Containment root page marker."""

Modified: zam.api/trunk/src/zam/api/layer.py
===================================================================
--- zam.api/trunk/src/zam/api/layer.py	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/layer.py	2008-03-02 14:02:16 UTC (rev 84398)
@@ -16,14 +16,44 @@
 """
 
 from zope.viewlet.interfaces import IViewletManager
+from zope.publisher.interfaces.browser import IBrowserRequest
+
 from z3c.menu.ready2go import interfaces
 import z3c.layer.ready2go
 
 
-class IZAMBrowserLayer(z3c.layer.ready2go.IReady2GoBrowserLayer):
-    """Secure browser layer used for ZAM."""
+# this plugin layers allows us to use the zam plugin configuration without
+# to make the skin depend on the plugins.
+class IControlPluginLayer(IBrowserRequest):
+    """Plugin layer offered for zamplugin.control package."""
 
+class IErrorPluginLayer(IBrowserRequest):
+    """Plugin layer offered for zamplugin.error package."""
 
+class INavigationPluginLayer(IBrowserRequest):
+    """Plugin layer offered for zamplugin.navigation package."""
+
+class ISampleDataPluginLayer(IBrowserRequest):
+    """Plugin layer offered for zamplugin.sampledata package."""
+
+class ISiteManagerPluginLayer(IBrowserRequest):
+    """Plugin layer offered for zamplugin.sitemanager package."""
+
+
+# ZAM core Layer
+class IZAMCoreLayer(z3c.layer.ready2go.IReady2GoBrowserLayer):
+    """ZAM browser layer without any plugin configuration."""
+
+
+class IZAMPluginLayer(IControlPluginLayer, IErrorPluginLayer,
+    INavigationPluginLayer, ISampleDataPluginLayer, ISiteManagerPluginLayer):
+    """Plugin layer offered for zamplugin configuration."""
+
+
+class IZAMBrowserLayer(IZAMPluginLayer, IZAMCoreLayer):
+    """ZAM browser layer including ``all in one`` configuration."""
+
+
 # ZAM viewlet manager
 class ICSS(IViewletManager):
     """CSS viewlet manager."""

Modified: zam.api/trunk/src/zam/api/layer.zcml
===================================================================
--- zam.api/trunk/src/zam/api/layer.zcml	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/layer.zcml	2008-03-02 14:02:16 UTC (rev 84398)
@@ -5,6 +5,11 @@
     i18n_domain="zam">
 
   <interface
+      interface="zam.api.layer.IZAMCoreLayer"
+      type="zope.publisher.interfaces.browser.IBrowserSkinType"
+      />
+
+  <interface
       interface="zam.api.layer.IZAMBrowserLayer"
       type="zope.publisher.interfaces.browser.IBrowserSkinType"
       />

Modified: zam.api/trunk/src/zam/api/menu.zcml
===================================================================
--- zam.api/trunk/src/zam/api/menu.zcml	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/menu.zcml	2008-03-02 14:02:16 UTC (rev 84398)
@@ -10,7 +10,7 @@
         class=".manager.MenuManager"
         provides="zam.api.menu.IAddMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -19,7 +19,7 @@
         class=".manager.MenuManager"
         provides="zam.api.menu.IGlobalMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -28,7 +28,7 @@
         class=".manager.MenuManager"
         provides="zam.api.menu.ISiteMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -37,7 +37,7 @@
         class=".manager.MenuManager"
         provides="zam.api.menu.IContextMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -49,7 +49,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IAddMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -58,7 +58,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IGlobalMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -67,7 +67,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.ISiteMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -76,7 +76,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IContextMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -88,7 +88,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IAddMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -97,7 +97,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IGlobalMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -106,7 +106,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.ISiteMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -115,7 +115,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IContextMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -127,7 +127,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IAddMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -136,7 +136,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IGlobalMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -145,7 +145,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.ISiteMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -154,7 +154,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IContextMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 
@@ -166,7 +166,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IAddMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -175,7 +175,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IGlobalMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -184,7 +184,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.ISiteMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
     <viewletManager
@@ -193,7 +193,7 @@
         class=".manager.EmptyMenuManager"
         provides="zam.api.menu.IContextMenu"
         template="menu.pt"
-        layer="zam.api.layer.IZAMBrowserLayer"
+        layer="zam.api.layer.IZAMCoreLayer"
         permission="zope.Public"
         />
 

Modified: zam.api/trunk/src/zam/api/menuitem.zcml
===================================================================
--- zam.api/trunk/src/zam/api/menuitem.zcml	2008-03-02 13:48:09 UTC (rev 84397)
+++ zam.api/trunk/src/zam/api/menuitem.zcml	2008-03-02 14:02:16 UTC (rev 84398)
@@ -8,7 +8,7 @@
       for="*"
       class=".menu.RootMenuItem"
       manager=".menu.IGlobalMenu"
-      layer=".layer.IZAMBrowserLayer"
+      layer=".layer.IZAMCoreLayer"
       permission="zope.ManageServices"
       />
 
@@ -17,7 +17,7 @@
       for="zope.location.interfaces.ISite"
       class=".menu.ZAMPluginsMenuItem"
       manager=".menu.ISiteMenu"
-      layer=".layer.IZAMBrowserLayer"
+      layer=".layer.IZAMCoreLayer"
       permission="zope.ManageServices"
       />
 



More information about the Checkins mailing list