Author: jmorliaguet
Date: Wed Oct 26 15:58:46 2005
New Revision: 28657

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

- perspectives must be relatable



Modified: z3lab/cpsskins/branches/jmo-perspectives/perspectives/__init__.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/perspectives/__init__.py   
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/perspectives/__init__.py   Wed Oct 
26 15:58:46 2005
@@ -54,3 +54,11 @@
     def __repr__(self):
         return "<Site perspective: '%s'>" % self._perspective
 
+class Relatable(object):
+    """This adapter makes perspectives relatable.
+    """
+    def __init__(self, perspective):
+        self.perspective = perspective
+
+    def __str__(self):
+        return str(self.perspective)

Modified: z3lab/cpsskins/branches/jmo-perspectives/perspectives/configure.zcml
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/perspectives/configure.zcml        
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/perspectives/configure.zcml        
Wed Oct 26 15:58:46 2005
@@ -4,6 +4,14 @@
     i18n_domain="cpsskins"
     >
 
+  <!-- this adapter makes elements relatable -->
+
+  <adapter
+      for=".interfaces.IPerspective"
+      factory=".Relatable"
+      provides="cpsskins.relations.interfaces.IRelatable"
+  />
+
   <content class=".Perspective">
 
     <require
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to