source: documentViewer/zpt/viewer_thumbs.zpt @ 557:abcb67f5cab4

Last change on this file since 557:abcb67f5cab4 was 543:6cdc31e9ed8e, checked in by casties, 12 years ago

fixed problem with dict-mode in default view.
added configurable footer and logo in site_template.pt

File size: 5.4 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml"
4  tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
5              viewerUrl docinfo/viewerUrl;
6              rootUrl here/getDocumentViewerURL;
7              numPages docinfo/numPages | nothing;">
8<head>
9<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
11<link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
12<script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
13<script type="text/javascript">
14        // <!--
15        $(document).ready(function() {
16                // autosubmit forms
17                $('form.autosubmit').find('.autosubmit').change(function() {
18                        this.form.submit();
19                });
20                $('form.autosubmit input[type="submit"]').hide();
21        });
22// -->
23</script>
24</head>
25<body tal:condition="numPages">
26  <tal:block
27    tal:define="pn pageinfo/pn;
28                start pageinfo/start;
29                thumbRows python:int(request.get('thumbRows', 10));
30                thumbCols python:int(request.get('thumbCols', 12));
31                thumbSize python:int(request.get('thumbSize', 100));
32                flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
33                pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, maxIdx=numPages);
34                pageNumbers docinfo/pageNumbers | nothing;
35                left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']);
36                right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);">
37    <div class="page-head">
38      <metal:block metal:use-macro="here/template/common_template/macros/head" />
39    </div>
40    <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
41      <!-- col-main: text page -->
42      <div class="col main">
43        <div class="ruler">
44          <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" />
45        </div>
46        <div class="content-thumbs">
47          <table class="thumbs">
48            <tr tal:repeat="row pageBatch/pages">
49              <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a
50                tal:define="idx thumb/idx" tal:condition="idx"
51                tal:attributes="href python:here.getLink(params={'pn':idx, 'viewMode':'images'})"> <img
52                  tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=thumbSize,dh=thumbSize,docinfo=docinfo),'images/pic');
53                                alt idx" /><br />
54                  <span title="Scan number" tal:content="idx" /> <span
55                  tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']"
56                  title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" />
57              </a></td>
58            </tr>
59          </table>
60        </div>
61        <div class="ruler bottom">
62          <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" />
63        </div>
64      </div>
65      <!-- /col-main -->
66
67      <!-- right-side options -->
68      <div class="col buttons">
69        <!--"BEGIN TEXT DISPLAY"  -->
70        <div class="options">
71          <h4>Thumbnail display</h4>
72          <form tal:attributes="action viewerUrl" class="autosubmit">
73            <input type="hidden"
74              tal:define="params python:here.getParams(params={'thumbRows':None,'thumbCols':None,'thumbSize':None})"
75              tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
76            <ul>
77              <li>Rows <select class="autosubmit" name="thumbRows" tal:define="rows python:[2,3,5,10,12,15,20,50,100]">
78                  <option tal:repeat="row rows" tal:attributes="selected python:thumbRows==row; value row" tal:content="row" />
79              </select>
80              </li>
81              <li>Columns <select class="autosubmit" name="thumbCols" tal:define="cols python:[2,3,5,10,12,15,20,50,100]">
82                  <option tal:repeat="col cols" tal:attributes="selected python:thumbCols==col; value col" tal:content="col" />
83              </select>
84              </li>
85              <li>Thumbnail size <select class="autosubmit" name="thumbSize" tal:define="sizes python:[100,150,200,300,500]">
86                  <option tal:repeat="size sizes" tal:attributes="selected python:thumbSize==size; value size" tal:content="size" />
87              </select>
88              </li>
89            </ul>
90          </form>
91        </div>
92      </div>
93    </div>
94    <!-- page-body -->
95    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
96      <div class="errortext">Sorry, access to this document is restricted.</div>
97    </div>
98    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
99      <!-- footer -->
100      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
101    </tal:block>
102  </tal:block>
103</body>
104<body tal:condition="not:numPages">
105  <div class="errortext">Sorry, document doesn't exist.</div>
106  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
107    <!-- footer -->
108    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
109  </tal:block>
110</body>
111</html>
Note: See TracBrowser for help on using the repository browser.