[Zope3-checkins]
SVN: Zope3/branches/philikon-simplify-skinning/src/zope/app/
Convert skins and layers that didn't have interface
equivalents yet to the new
Philipp von Weitershausen
philikon at philikon.de
Sun Feb 19 04:50:11 EST 2006
Log message for revision 41679:
Convert skins and layers that didn't have interface equivalents yet to the new
system.
Changed:
UU Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/__init__.py
U Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/configure.zcml
UU Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/__init__.py
U Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/configure.zcml
U Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/__init__.py
U Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/configure.zcml
-=-
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/__init__.py
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/__init__.py 2006-02-18 20:59:24 UTC (rev 41678)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/__init__.py 2006-02-19 09:50:10 UTC (rev 41679)
@@ -1,2 +1,23 @@
+##############################################################################
#
-# This file is necessary to make this directory a package.
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Basic skin
+
+$Id$
+"""
+__docformat__ = 'restructuredtext'
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+
+class IBasicSkin(IDefaultBrowserLayer):
+ """Basic skin that simply only contains the default layer and
+ nothing else"""
Property changes on: Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/configure.zcml
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/configure.zcml 2006-02-18 20:59:24 UTC (rev 41678)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/basicskin/configure.zcml 2006-02-19 09:50:10 UTC (rev 41679)
@@ -2,7 +2,11 @@
xmlns:zope="http://namespaces.zope.org/zope"
xmlns="http://namespaces.zope.org/browser">
- <skin name="Basic" layers="default" />
+ <zope:interface
+ interface=".IBasicSkin"
+ type="zope.publisher.interfaces.browser.IBrowserSkinType"
+ name="Basic"
+ />
<page
name="standard_macros"
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/__init__.py
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/__init__.py 2006-02-18 20:59:24 UTC (rev 41678)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/__init__.py 2006-02-19 09:50:10 UTC (rev 41679)
@@ -1 +1,27 @@
-# Make this directory a package.
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Debug skin
+
+$Id$
+"""
+__docformat__ = 'restructuredtext'
+from zope.publisher.interfaces.browser import IBrowserRequest
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+from zope.app.rotterdam import rotterdam
+
+class IDebugLayer(IBrowserRequest):
+ """Layer that we can register debug views with."""
+
+class IDebugSkin(IDebugLayer, rotterdam, IDefaultBrowserLayer):
+ """Rotterdam-based skin with debug functionality"""
Property changes on: Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/__init__.py
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/configure.zcml
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/configure.zcml 2006-02-18 20:59:24 UTC (rev 41678)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/debugskin/configure.zcml 2006-02-19 09:50:10 UTC (rev 41679)
@@ -1,17 +1,26 @@
-<configure xmlns="http://namespaces.zope.org/browser">
+<configure
+ xmlns="http://namespaces.zope.org/browser"
+ xmlns:zope="http://namespaces.zope.org/zope"
+ >
- <layer name="debug" />
- <skin
- name="Debug"
- layers="debug zope.app.rotterdam.rotterdam default" />
+ <layer
+ interface=".IDebugLayer"
+ name="debug"
+ />
+ <zope:interface
+ interface=".IDebugSkin"
+ type="zope.publisher.interfaces.browser.IBrowserSkinType"
+ name="Debug"
+ />
+
<page
for="zope.security.interfaces.IUnauthorized"
name="index.html"
permission="zope.Public"
template="unauthorized.pt"
class="zope.app.exception.browser.unauthorized.Unauthorized"
- layer="debug"
+ layer=".IDebugLayer"
/>
<page
@@ -20,7 +29,7 @@
for="zope.interface.common.interfaces.IException"
class=".exceptions.ExceptionDebugView"
permission="zope.Public"
- layer="debug"
+ layer=".IDebugLayer"
/>
<!-- Need to repeat for NotFound to override default view -->
@@ -33,8 +42,7 @@
for="zope.publisher.interfaces.INotFound"
class=".exceptions.ExceptionDebugView"
permission="zope.Public"
- layer="debug"
+ layer=".IDebugLayer"
/>
-
</configure>
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/__init__.py
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/__init__.py 2006-02-18 20:59:24 UTC (rev 41678)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/__init__.py 2006-02-19 09:50:10 UTC (rev 41679)
@@ -15,13 +15,25 @@
$Id$
"""
+__docformat__ = 'restructuredtext'
+from zope.publisher.interfaces.browser import IBrowserRequest
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+from zope.app.rotterdam import rotterdam
+
from zope.app import zapi
from zope.app.publisher.browser import BrowserView
from zope.app.tree.interfaces import ITreeStateEncoder
from zope.app.tree.node import Node
+class IStaticTreeLayer(IBrowserRequest):
+ """Layer that we can register our own navigation macro for."""
+
+class IStaticTreeSkin(IStaticTreeLayer, rotterdam, IDefaultBrowserLayer):
+ """Skin based on Rotterdam that includes the static tree
+ navigation macro."""
+
class StatefulTreeView(BrowserView):
def statefulTree(self, root=None, filter=None, tree_state=None):
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/configure.zcml
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/configure.zcml 2006-02-18 20:59:24 UTC (rev 41678)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/tree/browser/configure.zcml 2006-02-19 09:50:10 UTC (rev 41679)
@@ -40,17 +40,22 @@
</browser:pages>
<!-- Set up the 'StaticTree' skin -->
- <browser:layer name="statictree" />
+ <browser:layer
+ interface=".IStaticTreeLayer"
+ name="statictree"
+ />
- <browser:skin
+ <interface
+ interface=".IStaticTreeSkin"
+ type="zope.publisher.interfaces.browser.IBrowserSkinType"
name="StaticTree"
- layers="statictree zope.app.rotterdam.rotterdam default"
/>
+
<browser:page
for="*"
name="navigation_macros"
permission="zope.View"
- layer="statictree"
+ layer=".IStaticTreeLayer"
template="navigation_macros.pt"
/>
More information about the Zope3-Checkins
mailing list