Mercurial > hg > documentViewer
diff zpt/viewer/viewer_indexonly.zpt @ 606:37ad612edf5a
fixed bug in indexonly with no image.
author | casties |
---|---|
date | Tue, 11 Dec 2012 16:33:12 -0500 |
parents | da7daa783df4 |
children |
line wrap: on
line diff
--- 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) -->