changeset 603:8ed0317633f8

better handling of no images in index page.
author casties
date Mon, 26 Nov 2012 14:03:36 +0100
parents ef1d0a1fc9fa
children 6e7bcc628a76
files zpt/viewer/viewer_index.zpt
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/viewer/viewer_index.zpt	Mon Nov 26 13:49:43 2012 +0100
+++ b/zpt/viewer/viewer_index.zpt	Mon Nov 26 14:03:36 2012 +0100
@@ -43,7 +43,7 @@
     <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"
+        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"
         src="template/book.png" /></a>