view zpt/toc_thumbs.zpt @ 526:3f375a048402

moved search and dict into separate layers. removed search_template. added tocMode=concordance. fixed bug with paging tocs.
author casties
date Tue, 10 Apr 2012 19:41:44 +0200
parents acdbd82114bb
children f8a5f63eafc0
line wrap: on
line source

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
  <!-- block used for main content area -->
  <div class="toc-thumbs" metal:define-macro="main"
    tal:define="start pageinfo/start;
                grpsize pageinfo/groupsize;
                numgroups pageinfo/numgroups;
                pageBatch pageinfo/pageBatch; pageZero pageinfo/pageZero;
                pageNumbers docinfo/pageNumbers | nothing;
                left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']);
                right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);">
    <div metal:use-macro="here/template/common_template/macros/toc_switcher"/>

    <div class="content">
      <div class="ruler">
        <form class="autosubmit" tal:attributes="action viewerUrl">
          <input type="hidden" tal:define="params python:here.getParams('start',None)"
            tal:repeat="param params"
            tal:attributes="name param; value python:params[param]" /> 
          <a tal:condition="left" tal:attributes="href python:here.getLink('start',left)">&lt;</a>
          <span tal:condition="not:left">&lt;</span>
          <select class="autosubmit" name="start"
            tal:define="ofs python:test(pageinfo['pageZero'],0,1)">
            <tal:block >
              <option tal:repeat="grp pageBatch/batches"
                tal:attributes="selected python:start==grp['start']; value grp/start;"
                tal:content="string:${grp/start} - ${grp/end}" />
            </tal:block>
          </select>
          <input type="submit" value="Go" /> 
          <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">&gt;</a>
          <span tal:condition="not:right">&gt;</span>
        </form>
      </div>

      <table class="thumbs">
        <tr tal:repeat="row pageBatch/pages">
          <td tal:repeat="thumb row"
            tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')">
            <a tal:define="idx thumb/idx" tal:condition="idx"
              tal:attributes="href python:here.getLink('pn',idx)">
              <img
                tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'images/pic');
                                alt idx" /><br/>
              <span title="Scan number" tal:content="idx"/>
              <span tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']" title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])"/>
            </a>
          </td>
        </tr>
      </table>
    </div> <!-- content -->
  </div> <!-- toc -->
</body>
</html>