[Checkins] SVN: zam.skin/trunk/ - Move the existing index.html and contents.html page to index.zcml

Roger Ineichen roger at projekt01.ch
Tue Apr 15 20:37:57 EDT 2008


Log message for revision 85393:
  - Move the existing index.html and contents.html page to index.zcml
    This allows us to exclude them with the zc.configuration <exclude> directive
    Restrict the default index.html and contents.html to the IContainmentRoot
    this will avoid to adding such views on object which do not have such views.
  - Update CHANGES.txt
  - bump version for release

Changed:
  U   zam.skin/trunk/CHANGES.txt
  U   zam.skin/trunk/setup.py
  U   zam.skin/trunk/src/zam/skin/browser/__init__.py
  U   zam.skin/trunk/src/zam/skin/browser/configure.zcml
  A   zam.skin/trunk/src/zam/skin/browser/index.py
  A   zam.skin/trunk/src/zam/skin/browser/index.zcml

-=-
Modified: zam.skin/trunk/CHANGES.txt
===================================================================
--- zam.skin/trunk/CHANGES.txt	2008-04-16 00:29:36 UTC (rev 85392)
+++ zam.skin/trunk/CHANGES.txt	2008-04-16 00:37:56 UTC (rev 85393)
@@ -2,10 +2,13 @@
 CHANGES
 =======
 
-Version 0.5.2dev (unreleased)
---------------------------
+Version 0.5.2dev (2008-04-16)
+-----------------------------
 
-- ...
+- bugfix: Move the existing index.html and contents.html page to index.zcml
+  This allows us to exclude them with the zc.configuration <exclude> directive
+  Restrict the default index.html and contents.html to the IContainmentRoot
+  this will avoid to adding such views on object which do not have such views.
 
 Version 0.5.1 (2008-04-13)
 --------------------------

Modified: zam.skin/trunk/setup.py
===================================================================
--- zam.skin/trunk/setup.py	2008-04-16 00:29:36 UTC (rev 85392)
+++ zam.skin/trunk/setup.py	2008-04-16 00:37:56 UTC (rev 85393)
@@ -23,7 +23,7 @@
 
 setup (
     name='zam.skin',
-    version='0.5.2dev',
+    version='0.5.2',
     author = "Roger Ineichen and the Zope Community",
     author_email = "zope3-dev at zope.org",
     description = "Zope 3 Application Management skin",

Modified: zam.skin/trunk/src/zam/skin/browser/__init__.py
===================================================================
--- zam.skin/trunk/src/zam/skin/browser/__init__.py	2008-04-16 00:29:36 UTC (rev 85392)
+++ zam.skin/trunk/src/zam/skin/browser/__init__.py	2008-04-16 00:37:56 UTC (rev 85393)
@@ -24,17 +24,7 @@
 from zope.viewlet import viewlet
 from zope.app.component import hooks
 
-from z3c.pagelet import browser
 
-
-class IndexPage(browser.BrowserPagelet):
-    """Missing index.html page."""
-
-
-class NoneContentsPage(browser.BrowserPagelet):
-    """Missing contents.html page."""
-
-
 class SiteURL(BrowserPage):
 
     def __call__(self):

Modified: zam.skin/trunk/src/zam/skin/browser/configure.zcml
===================================================================
--- zam.skin/trunk/src/zam/skin/browser/configure.zcml	2008-04-16 00:29:36 UTC (rev 85392)
+++ zam.skin/trunk/src/zam/skin/browser/configure.zcml	2008-04-16 00:37:56 UTC (rev 85393)
@@ -158,32 +158,6 @@
       template="template.pt"
       />
 
-  <z3c:pagelet
-      for="*"
-      name="index.html"
-      permission="zope.ManageContent"
-      class=".IndexPage"
-      layer="zam.skin.layer.IZAMSkinLayer"
-      />
+  <include file="index.zcml" />
 
-  <z3c:template
-      for=".IndexPage"
-      layer="zam.skin.layer.IZAMSkinLayer"
-      template="index.pt"
-      />
-
-  <z3c:pagelet
-      for="*"
-      name="contents.html"
-      permission="zope.ManageContent"
-      class=".NoneContentsPage"
-      layer="zam.skin.layer.IZAMSkinLayer"
-      />
-
-  <z3c:template
-      for=".NoneContentsPage"
-      layer="zam.skin.layer.IZAMSkinLayer"
-      template="contents.pt"
-      />
-
 </configure>

Added: zam.skin/trunk/src/zam/skin/browser/index.py
===================================================================
--- zam.skin/trunk/src/zam/skin/browser/index.py	                        (rev 0)
+++ zam.skin/trunk/src/zam/skin/browser/index.py	2008-04-16 00:37:56 UTC (rev 85393)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Foundation 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.
+#
+##############################################################################
+"""
+$Id: __init__.py 97 2007-03-29 22:58:27Z rineichen $
+"""
+__docformat__ = "reStructuredText"
+
+from z3c.pagelet import browser
+
+
+class IndexPage(browser.BrowserPagelet):
+    """Missing index.html page."""
+
+
+class NoneContentsPage(browser.BrowserPagelet):
+    """Missing contents.html page."""


Property changes on: zam.skin/trunk/src/zam/skin/browser/index.py
___________________________________________________________________
Name: svn:eol-style
   + native

Added: zam.skin/trunk/src/zam/skin/browser/index.zcml
===================================================================
--- zam.skin/trunk/src/zam/skin/browser/index.zcml	                        (rev 0)
+++ zam.skin/trunk/src/zam/skin/browser/index.zcml	2008-04-16 00:37:56 UTC (rev 85393)
@@ -0,0 +1,34 @@
+<configure
+    xmlns:zope="http://namespaces.zope.org/zope"
+    xmlns:z3c="http://namespaces.zope.org/z3c"
+    i18n_domain="zam">
+
+  <z3c:pagelet
+      for="zope.traversing.interfaces.IContainmentRoot"
+      name="index.html"
+      permission="zope.ManageContent"
+      class=".index.IndexPage"
+      layer="zam.skin.layer.IZAMSkinLayer"
+      />
+
+  <z3c:template
+      for=".index.IndexPage"
+      layer="zam.skin.layer.IZAMSkinLayer"
+      template="index.pt"
+      />
+
+  <z3c:pagelet
+      for="zope.traversing.interfaces.IContainmentRoot"
+      name="contents.html"
+      permission="zope.ManageContent"
+      class=".index.NoneContentsPage"
+      layer="zam.skin.layer.IZAMSkinLayer"
+      />
+
+  <z3c:template
+      for=".index.NoneContentsPage"
+      layer="zam.skin.layer.IZAMSkinLayer"
+      template="contents.pt"
+      />
+
+</configure>


Property changes on: zam.skin/trunk/src/zam/skin/browser/index.zcml
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list