Author: jmorliaguet
Date: Mon Feb 27 22:25:20 2006
New Revision: 2500

Added:
   cpsskins/branches/jmo-perspectives/ui/panels/associations.pt   (contents, 
props changed)
   cpsskins/branches/jmo-perspectives/ui/panels/management.pt   (contents, 
props changed)
   cpsskins/branches/jmo-perspectives/ui/panels/settings.pt   (contents, props 
changed)
Modified:
   cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py
   cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml
   cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt
Log:

- the site designer panels are displayed using perspectives



Modified: cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py      
(original)
+++ cpsskins/branches/jmo-perspectives/ui/authoring/definitions.py      Mon Feb 
27 22:25:20 2006
@@ -78,6 +78,26 @@
         }
     },
 
+    'settings': {
+        'id': 'settings',
+        'data': {
+            'url': '@@settings.html',
+        }
+    },
+
+    'management': {
+        'id': 'management',
+        'data': {
+            'url': '@@management.html',
+        }
+    },
+
+    'associations': {
+        'id': 'associations',
+        'data': {
+            'url': '@@associations.html',
+        }
+    },
 }
 
 VIEWS = {
@@ -181,8 +201,35 @@
         'controllers': ['main-editor-perspectives'],
     },
 
-    # Bottom area
+    # site designer panels
+    'settings': {
+        'widget': {
+            'type': 'panel',
+        },
+        'model': 'settings',
+        'perspectives': ['settings'],
+        'controllers': ['site-designer-perspectives'],
+    },
+
+    'associations': {
+        'widget': {
+            'type': 'panel',
+        },
+        'model': 'associations',
+        'perspectives': ['associations'],
+        'controllers': ['site-designer-perspectives'],
+    },
+
+    'management': {
+        'widget': {
+            'type': 'panel',
+        },
+        'model': 'management',
+        'perspectives': ['management'],
+        'controllers': ['site-designer-perspectives'],
+    },
 
+    # Bottom area
     'portlet-factory': {
         'widget': {
             'type': 'panel',
@@ -258,6 +305,9 @@
     'main-editor-perspectives': {
         'id': 'main-editor-perspectives',
         'type': 'perspective selector',
-    }
-
+    },
+    'site-designer-perspectives': {
+        'id': 'site-designer-perspectives',
+        'type': 'perspective selector',
+    },
 }

Added: cpsskins/branches/jmo-perspectives/ui/panels/associations.pt
==============================================================================
--- (empty file)
+++ cpsskins/branches/jmo-perspectives/ui/panels/associations.pt        Mon Feb 
27 22:25:20 2006
@@ -0,0 +1,9 @@
+
+  <h2>Associations</h2>
+  <div class="sections">
+    <img class="icon"
+         src="/++skin++cpsskins/@@/++resource++associations-48.png" />
+    <span class="description">local themes, perspectives ...</span>
+    <br style="clear:both"/>
+  </div>
+

Modified: cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml (original)
+++ cpsskins/branches/jmo-perspectives/ui/panels/configure.zcml Mon Feb 27 
22:25:20 2006
@@ -38,6 +38,22 @@
       template="location_selector.pt"
     />
 
+    <!-- site designer -->
+    <page
+      name="settings.html"
+      template="settings.pt"
+    />
+
+    <page
+      name="associations.html"
+      template="associations.pt"
+    />
+
+    <page
+      name="management.html"
+      template="management.pt"
+    />
+
   </pages>
 
   <pages

Added: cpsskins/branches/jmo-perspectives/ui/panels/management.pt
==============================================================================
--- (empty file)
+++ cpsskins/branches/jmo-perspectives/ui/panels/management.pt  Mon Feb 27 
22:25:20 2006
@@ -0,0 +1,9 @@
+
+  <h2>Management</h2>
+  <div class="sections">
+    <img class="icon"
+         src="/++skin++cpsskins/@@/++resource++management-48.png" />
+    <span class="description">export, import themes and settings ...</span>
+    <br style="clear:both"/>
+  </div>
+

