diff zpt/viewer_text.zpt @ 543:6cdc31e9ed8e

fixed problem with dict-mode in default view. added configurable footer and logo in site_template.pt
author casties
date Wed, 22 Aug 2012 16:25:38 +0200
parents 4b43a57ad9b3
children fc34eff7b52d
line wrap: on
line diff
--- a/zpt/viewer_text.zpt	Tue Aug 21 13:28:35 2012 +0200
+++ b/zpt/viewer_text.zpt	Wed Aug 22 16:25:38 2012 +0200
@@ -14,7 +14,7 @@
 <!--[if IE]><link rel="stylesheet" href="template/docuviewer_ie_css" type="text/css" /><![endif]-->
 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
 <script type="text/javascript">
-	// <!--
+// <!--
 	$(document).ready(function() {
 		// autosubmit forms
 		$('form.autosubmit').find('.autosubmit').change(function() {
@@ -37,7 +37,7 @@
     tal:define="docpath docinfo/textURLPath | nothing;
                 pn pageinfo/pn; 
                 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
-                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
+                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);">
     <!-- header -->
     <div class="page-head">
       <metal:block metal:use-macro="here/template/common_template/macros/head" />
@@ -54,10 +54,11 @@
         <div class="ruler top">
           <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
         </div>
-        <div class="content text">
+        <div class="content text" tal:condition="textPage">
           <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle"
             tal:content="structure pageinfo/pageHeaderTitle" />
-          <tal:block tal:replace="structure textPage" />
+          <tal:block tal:condition="textPage" tal:replace="structure textPage"/>
+          <div class="emptyPage" tal:condition="not:textPage">[Empty page]</div>
         </div>
       </div>
       <!-- end of col-main -->
@@ -139,10 +140,18 @@
     <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
       <div class="errortext">Sorry, access to this document is restricted.</div>
     </div>
-
+    
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
   </tal:block>
 </body>
 <body tal:condition="not:numPages">
   <div class="errortext">Sorry, document doesn't exist.</div>
+    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
+      <!-- footer -->
+      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
+    </tal:block>
 </body>
 </html>