[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/template.pt Merge r26881 from trunk:

Philipp von Weitershausen philikon at philikon.de
Tue Aug 3 16:40:12 EDT 2004


Log message for revision 26882:
  Merge r26881 from trunk:
  
  Make Rotterdam's template more resuable by defining some macros and
  slots on sensible places.
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/template.pt


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/template.pt
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/template.pt	2004-08-03 20:26:05 UTC (rev 26881)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/rotterdam/template.pt	2004-08-03 20:40:12 UTC (rev 26882)
@@ -40,14 +40,16 @@
 
   <body tal:attributes="onload body_onload | nothing">
 
-    <div id="global">
-      <div id="userDetails">
+    <metal:slot define-slot="global">
+    <div id="global" metal:define-macro="global">
+      <div id="userDetails" metal:define-slot="user_details">
         <metal:block define-macro="logged_user">
           <span tal:omit-tag="" i18n:translate="">User:</span>
           <tal:block replace="request/principal/title">
             User
           </tal:block>
         </metal:block>
+        <metal:block define-slot="login_logout">
           <a href=""
             tal:attributes="href string:@@logout.html?nextURL=${request/URL/url:quote}"
             tal:condition="python: hasattr(request.principal, 'getLogin')"
@@ -58,12 +60,16 @@
             tal:condition="python: not hasattr(request.principal, 'getLogin')"
             i18n:translate="">
             [Login]</a>
+        </metal:block>
       </div>
       <img tal:attributes="src context/++resource++zope3logo.gif" />
     </div>
+    </metal:slot>
 
-    <div id="navigators">
 
+    <metal:slot define-slot="navigators">
+    <div id="navigators" metal:define-macro="navigators">
+
       <!-- Navigation tree box -->
       <metal:tree use-macro="context/@@standard_macros/navigation_tree_box" />
 
@@ -82,7 +88,7 @@
       </tal:block>
 
       <!-- Tree of the help topics that appears on the help namespace -->
-      <div class="box" id="help"
+      <div class="box" id="help" metal:define-slot="online_help"
            tal:condition="not:python:request.getURL().find('++help++')==-1">
         <h4 i18n:translate="">Online Help - TOC</h4>
         <div class="body">
@@ -94,12 +100,13 @@
       </div>
 
     </div>
+    </metal:slot>
 
+    <div id="workspace" metal:define-macro="workspace">
 
-    <div id="workspace">
-
+      <metal:slot define-slot="breadcrumbs">
       <div id="breadcrumbs" metal:define-macro="breadcrumbs"
-       > <div tal:omit-tag="" i18n:translate="">Location:&nbsp;</div><tal:block
+       > <div tal:omit-tag="" i18n:translate="">Location:</div>&nbsp;<tal:block
            repeat="breadcrumb context/@@absolute_url/breadcrumbs"
           ><a href=""
               tal:condition="repeat/breadcrumb/start"
@@ -113,9 +120,10 @@
              href string:${breadcrumb/url}/@@SelectedManagementView.html">
             breadcrumb item</a> / </tal:block>
       </div>
+      </metal:slot>
 
-      <div tal:condition="python: macroname == 'view'" class="itemViews"
-           metal:define-slot="tabs">
+      <metal:slot define-slot="tabs">
+      <div tal:condition="python: macroname == 'view'" class="itemViews">
         <tal:block repeat="view context/@@view_get_menu/zmi_views">
           <a href=""
             tal:attributes="href view/action;
@@ -133,8 +141,7 @@
       <div tal:condition="python: macroname == 'view'" id="actions"
            tal:define="help_actions context/@@view_get_menu/help_actions;
                        actions context/@@view_get_menu/zmi_actions;
-                       dummy python:actions.reverse()"
-           metal:define-slot="tabs">
+                       dummy python:actions.reverse()">
 
         <span tal:condition="help_actions"
               tal:repeat="help_info help_actions"
@@ -171,8 +178,9 @@
         </span>
         &nbsp;
       </div>
+      </metal:slot>
 
-      <div id="viewspace">
+      <div id="viewspace" metal:define-slot="viewspace">
 
         <div metal:define-slot="message" id="message">
         </div>
@@ -199,9 +207,9 @@
         </div>
 
 
-        <div id="context_information">
+        <div id="context_information" metal:define-slot="context_information">
 
-          <div id="helpers">
+          <div id="helpers" metal:define-slot="helpers">
 
             <div class="box" id="itemHelp" tal:condition="pagetip|nothing">
               <h4 i18n:translate="">Tip</h4>
@@ -249,11 +257,10 @@
 
     <div id="footer" metal:define-macro="footer" />
 
-    <div id="logger" />
+    <div id="logger" metal:define-slot="logger" />
 
   </body>
 
 </html>
 
 </metal:block>
-



More information about the Zope3-Checkins mailing list