Added: cpsskins/branches/jmo-perspectives/ui/panels/settings.pt
==============================================================================
--- (empty file)
+++ cpsskins/branches/jmo-perspectives/ui/panels/settings.pt    Mon Feb 27 
22:25:20 2006
@@ -0,0 +1,55 @@
+<tal:block define="engine string:site-designer;
+                   selection context/@@getSelection;
+                   section selection/section|nothing;
+                   subsection selection/subsection|nothing;
+                   selected selection/selected|nothing">
+
+  <table class="panel" cellpadding="0" cellspacing="0"
+         tal:define="info context/@@getSettingInfo">
+    <tr>
+      <td class="first">
+        <h2>Settings</h2>
+        <div class="sections">
+          <img class="icon"
+               src="/++skin++cpsskins/@@/++resource++settings-48.png" />
+          <ul>
+            <li tal:repeat="subsection info">
+              <a class="section"
+                 tal:attributes="href 
string:javascript:CPSSkins.getControllerById('setting-perspectives').switchTo('$subsection')"
+                 tal:content="subsection" i18n:translate="" />
+            </li>
+          </ul>
+          <br style="clear:both"/>
+        </div>
+      </td>
+      <td class="subsection" tal:condition="subsection">
+
+        <h2 tal:content="subsection" i18n:translate="" />
+        <div class="sections">
+
+        <ul tal:define="setting_info info">
+          <li tal:repeat="info setting_info/?subsection|nothing">
+            <tal:block content="info/setting/title" />
+            <tal:block define="name info/name;
+                               readonly info/readonly;
+                               custom info/custom">
+              <a tal:attributes="href string:@@customizeSetting?name=$name"
+                 tal:condition="readonly">[customize]</a>
+              <a tal:attributes="href string:@@removeSetting?name=$name"
+                 tal:condition="python: not custom and not 
readonly">[remove]</a>
+              <a tal:attributes="href string:@@decustomizeSetting?name=$name"
+                 tal:condition="custom">[remove customization]</a>
+              <a tal:attributes="href string:@@exportSetting?name=$name"
+                 tal:condition="not:readonly">[export]</a>
+              <a tal:attributes="href string:@@reloadSetting?name=$name"
+                 tal:condition="readonly">[reload]</a>
+            </tal:block>
+          </li>
+        </ul>
+        </div>
+
+      </td>
+    </tr>
+  </table>
+
+</tal:block>

Modified: 
cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt
==============================================================================
--- cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt 
(original)
+++ cpsskins/branches/jmo-perspectives/ui/screens/sitedesigner/site_designer.pt 
Mon Feb 27 22:25:20 2006
@@ -1,73 +1,17 @@
-<tal:block define="engine string:site-designer;
-                   selection context/@@getSelection;
-                   section selection/section|nothing;
-                   subsection selection/subsection|nothing;
-                   selected selection/selected|nothing">
-
-  <h1>Site designer</h1>
-
-  <table class="panel" cellpadding="0" cellspacing="0"
-         tal:define="info context/@@getSettingInfo">
-    <tr>
-      <td class="first">
-        <h2>Settings</h2>
-        <div class="sections">
-          <img class="icon"
-               src="/++skin++cpsskins/@@/++resource++settings-48.png" />
-          <ul>
-            <li tal:repeat="subsection info">
-              <a class="section"
-                 tal:attributes="href 
string:javascript:CPSSkins.switchPerspective('$subsection')"
-                 tal:content="subsection" i18n:translate="" />
-            </li>
-          </ul>
-          <br style="clear:both"/>
-        </div>
-      </td>
-      <td class="subsection" tal:condition="subsection">
-
-        <h2 tal:content="subsection" i18n:translate="" />
-        <div class="sections">
-
-        <ul tal:define="setting_info info">
-          <li tal:repeat="info setting_info/?subsection|nothing">
-            <tal:block content="info/setting/title" />
-            <tal:block define="name info/name;
-                               readonly info/readonly;
-                               custom info/custom">
-              <a tal:attributes="href string:@@customizeSetting?name=$name"
-                 tal:condition="readonly">[customize]</a>
-              <a tal:attributes="href string:@@removeSetting?name=$name"
-                 tal:condition="python: not custom and not 
readonly">[remove]</a>
-              <a tal:attributes="href string:@@decustomizeSetting?name=$name"
-                 tal:condition="custom">[remove customization]</a>
-              <a tal:attributes="href string:@@exportSetting?name=$name"
-                 tal:condition="not:readonly">[export]</a>
-              <a tal:attributes="href string:@@reloadSetting?name=$name"
-                 tal:condition="readonly">[reload]</a>
-            </tal:block>
-          </li>
-        </ul>
-        </div>
-
-      </td>
-    </tr>
-  </table>
-
-  <h2>Associations</h2>
-  <div class="sections">
-    <img class="icon"
-         src="/++skin++cpsskins/@@/++resource++associations-48.png" />
-    <span class="description">local themes, perspectives ...</span>
-    <br style="clear:both"/>
-  </div>
-
-  <h2>Management</h2>
-  <div class="sections">
-    <img class="icon"
-         src="/++skin++cpsskins/@@/++resource++management-48.png" />
-    <span class="description">export, import themes and settings ...</span>
-    <br style="clear:both"/>
-  </div>
+<h1>Site designer</h1>
+
+<a href="#" onclick="javascript: 
CPSSkins.getControllerById('site-designer-perspectives').switchTo('settings')">Settings</a>
 
+<a href="#" onclick="javascript: 
CPSSkins.getControllerById('site-designer-perspectives').switchTo('associations')">Associations</a>
 
+<a href="#" onclick="javascript: 
CPSSkins.getControllerById('site-designer-perspectives').switchTo('management')">Management</a>
 
+
+<ins class="controller" 
cite="@@getController?id=site-designer-perspectives"></ins>
+
+<ins class="model" cite="@@getModel?id=settings"></ins>
+<ins class="view" cite="@@getView?id=settings"></ins>
+
+<ins class="model" cite="@@getModel?id=associations"></ins>
+<ins class="view" cite="@@getView?id=associations"></ins>
+
+<ins class="model" cite="@@getModel?id=management"></ins>
+<ins class="view" cite="@@getView?id=management"></ins>
 
-</tal:block>
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to