[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_contents.pt:1.3 collector_issue_contents.pt:1.4 collector_issue_followup_form.pt:1.4 collector_macros.pt:1.3

Ken Manheimer klm@zope.com
Fri, 12 Oct 2001 11:46:20 -0400


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

Modified Files:
	collector_contents.pt collector_issue_contents.pt 
	collector_issue_followup_form.pt collector_macros.pt 
Log Message:
Provide for site master templates that lack a "header" slot (which is
a new addition to the CMFDecor ZPT skin, and may not be present on the
zope.org templates, etc).  We _do_ require that at least a 'main' slot
is present.

 - In the macro template collector_header and collector_issue_header
   macros, we define global "presence" vars ('collector_header_present'
   and 'collector_issue_header_present', respectively).

 - In the pages that use the macros (collector_contents,
   collector_issue_contents, and collector_issue_followup_form, so
   far), we include an extra bit in the part that fills the "main"
   slot, that includes the header if the global "presence" var is not
   found. 

This way, master templates that include the "header" slot will be
filled, and the header won't show in the "main" slot, but when the
master template lacks the "header" slot, the collector and issue
headers will be included in the stuff that fills the main slot.


=== CMF/CMFCollector/skins/collector/collector_contents.pt 1.2 => 1.3 ===
 <div metal:fill-slot="main">
 
+<div tal:condition="not: collector_header_present|nothing">
+  <span tal:condition="nothing"> If master has no macro "header"... </span>
+  <div metal:use-macro="here/collector_macros/macros/collector_header">
+    COLLECTOR HEADER
+  </div>
+
+</div>
+
 <!-- This is the desktop area -->
 <div class="Desktop"
      tal:define="Batch python:modules['ZTUtils'].Batch;


=== CMF/CMFCollector/skins/collector/collector_issue_contents.pt 1.3 => 1.4 ===
 <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>
+    <div metal:use-macro="here/collector_macros/macros/issue_header">
+      ISSUE HEADER
+    </div>
+  </div>
+
   <div metal:define-macro="transcript">
 
     <table tal:define="transcript here/get_transcript">


=== CMF/CMFCollector/skins/collector/collector_issue_followup_form.pt 1.3 => 1.4 ===
 <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>
+    <div metal:use-macro="here/collector_macros/macros/issue_header">
+      ISSUE HEADER
+    </div>
+  </div>
+
   <form method="POST" enctype="multipart/form-data"
         action="collector_issue_followup">
 


=== CMF/CMFCollector/skins/collector/collector_macros.pt 1.2 => 1.3 ===
 
     <div metal:define-macro="collector_header"
-         tal:define="upNav python: hasattr(here.aq_parent, 'portal_url');
+         tal:define="global collector_header_present python: 1;
+                     upNav python: hasattr(here.aq_parent, 'portal_url');
                      upID python: here.aq_parent.getId()">
 
       <table>
@@ -46,7 +47,8 @@
     </div>
 
     <div metal:define-macro="issue_header"
-         tal:define="crdate python: here.creation_date.aCommon();
+         tal:define="global collector_issue_header_present python: 1;
+                     crdate python: here.creation_date.aCommon();
                      DateTime nocall: modules/DateTime/DateTime;
                      moddate python:
                                 DateTime(here.ModificationDate()).aCommon();