Author: jmorliaguet
Date: Sun Nov  6 16:11:43 2005
New Revision: 29020

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/configure.zcml
   z3lab/cpsskins/branches/jmo-perspectives/elements/configure.zcml
   z3lab/cpsskins/branches/jmo-perspectives/elements/theme.py
Log:

- themes are local utilities



Modified: z3lab/cpsskins/branches/jmo-perspectives/configure.zcml
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/configure.zcml     (original)
+++ z3lab/cpsskins/branches/jmo-perspectives/configure.zcml     Sun Nov  6 
16:11:43 2005
@@ -6,13 +6,15 @@
 
   <i18n:registerTranslations directory="locales" />
 
+
   <!-- Theme management utility -->
 
   <localUtility class=".thememanager.ThemeManagement">
 
     <require
-        permission="zope.ManageServices"
+        permission="zope.ManageSite"
         interface=".interfaces.IThemeManagement"
+        set_schema=".interfaces.IThemeManagement"
         />
 
     <allow
@@ -27,6 +29,8 @@
   </localUtility>
 
 
+  <!-- Image cache -->
+
   <content class=".caching.ImageCache">
 
     <implements
@@ -49,7 +53,6 @@
 
   <include package=".controllers" />
 
-
   <include package=".elements" />
 
   <include package=".browser" />

Modified: z3lab/cpsskins/branches/jmo-perspectives/elements/configure.zcml
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/elements/configure.zcml    
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/configure.zcml    Sun Nov 
 6 16:11:43 2005
@@ -145,17 +145,18 @@
         title="Theme"
         description="A Theme" />
 
-    <require
-        permission="zope.View"
-        interface=".interfaces.ITheme"
-        />
+  </content>
+
+
+  <localUtility class=".theme.Theme">
 
     <require
-        permission="zope.ManageContent"
+        permission="zope.ManageSite"
+        interface=".interfaces.ITheme"
         set_schema=".interfaces.ITheme"
         />
 
-  </content>
+  </localUtility>
 
 
   <!-- Page -->

Modified: z3lab/cpsskins/branches/jmo-perspectives/elements/theme.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/elements/theme.py  (original)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/theme.py  Sun Nov  6 
16:11:43 2005
@@ -17,11 +17,11 @@
 """
 __docformat__ = "reStructuredText"
 
+from zope.app.component.site import SiteManagementFolder
 from zope.app.container.interfaces import INameChooser
 from zope.component import adapts, queryUtility, getUtilitiesFor
 from zope.interface import implements
 
-from cpsskins.elements import InnerNode
 from cpsskins.elements.interfaces import INode, INodeTraverser
 from cpsskins.perspectives.interfaces import IPerspective
 from cpsskins.storage.interfaces import IPerspectiveStorage
@@ -29,7 +29,7 @@
 from interfaces import ITheme, IThemePage
 from interfaces import IPageContainer
 
-class Theme(InnerNode):
+class Theme(SiteManagementFolder):
     """Theme
 
     >>> theme = Theme('Some theme')
@@ -40,7 +40,7 @@
     implements(ITheme)
 
     def __init__(self, title=''):
-        InnerNode.__init__(self)
+        super(Theme, self).__init__()
         self.title = title
 
     def __repr__(self):
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to