[z3-checkins] r28621 - z3/Sfive/trunk

philikon at codespeak.net philikon at codespeak.net
Sat Jun 10 16:36:16 CEST 2006


Author: philikon
Date: Sat Jun 10 16:36:10 2006
New Revision: 28621

Modified:
   z3/Sfive/trunk/configure.zcml
Log:
Make Zope 2.10 ready:
* five;traversable and five:defaultViewable aren't needed anymore
 (instead we have a browser:defaultView declaration)
* Use short spelling of adapter registration
* register presentation class as Zope 2 meta type with add form etc
  (very nice, yuppy). Added an "Add presentations" permission for that


Modified: z3/Sfive/trunk/configure.zcml
==============================================================================
--- z3/Sfive/trunk/configure.zcml	(original)
+++ z3/Sfive/trunk/configure.zcml	Sat Jun 10 16:36:10 2006
@@ -2,39 +2,47 @@
            xmlns:browser="http://namespaces.zope.org/browser"
            xmlns:five="http://namespaces.zope.org/five"
            xmlns:i18n="http://namespaces.zope.org/i18n"
-           i18n_domain="sfive">
+           xmlns:zcml="http://namespaces.zope.org/zcml"
+           i18n_domain="sfive"
+           >
 
-  <include package="zope.app.renderer" />
-  <include file="renderer.zcml" />
+  <permission
+      id="sfive.AddPresentations"
+      title="Add Sfive Presentations"
+      />
 
   <permission
       id="sfive.EditPresentations"
       title="Edit Sfive Presentations"
       />
 
-  <content class=".presentation.Presentation">
+  <class class=".presentation.Presentation">
     <require
         permission="zope2.View"
         interface=".interfaces.IPresentation"
         />
-  </content>
-
-  <five:traversable class="OFS.Folder.Folder" />
-  <five:traversable class=".presentation.Presentation" />
-  <five:defaultViewable class=".presentation.Presentation" />
+    <require
+        permission="sfive.EditPresentations"
+        set_schema=".interfaces.IPresentation"
+        />
+  </class>
 
-  <adapter
-      for=".interfaces.IPresentation"
-      provides="zope.app.size.interfaces.ISized"
-      factory=".presentation.IPresentation"
+  <five:registerClass
+      class=".presentation.Presentation"
+      meta_type="Sfive Presentation"
+      permission="sfive.AddPresentations"
+      addview="sfive.Presentation"
+      zcml:condition="installed Zope2"
       />
 
+  <adapter factory=".presentation.PresentationSize" />
+
   <browser:addform
       schema=".interfaces.IPresentation"
       content_factory=".presentation.Presentation"
       label="Add Presentation"
       name="sfive.Presentation"
-      permission="sfive.EditPresentations" 
+      permission="sfive.AddPresentations" 
       />
 
   <browser:editform
@@ -44,19 +52,15 @@
       permission="sfive.EditPresentations" 
       />
 
-  <browser:page
+  <browser:defaultView
       for=".interfaces.IPresentation"
       name="index.html"
-      class=".browser.PresentationView"
-      template="view.pt"
-      permission="zope2.View"
       />
 
   <browser:page
       for=".interfaces.IPresentation"
-      name="raw.html"
-      class=".browser.PresentationView"
-      attribute="render"
+      name="index.html"
+      class=".browser.ViewPresentation"
       permission="zope2.View"
       />
 


More information about the z3-checkins mailing list