Mercurial > hg > documentViewer
annotate zpt/viewer_thumbs.zpt @ 557:abcb67f5cab4
better configurable annotation server.
author | casties |
---|---|
date | Wed, 26 Sep 2012 23:20:06 +0200 |
parents | 6cdc31e9ed8e |
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; | |
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"> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
44 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> |
528 | 45 </div> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
46 <div class="content-thumbs"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
47 <table class="thumbs"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
48 <tr tal:repeat="row pageBatch/pages"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
49 <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
|
50 tal:define="idx thumb/idx" tal:condition="idx" |
528 | 51 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
|
52 tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=thumbSize,dh=thumbSize,docinfo=docinfo),'images/pic'); |
528 | 53 alt idx" /><br /> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
54 <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
|
55 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
|
56 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
|
57 </a></td> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
58 </tr> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
59 </table> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
60 </div> |
540 | 61 <div class="ruler bottom"> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
62 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> |
528 | 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})" | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
75 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
528 | 76 <ul> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
77 <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
|
78 <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
|
79 </select> |
528 | 80 </li> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
81 <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
|
82 <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
|
83 </select> |
528 | 84 </li> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
528
diff
changeset
|
85 <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
|
86 <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
|
87 </select> |
528 | 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> | |
543 | 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> | |
528 | 102 </tal:block> |
103 </body> | |
104 <body tal:condition="not:numPages"> | |
105 <div class="errortext">Sorry, document doesn't exist.</div> | |
543 | 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> | |
528 | 110 </body> |
111 </html> |