Ajout du slot « body » en alias à « main_no_tabs » car il est utile pour afficher...
authorBenoît Pin <benoit.pin@gmail.com>
Wed, 11 Dec 2013 20:38:14 +0000 (21:38 +0100)
committerBenoît Pin <benoit.pin@gmail.com>
Wed, 11 Dec 2013 20:38:14 +0000 (21:38 +0100)
skins/custom_generic/main_template_standard.pt
skins/generic/main_template_ajax.pt
skins/photo_theme/main_template_standard.pt

index 995ee43..31d94dd 100755 (executable)
 
       <link rel="Shortcut Icon" type="image/x-icon" href="favicon.ico" tal:attributes="href string:$portal_url/favicon.ico" />
       <link rel="alternate" type="application/rss+xml"
-                       tal:define="stool nocall:here/portal_syndication"
-                       tal:attributes="title here/title_or_id ; href string:${here/absolute_url}/RSS"
-                       tal:condition="python:stool.isSyndicationAllowed(here)" />
-                       
-                       <link rel="stylesheet" media="screen" tal:attributes="href here/global_plinn_style.css/absolute_url" />
+            tal:define="stool nocall:here/portal_syndication"
+            tal:attributes="title here/title_or_id ; href string:${here/absolute_url}/RSS"
+            tal:condition="python:stool.isSyndicationAllowed(here)" />
+      
+      <link rel="stylesheet" media="screen" tal:attributes="href here/global_plinn_style.css/absolute_url" />
       <style type="text/css" media="all" tal:content="string:@import url(${here/calendar-system.css/absolute_url});"></style>
 
       <link metal:define-slot="css_slot" tal:replace="nothing" />
       <script type="text/javascript" tal:attributes="src here/javascript_events_api.js/absolute_url"></script>
       <script type="text/javascript" tal:attributes="src here/sarissa.js/absolute_url"></script>
       <script type="text/javascript">
-       //<!--
-                               function absolute_url() {
-                                       var e = document.getElementById("Object_URL");
-                                       if (e)
-                                               return e.innerHTML;
-                                       else {
-                                               e = document.getElementById("BC_Object_URL");
-                                               if (e)
-                                                       return e.innerHTML;
-                                               else
-                                                       return document.location.href;
-                                       }
-                               }
-
-                               function portal_url() {
-                                       var e = document.getElementById("Portal_URL");
-                                       return e.innerHTML;
-                               }
-
-       var startupFunctions = new Array();
-
-                               function registerStartupFunction(fct) {
-                                       startupFunctions.push(fct);
-                               }
-
-                               function runAjaxStartup() {
-                                       for (var i = 0 ; i < startupFunctions.length ; i++)
-                                               startupFunctions[i]();
-                               }
-
-                               addListener(window, 'load', runAjaxStartup);
-                               
-                               var progressImage;
-                               function _initLoadingStatus() {
-                                       progressImage = document.getElementById('loading_progress');
-                               }
-                               registerStartupFunction(_initLoadingStatus);
-                               
-                               function showProgressImage() { progressImage.style.display = 'inline'; }
-                               function hideProgressImage() { progressImage.style.display = 'none'; }
+        //<!--
+        function absolute_url() {
+          var e = document.getElementById("Object_URL");
+          if (e)
+            return e.innerHTML;
+          else {
+            e = document.getElementById("BC_Object_URL");
+            if (e)
+              return e.innerHTML;
+            else
+              return document.location.href;
+          }
+        }
+
+        function portal_url() {
+          var e = document.getElementById("Portal_URL");
+          return e.innerHTML;
+        }
+
+        var startupFunctions = new Array();
+
+        function registerStartupFunction(fct) {
+          startupFunctions.push(fct);
+        }
+
+        function runAjaxStartup() {
+          for (var i = 0 ; i < startupFunctions.length ; i++)
+            startupFunctions[i]();
+        }
+
+        addListener(window, 'load', runAjaxStartup);
+        
+        var progressImage;
+        function _initLoadingStatus() {
+          progressImage = document.getElementById('loading_progress');
+        }
+        registerStartupFunction(_initLoadingStatus);
+        
+        function showProgressImage() { progressImage.style.display = 'inline'; }
+        function hideProgressImage() { progressImage.style.display = 'none'; }
 
 
         // -->
       <script type="text/javascript" tal:attributes="src here/base_properties.js/absolute_url"></script>
       <script type="text/javascript" tal:attributes="src here/fragment_importer.js/absolute_url"></script>
       <script type="text/javascript" tal:attributes="src here/ajax_form_manager.js/absolute_url"></script>
