Author: jmorliaguet
Date: Sat Nov 12 11:49:21 2005
New Revision: 29475

Modified:
   
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/presentation_editor.pt
   z3lab/cpsskins/branches/jmo-perspectives/elements/presentation.py
   z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.py
Log:

- API update: 'views' were renamed as 'presentations'



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/presentation_editor.pt
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/presentation_editor.pt 
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/browser/editing/presentation_editor.pt 
    Sat Nov 12 11:49:21 2005
@@ -2,16 +2,16 @@
   <body metal:fill-slot="body" i18n:domain="cpsskins">
     <div class="editArea"
          tal:define="info context/presentable:getPresentationInfo;
-                     views info/views;
+                     presentations info/presentations;
                      current_perspective context/@@getPerspective;
-                     default_view views/default|nothing;
+                     default_presentation presentations/default|nothing;
                      format_names info/format_names">
 
       <h1>Presentation editor</h1>
 
-      <p tal:condition="not:default_view">No view is directly associated with 
this element.</p>
+      <p tal:condition="not:default_presentation">No presentation is directly 
associated with this element.</p>
 
-      <form tal:condition="default_view"
+      <form tal:condition="default_presentation"
             action="." tal:attributes="action request/URL" method="post"
             enctype="multipart/form-data">
 
@@ -26,16 +26,16 @@
             </th>
           </tr>
 
-          <tal:block repeat="view python: views.keys()">
-            <tr tal:define="info views/?view;
-                            even repeat/view/even;
+          <tal:block repeat="presentation presentations">
+            <tr tal:define="info presentations/?presentation;
+                            even repeat/presentation/even;
                             display info/display;
                             formats info/formats;
                             perspective info/perspective;
                             perspective_name python: perspective and 
perspective.name or '';
                             perspective_is_current python: perspective == 
current_perspective;
                             current_formats python: current_perspective and 
-                                            
views[current_perspective.name]['formats'] or []"
+                                            
presentations[current_perspective.name]['formats'] or []"
                 tal:attributes="class python: even and 'even' or nothing">
 
               <td tal:content="perspective/title|string:default" />
@@ -43,13 +43,13 @@
               <!-- Display -->
               <td>
                 <tal:block condition="perspective">
-                  <a title="Add view"
+                  <a title="Customize presentation"
                      tal:condition="not:display"
                      tal:attributes="href 
string:@@clonePresentation?perspective=$perspective_name">
                     <img src="/++skin++cpsskins/@@/add-16.png" />
                   </a>
                   <a tal:condition="display"
-                     title="Remove view" onclick="return window.confirm('Are 
you sure?')"
+                     title="Remove customized presentation" onclick="return 
window.confirm('Are you sure?')"
                      tal:attributes="href 
string:@@removePresentation?perspective=$perspective_name">
                     <img src="/++skin++cpsskins/@@/remove-16.png" />
                   </a>
@@ -91,7 +91,7 @@
               </tal:block>
 
               <td style="background-color: #fff">
-                <tal:block condition="perspective_is_current">&lArr; current 
view</tal:block>
+                <tal:block condition="perspective_is_current">&lArr; current 
presentation</tal:block>
                 <a href="" style="display:block; width: auto"
                    tal:condition="not:perspective_is_current"
                    tal:define="perspective python: perspective and perspective 
or ''"

Modified: z3lab/cpsskins/branches/jmo-perspectives/elements/presentation.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/elements/presentation.py   
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/elements/presentation.py   Sat Nov 
12 11:49:21 2005
@@ -136,7 +136,7 @@
 
     def getPresentationInfo(self):
         """Return a dictionary with information about display and formats 
-        associated to the element in various views / perspectives.
+        associated to the element in various perspectives.
         """
         object = self.context
         reltool = RelationTool(object)
@@ -144,12 +144,12 @@
         tmutil = getThemeManager()
         theme = tmutil.getThemeInContext(object)
 
-        views = {}
+        presentations = {}
 
         # set initial values
         for perspective in theme.listPerspectives():
-            view_name = perspective.name
-            views[view_name] = {
+            presentation_id = perspective.name
+            presentations[presentation_id] = {
                 'relation': None,
                 'display': None,
                 'formats': [],
@@ -165,7 +165,7 @@
             display = rel.second
             formattable = IFormattable(display)
             perspective = len(rel) == 3 and rel.third or None
-            view_id = perspective and str(perspective) or 'default'
+            presentation_id = perspective and str(perspective) or 'default'
 
             formats_info = {}
             for format in formattable.getFormats():
@@ -183,7 +183,7 @@
                 format_info['customizable'] = customizable
                 format_info['effective'] = not customizable
 
-            views[view_id] = {
+            presentations[presentation_id] = {
                 'relation': rel,
                 'display': display,
                 'formats': formats_info,
@@ -191,7 +191,7 @@
                 }
 
         return {
-            'views': views,
+            'presentations': presentations,
             'format_names': format_names,
             }
 

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.py     
(original)
+++ z3lab/cpsskins/branches/jmo-perspectives/engines/authoring/authoring.py     
Sat Nov 12 11:49:21 2005
@@ -37,13 +37,19 @@
     def setPerspective(perspective):
         """ """
 
-    def cloneView(id, format):
+    def clonePresentation(persective):
         """ """
 
-    def addView(perspective):
+    def addPresentation(perspective):
         """ """
 
-    def removeView(perspective):
+    def removePresentation(perspective):
+        """ """
+
+    def customizeFormat(name, perspective):
+        """ """
+
+    def uncustomizeFormat(name, perspective):
         """ """
 
 class Authoring(BrowserView):
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to