Mercurial > hg > documentViewer
annotate zpt/viewer/viewer_thumbs.zpt @ 614:d16da6e739ef
fix problem with utf8ify trying to encode ints.
author | casties |
---|---|
date | Mon, 21 Oct 2013 10:36:54 +0200 |
parents | cb5a9c4f5e3a |
children |
rev | line source |
---|---|
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"> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
14 // <!-- |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
15 $(document).ready(function() { |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
16 // autosubmit forms |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
17 $('form.autosubmit').find('.autosubmit').change(function() { |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
18 this.form.submit(); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
19 }); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
20 $('form.autosubmit input[type="submit"]').hide(); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
21 }); |
528 | 22 // --> |
23 </script> | |
24 </head> | |
25 <body tal:condition="numPages"> | |
26 <tal:block | |
27 tal:define="pn pageinfo/pn; | |
28 start pageinfo/start; | |
607 | 29 minPageNo docinfo/minPageNo; |
30 maxPageNo docinfo/maxPageNo; | |
528 | 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'; | |
607 | 35 pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, minIdx=minPageNo, maxIdx=maxPageNo); |
528 | 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"> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
46 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> |
528 | 47 </div> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
48 <div class="content-thumbs"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
49 <table class="thumbs"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
50 <tr tal:repeat="row pageBatch/pages"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
51 <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
52 tal:define="idx thumb/idx" tal:condition="idx" |
528 | 53 tal:attributes="href python:here.getLink(params={'pn':idx, 'viewMode':'images'})"> <img |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
54 tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=thumbSize,dh=thumbSize,docinfo=docinfo),'images/pic'); |
528 | 55 alt idx" /><br /> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
56 <span title="Scan number" tal:content="idx" /> <span |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
57 tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']" |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
58 title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
59 </a></td> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
60 </tr> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
61 </table> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
62 </div> |
540 | 63 <div class="ruler bottom"> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
64 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> |
528 | 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})" | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
77 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
528 | 78 <ul> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
79 <li>Rows <select class="autosubmit" name="thumbRows" tal:define="rows python:[2,3,5,10,12,15,20,50,100]"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
80 <option tal:repeat="row rows" tal:attributes="selected python:thumbRows==row; value row" tal:content="row" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
81 </select> |
528 | 82 </li> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
83 <li>Columns <select class="autosubmit" name="thumbCols" tal:define="cols python:[2,3,5,10,12,15,20,50,100]"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
84 <option tal:repeat="col cols" tal:attributes="selected python:thumbCols==col; value col" tal:content="col" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
85 </select> |
528 | 86 </li> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
87 <li>Thumbnail size <select class="autosubmit" name="thumbSize" tal:define="sizes python:[100,150,200,300,500]"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
88 <option tal:repeat="size sizes" tal:attributes="selected python:thumbSize==size; value size" tal:content="size" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
89 </select> |
528 | 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> | |
543 | 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> | |
528 | 104 </tal:block> |
105 </body> | |
106 <body tal:condition="not:numPages"> | |
107 <div class="errortext">Sorry, document doesn't exist.</div> | |
543 | 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> | |
528 | 112 </body> |
113 </html> |