[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_contents.pt:1.20 collector_issue_contents.pt:1.8 collector_issue_edit_form.pt:1.10 collector_issue_followup_form.pt:1.13 collector_macros.pt:1.26

Ken Manheimer klm@zope.com
Wed, 31 Oct 2001 19:52:39 -0500


Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv5485/skins/collector

Modified Files:
	collector_contents.pt collector_issue_contents.pt 
	collector_issue_edit_form.pt collector_issue_followup_form.pt 
	collector_macros.pt 
Log Message:
Use a self-contained scheme for determining whether the template has a
header macro, and doing the right thing.  This exploits the fact that
a failed fill-slot will cause a tal:define on the same tag to not
fire.  I presume i can count on this behavior - will have to check
w/evan.  Too cool!

This means that the stuff being used to fill the slot (in this case,
another macro) need not doing the global define - the define and the
check for the value are both contained within the same template.


=== CMF/CMFCollector/skins/collector/collector_contents.pt 1.19 => 1.20 ===
 <body>
 
-<div metal:fill-slot="header">
-
+<div metal:fill-slot="header"
+     tal:define="global collector_header_present python: 1">
   <div metal:use-macro="here/collector_macros/macros/collector_header">
     COLLECTOR HEADER
   </div>
-
 </div>
 
 <div metal:fill-slot="main">
 
 <div tal:condition="not: collector_header_present|nothing">
-  <span tal:condition="nothing"> If master has no macro "header"... </span>
+  <!-- Master template has no "header" macro... -->
   <div metal:use-macro="here/collector_macros/macros/collector_header">
     COLLECTOR HEADER
   </div>
-
 </div>
 
 <!-- This is the desktop area -->


=== CMF/CMFCollector/skins/collector/collector_issue_contents.pt 1.7 => 1.8 ===
 </span>
 
-<div metal:fill-slot="header">
-
+<div metal:fill-slot="header"
+     tal:define="global collector_issue_header_present python: 1">
   <div metal:use-macro="here/collector_macros/macros/issue_header">
-
     ISSUE HEADER
-
   </div>
-
 </div>
 
 <div metal:fill-slot="main">
 
   <div tal:condition="not: collector_issue_header_present|nothing">
-    <span tal:condition="nothing"> When master has no macro "header"... </span>
+    <!-- Master template has no "header" macro... -->
     <div metal:use-macro="here/collector_macros/macros/issue_header">
       ISSUE HEADER
     </div>


=== CMF/CMFCollector/skins/collector/collector_issue_edit_form.pt 1.9 => 1.10 ===
 </span>
 
-<div metal:fill-slot="header">
+<div metal:fill-slot="header"
+     tal:define="global collector_issue_header_present python: 1">
 
   <div metal:use-macro="here/collector_macros/macros/issue_header">
     ISSUE HEADER
@@ -24,7 +25,7 @@
 <div metal:fill-slot="main">
 
   <div tal:condition="not: collector_issue_header_present|nothing">
-    <span tal:condition="nothing"> When master has no macro "header"... </span>
+    <!-- Master template has no "header" macro... -->
     <div metal:use-macro="here/collector_macros/macros/issue_header">
       ISSUE HEADER
     </div>


=== CMF/CMFCollector/skins/collector/collector_issue_followup_form.pt 1.12 => 1.13 ===
 </span>
 
-<div metal:fill-slot="header">
-
+<div metal:fill-slot="header"
+     tal:define="global collector_issue_header_present python: 1">
   <div metal:use-macro="here/collector_macros/macros/issue_header">
-
     ISSUE HEADER
-
   </div>
-
 </div>
 
 <div metal:fill-slot="main">
 
   <div tal:condition="not: collector_issue_header_present|nothing">
-    <span tal:condition="nothing"> When master has no macro "header"... </span>
+    <!-- Master template has no "header" macro... -->
     <div metal:use-macro="here/collector_macros/macros/issue_header">
       ISSUE HEADER
     </div>


=== CMF/CMFCollector/skins/collector/collector_macros.pt 1.25 => 1.26 ===
     </span>
 
-    <div metal:define-macro="collector_header"
-         tal:define="global collector_header_present python: 1">
+    <div metal:define-macro="collector_header">
 
       <table>
         <tr>
@@ -47,8 +46,7 @@
     </div>  <!-- End macro: collector_header -->
 
     <div metal:define-macro="issue_header"
-         tal:define="global collector_issue_header_present python: 1;
-                     TITLELEN python: 150;
+         tal:define="TITLELEN python: 150;
                      split nocall: modules/string/split;
                      TRUNCDESCR python: 150;
                      global artifacts