528
|
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
|
|
45 metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" />
|
|
46 </div>
|
|
47
|
|
48 <table class="thumbs">
|
|
49 <tr tal:repeat="row pageBatch/pages">
|
|
50 <td tal:repeat="thumb row"
|
|
51 tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')">
|
|
52 <a tal:define="idx thumb/idx" tal:condition="idx"
|
|
53 tal:attributes="href python:here.getLink(params={'pn':idx, 'viewMode':'images'})"> <img
|
|
54 tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=thumbSize,dh=thumbSize,docinfo=docinfo),'images/pic');
|
|
55 alt idx" /><br />
|
|
56 <span title="Scan number" tal:content="idx" /> <span
|
|
57 tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']"
|
|
58 title="Original page number"
|
|
59 tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" />
|
|
60 </a>
|
|
61 </td>
|
|
62 </tr>
|
|
63 </table>
|
|
64
|
|
65 <div class="ruler">
|
|
66 <metal:block
|
|
67 metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" />
|
|
68 </div>
|
|
69
|
|
70 </div>
|
|
71 <!-- /col-main -->
|
|
72
|
|
73 <!-- right-side options -->
|
|
74 <div class="col buttons">
|
|
75 <!--"BEGIN TEXT DISPLAY" -->
|
|
76 <div class="options">
|
|
77 <h4>Thumbnail display</h4>
|
|
78 <form tal:attributes="action viewerUrl" class="autosubmit">
|
|
79 <input type="hidden"
|
|
80 tal:define="params python:here.getParams(params={'thumbRows':None,'thumbCols':None,'thumbSize':None})"
|
|
81 tal:repeat="param params"
|
|
82 tal:attributes="name param; value python:params[param]" />
|
|
83 <ul>
|
|
84 <li>
|
|
85 Rows
|
|
86 <select class="autosubmit" name="thumbRows" tal:define="rows python:[2,3,5,10,12,15,20,50,100]">
|
|
87 <option tal:repeat="row rows" tal:attributes="selected python:thumbRows==row; value row" tal:content="row"/>
|
|
88 </select>
|
|
89 </li>
|
|
90 <li>
|
|
91 Columns
|
|
92 <select class="autosubmit" name="thumbCols" tal:define="cols python:[2,3,5,10,12,15,20,50,100]">
|
|
93 <option tal:repeat="col cols" tal:attributes="selected python:thumbCols==col; value col" tal:content="col"/>
|
|
94 </select>
|
|
95 </li>
|
|
96 <li>
|
|
97 Thumbnail size
|
|
98 <select class="autosubmit" name="thumbSize" tal:define="sizes python:[100,150,200,300,500]">
|
|
99 <option tal:repeat="size sizes" tal:attributes="selected python:thumbSize==size; value size" tal:content="size"/>
|
|
100 </select>
|
|
101 </li>
|
|
102 </ul>
|
|
103 </form>
|
|
104 </div>
|
|
105 </div>
|
|
106 </div>
|
|
107 <!-- page-body -->
|
|
108 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
|
|
109 <div class="errortext">Sorry, access to this document is restricted.</div>
|
|
110 </div>
|
|
111 </tal:block>
|
|
112 </body>
|
|
113 <body tal:condition="not:numPages">
|
|
114 <div class="errortext">Sorry, document doesn't exist.</div>
|
|
115 </body>
|
|
116 </html> |