Changeset 606:37ad612edf5a in documentViewer for zpt


Ignore:
Timestamp:
Dec 11, 2012, 9:33:12 PM (11 years ago)
Author:
casties
Branch:
default
Message:

fixed bug in indexonly with no image.

Location:
zpt/viewer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zpt/viewer/viewer_index.zpt

    r605 r606  
    1616<script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></script>
    1717<script type="text/javascript">
     18// <!--
    1819        $(document).ready(function() {
    1920                // autosubmit forms
  • zpt/viewer/viewer_indexonly.zpt

    r594 r606  
    2626    <div class="col index-image">
    2727      <!-- image -->
    28       <a tal:define="tp docinfo/titlePage | string:1"
    29         tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0"
     28      <a tal:define="tp docinfo/titlePage | string:1" tal:condition="python:docinfo.get('imageURL',None) and tp or exists('here/template/book.png')"
     29        tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="python:docinfo.get('imageURL',None) and tp" border="0"
    3030        tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img
    31         tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0"
     31        tal:condition="python:(not docinfo.get('imageURL',None)) and exists('here/template/book.png')" border="0"
    3232        src="template/book.png" /></a>
    3333    </div>
     
    4545          <tal:x condition="not:formattedData">
    4646            <!-- kein template fuer die daten -->
    47             <tal:x condition="exists:docinfo/bib">
    48               <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
    49                 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
    50                 <td class="content" tal:content="bibinfo/bib" />
    51               </tr>
    52             </tal:x>
     47            <tal:block condition="exists:docinfo/bib">
     48              <tal:block tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
     49                <tr tal:condition="python:bib[0]!='@'">
     50                  <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
     51                  <td class="content" tal:content="python:bibinfo[bib]" />
     52                </tr>
     53              </tal:block>
     54            </tal:block>
    5355
    5456            <tal:y condition="not:exists:docinfo/bib">
Note: See TracChangeset for help on using the changeset viewer.