Mercurial > hg > documentViewer
diff zpt/viewer_index.zpt @ 562:60f5a636bc57
bugfixes for stability.
author | casties |
---|---|
date | Tue, 02 Oct 2012 15:22:11 +0200 |
parents | 04c330b92cab |
children | 024b75162437 |
line wrap: on
line diff
--- a/zpt/viewer_index.zpt Mon Oct 01 18:09:01 2012 +0200 +++ b/zpt/viewer_index.zpt Tue Oct 02 15:22:11 2012 +0200 @@ -45,8 +45,8 @@ <!-- 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="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img - tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a> + 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> </div> <div class="col main"> @@ -118,11 +118,12 @@ <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the History of Science</a> (unless stated otherwise)</td> </tr> - <tr> + <tr tal:define="accType python:docinfo.get('accessType', None)"> <td class="type">License:</td> - <td tal:condition="python:docinfo.get('accessType', None) == 'free'" class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> + <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> - <td tal:condition="python:docinfo.get('accessType', None) != 'free'" class="content">Internal use only, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> + <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" tal:content="string: ($accType)"/>, + please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> (unless stated otherwise)</td> </tr> </table>