Author: jmorliaguet
Date: Fri Oct 28 18:19:38 2005
New Revision: 28784

Modified:
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/portlet_edit.pt
   z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/layout.py
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/__init__.py
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/portlet_edit.pt
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/slot_edit.pt
   
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/pageblock_edit_layout.pt
   z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py
Log:

- moved the perspective to the context info structure



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
      (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/cell_edit_layout.pt
      Fri Oct 28 18:19:38 2005
@@ -1,7 +1,7 @@
 <td class="editable" style="vertical-align:top"
   tal:define="
     info options/info;
-    perspective options/perspective;
+    perspective info/perspective;
     rendered options/rendered;
     display info/display;
     formats display/formattable:getFormatNames;

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/__init__.py
      (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/__init__.py
      Fri Oct 28 18:19:38 2005
@@ -22,7 +22,6 @@
 from zope.interface import implements
 from zope.publisher.interfaces import IRequest
 
-from cpsskins import getContexts
 from cpsskins.browser.rendering.interfaces import IFilter
 from cpsskins.elements.interfaces import IDisplay
 
@@ -38,10 +37,7 @@
         """Apply the editor.
         """
         request = self.request
-        contexts = getContexts(request)
-        perspective = contexts['perspective']
 
         editor = getMultiAdapter((info.element, request),
             name='editor (content authoring)')
-        return editor(rendered=rendered, perspective=perspective, info=info,
-                      **kw)
+        return editor(rendered=rendered, info=info, **kw)

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/portlet_edit.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/portlet_edit.pt
  (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/content/portlet_edit.pt
  Fri Oct 28 18:19:38 2005
@@ -2,7 +2,7 @@
   tal:define="
     parent view/getParent;
     info options/info;
-    perspective options/perspective;
+    perspective info/perspective;
     display info/display;
     getDisplay nocall:context/displayable:getDisplay;
     actual_display python: getDisplay(perspective);

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/layout.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/layout.py    
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/layout.py    
    Fri Oct 28 18:19:38 2005
@@ -21,7 +21,6 @@
 from zope.interface import implements
 from zope.publisher.interfaces import IRequest
 
-from cpsskins import getContexts
 from cpsskins.elements.formats.interfaces import IFormat
 from cpsskins.browser.rendering.interfaces import IFilter
 
@@ -43,10 +42,5 @@
 
         element = info.element
 
-        contexts = getContexts(request)
-        perspective = contexts['perspective']
-
         editor = getMultiAdapter((element, request), name='editor (layout)')
-        rendered=editor(rendered=rendered, layout=layout, info=info,
-                        perspective=perspective, **kw)
-        return rendered
+        return editor(rendered=rendered, layout=layout, info=info, **kw)

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/__init__.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/__init__.py
 (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/__init__.py
 Fri Oct 28 18:19:38 2005
@@ -22,7 +22,6 @@
 from zope.interface import implements
 from zope.publisher.interfaces import IRequest
 
-from cpsskins import getContexts
 from cpsskins.browser.rendering.interfaces import IFilter
 from cpsskins.elements.interfaces import IDisplay
 
@@ -38,10 +37,7 @@
         """Apply the editor to the element.
         """
         request = self.request
-        contexts = getContexts(request)
-        perspective = contexts['perspective']
 
         editor = getMultiAdapter((info.element, request),
             name='editor (page authoring)')
-        return editor(rendered=rendered, perspective=perspective, info=info,
-                      **kw)
+        return editor(rendered=rendered, info=info, **kw)

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/portlet_edit.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/portlet_edit.pt
     (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/portlet_edit.pt
     Fri Oct 28 18:19:38 2005
@@ -2,7 +2,7 @@
   tal:define="
     info options/info;
     display info/display;
-    perspective options/perspective;
+    perspective info/perspective;
     canvas_mode options/canvas_mode|nothing;
     mode_is_layout python:canvas_mode == 'layout';
     formats display/formattable:getFormatNames;

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/slot_edit.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/slot_edit.pt
        (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/page/slot_edit.pt
        Fri Oct 28 18:19:38 2005
@@ -1,7 +1,7 @@
 <tal:block define="
   info options/info;
-  perspective options/perspective;
   rendered options/rendered;
+  perspective info/perspective;
   display info/display;
   formats display/formattable:getFormatNames;
   slot_title context/title;

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/pageblock_edit_layout.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/pageblock_edit_layout.pt
 (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/authoring/filters/pageblock_edit_layout.pt
 Fri Oct 28 18:19:38 2005
@@ -2,7 +2,7 @@
   define="
     canvas_mode options/canvas_mode|nothing;
     info options/info;
-    perspective options/perspective;
+    perspective info/perspective;
     display info/display;
     formats display/formattable:getFormatNames;
     mode_is_layout python:canvas_mode == 'layout';

Modified: z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py        
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/browser/rendering/engine.py        
Fri Oct 28 18:19:38 2005
@@ -139,7 +139,6 @@
 
         contexts['theme'] = theme
         contexts['relations'] = relations
-        contexts['perspective'] = perspective
 
         # build the tree and store it in the request
         contexts['tree'] = _buildTreeInfo(node=element, request=request,
@@ -178,6 +177,7 @@
         {'element': node,
          'display': display,
          'request': request,
+         'perspective': perspective,
          'data': None,
          'metadata': None,
          })
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to