-           <script type="text/javascript" tal:attributes="src here/root_handlers.js/absolute_url"></script>
-                       <script type="text/javascript" tal:attributes="src here/plinn_script_loader.js/absolute_url"></script>
+      <script type="text/javascript" tal:attributes="src here/root_handlers.js/absolute_url"></script>
+      <script type="text/javascript" tal:attributes="src here/plinn_script_loader.js/absolute_url"></script>
 
       <script type="text/javascript" metal:define-slot="javascript_head_slot" tal:replace="nothing"></script>
     </head>
 
     <body>
-       <span style="display:none">
-               <span id="Portal_URL" tal:content="portal_url"></span>
-               <span id="ajax_config"  tal:content="python:request.get('ajaxConfig', request.SESSION.get('ajaxConfig', portal_object.getProperty('ajax_config')))"></span>
-               <script type="text/javascript">
-               // <!--
-                 AJAX_CONFIG = document.getElementById('ajax_config');
-                                       AJAX_CONFIG = parseInt(AJAX_CONFIG.innerHTML);
-               // -->
-               </script>
-           </span>
-       <a href="#documentContent" i18n:translate="" i18n:domain="plinn" class="hidden">Skip to content</a>
+      <span style="display:none">
+        <span id="Portal_URL" tal:content="portal_url"></span>
+        <span id="ajax_config"  tal:content="python:request.get('ajaxConfig', request.SESSION.get('ajaxConfig', portal_object.getProperty('ajax_config')))"></span>
+        <script type="text/javascript">
+        // <!--
+          AJAX_CONFIG = document.getElementById('ajax_config');
+          AJAX_CONFIG = parseInt(AJAX_CONFIG.innerHTML);
+        // -->
+        </script>
+      </span>
+      <a href="#documentContent" i18n:translate="" i18n:domain="plinn" class="hidden">Skip to content</a>
       <div metal:use-macro="main_macros/top_bar">Top bar</div>
       <div metal:use-macro="main_macros/user_menu_bar">User menu bar</div>
       <div id="Breadcrumbs"><div metal:use-macro="main_macros/Breadcrumbs">Breadcrumbs</div></div>
       <div id="main_body">
         <table id="Forematter" width="100%" cellspacing="0">
           <tr>
-               <td id="leftCell" class="boxes_container" width="15%">
-               <span metal:use-macro="main_macros/leftCell">Left cell</span>
+            <td id="leftCell" class="boxes_container" width="15%">
+              <span metal:use-macro="main_macros/leftCell">Left cell</span>
             </td>
 
             <td id="mainCell" width="70%">
 
