source: documentViewer/zpt/viewer/viewer_thumbs.zpt @ 607:cb5a9c4f5e3a

Last change on this file since 607:cb5a9c4f5e3a was 607:cb5a9c4f5e3a, checked in by casties, 11 years ago

CLOSED - # 268: display of subdocuments
https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-software/ticket/268

File size: 5.5 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                minPageNo docinfo/minPageNo;
30                maxPageNo docinfo/maxPageNo;
31                thumbRows python:int(request.get('thumbRows', 10));
32                thumbCols python:int(request.get('thumbCols', 12));
33                thumbSize python:int(request.get('thumbSize', 100));
34                flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
35                pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, minIdx=minPageNo, maxIdx=maxPageNo);
36                pageNumbers docinfo/pageNumbers | nothing;
37                left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']);
38                right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);">
39    <div class="page-head">
40      <metal:block metal:use-macro="here/template/common_template/macros/head" />
41    </div>
42    <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
43      <!-- col-main: text page -->
44      <div class="col main">
45        <div class="ruler">
46          <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" />
47        </div>
48        <div class="content-thumbs">
49          <table class="thumbs">
50            <tr tal:repeat="row pageBatch/pages">
51              <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a
52                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" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" />
59              </a></td>
60            </tr>
61          </table>
62        </div>
63        <div class="ruler bottom">
64          <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" />
65        </div>
66      </div>
67      <!-- /col-main -->
68
69      <!-- right-side options -->
70      <div class="col buttons">
71        <!--"BEGIN TEXT DISPLAY"  -->
72        <div class="options">
73          <h4>Thumbnail display</h4>
74          <form tal:attributes="action viewerUrl" class="autosubmit">
75            <input type="hidden"
76              tal:define="params python:here.getParams(params={'thumbRows':None,'thumbCols':None,'thumbSize':None})"
77              tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
78            <ul>
79              <li>Rows <select class="autosubmit" name="thumbRows" tal:define="rows python:[2,3,5,10,12,15,20,50,100]">
80                  <option tal:repeat="row rows" tal:attributes="selected python:thumbRows==row; value row" tal:content="row" />
81              </select>
82              </li>
83              <li>Columns <select class="autosubmit" name="thumbCols" tal:define="cols python:[2,3,5,10,12,15,20,50,100]">
84                  <option tal:repeat="col cols" tal:attributes="selected python:thumbCols==col; value col" tal:content="col" />
85              </select>
86              </li>
87              <li>Thumbnail size <select class="autosubmit" name="thumbSize" tal:define="sizes python:[100,150,200,300,500]">
88                  <option tal:repeat="size sizes" tal:attributes="selected python:thumbSize==size; value size" tal:content="size" />
89              </select>
90              </li>
91            </ul>
92          </form>
93        </div>
94      </div>
95    </div>
96    <!-- page-body -->
97    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
98      <div class="errortext">Sorry, access to this document is restricted.</div>
99    </div>
100    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
101      <!-- footer -->
102      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
103    </tal:block>
104  </tal:block>
105</body>
106<body tal:condition="not:numPages">
107  <div class="errortext">Sorry, document doesn't exist.</div>
108  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
109    <!-- footer -->
110    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
111  </tal:block>
112</body>
113</html>
Note: See TracBrowser for help on using the repository browser.