changeset 606:37ad612edf5a

fixed bug in indexonly with no image.
author casties
date Tue, 11 Dec 2012 16:33:12 -0500
parents 530a9a024450
children cb5a9c4f5e3a
files zpt/viewer/viewer_index.zpt zpt/viewer/viewer_indexonly.zpt
diffstat 2 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/viewer/viewer_index.zpt	Tue Dec 11 16:11:39 2012 -0500
+++ b/zpt/viewer/viewer_index.zpt	Tue Dec 11 16:33:12 2012 -0500
@@ -15,6 +15,7 @@
 <link rel="stylesheet" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" />
 <script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></script>
 <script type="text/javascript">
+// <!--
 	$(document).ready(function() {
 		// autosubmit forms
 		$('form.autosubmit').find('.autosubmit').change(function() {
--- a/zpt/viewer/viewer_indexonly.zpt	Tue Dec 11 16:11:39 2012 -0500
+++ b/zpt/viewer/viewer_indexonly.zpt	Tue Dec 11 16:33:12 2012 -0500
@@ -25,10 +25,10 @@
 
     <div class="col index-image">
       <!-- image -->
-      <a tal:define="tp docinfo/titlePage | string:1"
-        tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0"
+      <a tal:define="tp docinfo/titlePage | string:1" tal:condition="python:docinfo.get('imageURL',None) and tp or exists('here/template/book.png')"
+        tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="python:docinfo.get('imageURL',None) and tp" border="0"
         tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img
-        tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0"
+        tal:condition="python:(not docinfo.get('imageURL',None)) and exists('here/template/book.png')" border="0"
         src="template/book.png" /></a>
     </div>
 
@@ -44,12 +44,14 @@
 
           <tal:x condition="not:formattedData">
             <!-- kein template fuer die daten -->
-            <tal:x condition="exists:docinfo/bib">
-              <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
-                <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
-                <td class="content" tal:content="bibinfo/bib" />
-              </tr>
-            </tal:x>
+            <tal:block condition="exists:docinfo/bib">
+              <tal:block tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
+                <tr tal:condition="python:bib[0]!='@'">
+                  <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
+                  <td class="content" tal:content="python:bibinfo[bib]" />
+                </tr>
+              </tal:block>
+            </tal:block>
 
             <tal:y condition="not:exists:docinfo/bib">
               <!-- wenn es kein bibinfo gibt (archimedes-texte) -->