-                   <div id="DesktopStatusBar" tal:condition="request/portal_status_message|nothing">
-                     <img src="info.gif" alt="Information" tal:attributes="src here/info.gif/absolute_url" i18n:attributes="alt" />
-                     <span tal:content="request/portal_status_message" i18n:translate="">Status message.</span>
-                   </div>
-
-                   <a name="documentContent"></a>
-                         <div metal:define-slot="main_no_tabs" tal:omit-tag="">
-                           <div tal:condition="specialCtxHeader" tal:content="structure specialCtxHeader">special context header</div>
-                                                               <div id="ContentTabs" tal:condition="not:specialCtxHeader">
-                                                                       <div class="tabs" metal:use-macro="here/tabs/macros/tabs">Content tabs</div>
-                                                                       <div metal:use-macro="here/tabs/macros/additional_tabs">Additional tabs</div>
-                                                               </div>
-                     <div id="ForematterCell">
-                       <div class="header">
-                         <div tal:omit-tag="" metal:define-slot="header">
-                           <h1 id="DesktopTitle">
-                             <span tal:replace="here/title_or_id">Page Title</span>
-                           </h1>
-                           <div id="DesktopDescription" tal:content="structure here/Description">
-                             Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test.
-                           </div>
-                         </div>
-                       </div>
-
-                       <div id="Desktop">
-                         <div metal:define-slot="main">
-                           <h2>Section Header</h2>
-                           <p>The content of the object is <a href=".">rendered</a>
-                           hre. Lorem ipsum dolorem. Nihil obstat imprimatur. Semper ubi sub ubi.
-                           Non illegitimi carborundum. In vino veritas. E pluribus unam.
-                           </p>
-                         </div>
-                       </div>
+              <div id="DesktopStatusBar" tal:condition="request/portal_status_message|nothing">
+                <img src="info.gif" alt="Information" tal:attributes="src here/info.gif/absolute_url" i18n:attributes="alt" />
+                <span tal:content="request/portal_status_message" i18n:translate="">Status message.</span>
+              </div>
+
+              <a name="documentContent"></a>
+              <div metal:define-slot="body" tal:omit-tag="">
+              <div metal:define-slot="main_no_tabs" tal:omit-tag="">
+                <div tal:condition="specialCtxHeader" tal:content="structure specialCtxHeader">special context header</div>
+                <div id="ContentTabs" tal:condition="not:specialCtxHeader">
+                  <div class="tabs" metal:use-macro="here/tabs/macros/tabs">Content tabs</div>
+                  <div metal:use-macro="here/tabs/macros/additional_tabs">Additional tabs</div>
+                </div>
+                <div id="ForematterCell">
+                  <div class="header">
+                    <div tal:omit-tag="" metal:define-slot="header">
+                      <h1 id="DesktopTitle">
+                        <span tal:replace="here/title_or_id">Page Title</span>
+                      </h1>
+                      <div id="DesktopDescription" tal:content="structure here/Description">
+                        Description of the resource goes here, perhaps even wrapping lines; this is to make it long enough to test.
+                      </div>
+                    </div>
+                  </div>
+
+                  <div id="Desktop">
+                    <div metal:define-slot="main">
+                      <h2>Section Header</h2>
+                      <p>The content of the object is <a href=".">rendered</a>
+                      hre. Lorem ipsum dolorem. Nihil obstat imprimatur. Semper ubi sub ubi.
+                      Non illegitimi carborundum. In vino veritas. E pluribus unam.
+                      </p>
+                    </div>
+                  </div>
                   <div tal:condition="not:isAnon" tal:omit-tag="">
                     <div id="ContentByLine" metal:use-macro="here/content_byline/macros/byline">
                       Content by me
                     </div>
                   </div>
-                       <div metal:define-slot="footer" tal:replace="nothing">footer slot</div>
-                     </div>
-                   </div>
-
+                  <div metal:define-slot="footer" tal:replace="nothing">footer slot</div>
+                </div>
+              </div>
+              </div>
             </td>
             <!-- end_main_column -->
             
             <td id="rightCell" class="boxes_container" width="15%">
-               <div metal:use-macro="main_macros/rightCell">Right cell</div>
+              <div metal:use-macro="main_macros/rightCell">Right cell</div>
             </td>
           </tr>
         </table>
index f424b43..3301bb6 100644 (file)
@@ -1,23 +1,24 @@
 <fragments metal:define-macro="master">
