view zpt/toc_thumbs.zpt @ 493:79d414cead6d elementtree

first button for digilib
author casties
date Mon, 05 Sep 2011 11:10:36 +0200
parents 55e3398e395e
children 7d7b639d7be7
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;
                left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']);
                right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);">
    <ul class="toctype">
      <li class="sel">
        <a tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>
      </li>
      <li tal:condition="python:docinfo.get('numTocEntries', None)">
        <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a>
      </li>
      <li tal:condition="python:docinfo.get('numFigureEntries', None)">
        <a tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a>
      </li>
      <li>
        <a tal:attributes="href python:here.getLink('tocMode','none')">None</a>
      </li>
    </ul>

    <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 tal:content="idx" />
            </a>
          </td>
        </tr>
      </table>
    </div> <!-- content -->
  </div> <!-- toc -->
</body>
</html>