-       <metal:block use-macro="here/main_template_macros/macros/global_defines"/>
-       <tal:block define="global dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml;;charset=utf-8')"/>
+  <metal:block use-macro="here/main_template_macros/macros/global_defines"/>
+  <tal:block define="global dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml;;charset=utf-8')"/>
 
 <fragment id="mainCell"><span tal:replace="structure string:&lt;![CDATA[" />
   <base tal:omit-tag="" metal:define-slot="base" />
   <link metal:define-slot="css_slot" tal:replace="nothing" />
 
-       <div id="Object_URL" tal:content="here/absolute_url" style="display:none"></div>
+  <div id="Object_URL" tal:content="here/absolute_url" style="display:none"></div>
   <script type="text/javascript" metal:define-slot="javascript_head_slot" tal:replace="nothing"></script>
   <div id="DesktopStatusBar" tal:condition="request/portal_status_message|nothing">
     <img src="info.gif" alt="Information" tal:attributes="src here/info.gif/absolute_url" i18n:attributes="alt" />
     <span tal:content="request/portal_status_message" i18n:translate="">Status message.</span>
   </div>
+  <div metal:define-slot="body" tal:omit-tag="">
   <div metal:define-slot="main_no_tabs" tal:omit-tag="">
     <div tal:condition="specialCtxHeader" tal:content="structure specialCtxHeader">special context header</div>
-               <div id="ContentTabs" tal:condition="not:specialCtxHeader">
-                       <div class="tabs" metal:use-macro="here/tabs/macros/tabs">Content tabs</div>
-                       <div metal:use-macro="here/tabs/macros/additional_tabs">Additional tabs</div>
-               </div>
+    <div id="ContentTabs" tal:condition="not:specialCtxHeader">
+      <div class="tabs" metal:use-macro="here/tabs/macros/tabs">Content tabs</div>
+      <div metal:use-macro="here/tabs/macros/additional_tabs">Additional tabs</div>
+    </div>
     <div id="ForematterCell">
       <div class="header">
         <div tal:omit-tag="" metal:define-slot="header">
       <div metal:define-slot="footer" tal:replace="nothing">footer slot</div>
     </div>
   </div>
+  </div>
 <span tal:replace="structure string:]]>" /></fragment>
 
 <tal:block define="browserObjectUrl python:request.get('_browserObjectUrl');
-                                                                        fragments python:(browserObjectUrl and browserObjectUrl != here.absolute_url()) and ['Breadcrumbs', 'rightCell'] or request.get('syncFragments', []);"
-                                        condition="fragments">
-       <tal:loop define="main_macros here/main_template_macros/macros"
-                                               repeat="macroName fragments">
-               <fragment tal:attributes="id macroName"><span tal:replace="structure string:&lt;![CDATA[" />
-                       <metal:block metal:use-macro="python:main_macros[macroName]" />
-               <span tal:replace="structure string:]]>" /></fragment>
-       </tal:loop>
+                   fragments python:(browserObjectUrl and browserObjectUrl != here.absolute_url()) and ['Breadcrumbs', 'rightCell'] or request.get('syncFragments', []);"
+           condition="fragments">
+  <tal:loop define="main_macros here/main_template_macros/macros"
+            repeat="macroName fragments">
+    <fragment tal:attributes="id macroName"><span tal:replace="structure string:&lt;![CDATA[" />
+      <metal:block metal:use-macro="python:main_macros[macroName]" />
+    <span tal:replace="structure string:]]>" /></fragment>
+  </tal:loop>
 </tal:block>
 
 </fragments>
\ No newline at end of file
index 18a8971..d157ba1 100755 (executable)
               </div>
 
               <a name="documentContent"></a>
+              <div metal:define-slot="body" tal:omit-tag="">
               <div metal:define-slot="main_no_tabs" tal:omit-tag="">
                 <div tal:condition="specialCtxHeader" tal:content="structure specialCtxHeader">special context header</div>
                 <div id="ContentTabs" tal:condition="not:specialCtxHeader">
                   <div metal:define-slot="footer" tal:replace="nothing">footer slot</div>
                 </div>
               </div>
+              </div>
 
             </td>
             <!-- end_main_column -->