Mercurial > hg > documentViewer
annotate zpt/viewer_images.zpt @ 541:c4cc01b104d7
better metadata display for index page.
author | casties |
---|---|
date | Mon, 20 Aug 2012 20:13:56 +0200 |
parents | 4b43a57ad9b3 |
children | 6cdc31e9ed8e |
rev | line source |
---|---|
483 | 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; | |
503 | 5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; |
483 | 6 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;"> |
7 <head> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
9 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
10 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
11 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.js"></script> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
12 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.cookie.js"></script> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
13 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.js"></script> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
14 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.geometry.js"></script> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
15 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.arrows.js"></script> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
16 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.marks.js"></script> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
17 <link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" /> |
483 | 18 |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
19 <script type="text/javascript" |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
20 tal:content="python:'''\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
21 var dlOpts = {\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
22 'interactionMode' : 'fullscreen',\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
23 'digilibBaseUrl' : '%s',\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
24 'fn' : '%s',\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
25 'pn' : '%s',\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
26 'suppressParamNames' : ['fn'],\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
27 'scalerInsets' : {'x':300, 'y':100}\n |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
28 };\n'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"></script> |
483 | 29 |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
30 <script type="text/javascript"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
31 // <!-- |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
32 $(document).ready(function() { |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
33 // autosubmit forms |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
34 $('form.autosubmit').find('.autosubmit').change(function() { |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
35 this.form.submit(); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
36 }); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
37 $('form.autosubmit input[type="submit"]').hide(); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
38 // get digilib div |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
39 $digilib = $('div#scaler'); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
40 // configure digilib |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
41 $digilib.digilib(dlOpts); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
42 }); |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
43 // --> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
44 </script> |
483 | 45 </head> |
46 <body tal:condition="numPages"> | |
47 <tal:block | |
48 tal:define="docpath docinfo/textURLPath | nothing; | |
49 pn pageinfo/pn; | |
512 | 50 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';"> |
490
6f116b86a226
more new template stuff. moved ImageFile index method to SrvTxtUtils
casties
parents:
489
diff
changeset
|
51 <div class="page-head"> |
501 | 52 <metal:block metal:use-macro="here/template/common_template/macros/head" /> |
490
6f116b86a226
more new template stuff. moved ImageFile index method to SrvTxtUtils
casties
parents:
489
diff
changeset
|
53 </div> |
485 | 54 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> |
501 | 55 <!-- table of contents --> |
510 | 56 <div class="col toc"> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
57 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> |
489
55e3398e395e
more new templates. monkey-patch for App.ImageFile.
casties
parents:
485
diff
changeset
|
58 </div> |
493 | 59 <!-- col-main: text page --> |
510 | 60 <div class="col main"> |
540 | 61 <div class="ruler top"> |
501 | 62 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> |
63 </div> | |
540 | 64 <div class="content images"> |
498 | 65 <div id="scaler"> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
532
diff
changeset
|
66 <img tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" /> |
483 | 67 </div> |
501 | 68 </div> |
69 <!-- /content --> | |
70 </div> | |
71 <!-- /col-main --> | |
510 | 72 <div class="col buttons"> |
538 | 73 <div class="options digilib"> |
74 <ul> | |
75 <li><a href="javascript:$digilib.digilib('zoomBy', 1.4)"> <img tal:condition="exists:here/template/zoom-in.png" | |
76 tal:attributes="src here/template/zoom-in.png/absolute_url" /> zoom in | |
77 </a></li> | |
78 <li><a href="javascript:$digilib.digilib('zoomBy', 0.7)"> <img | |
79 tal:condition="exists:here/template/zoom-out.png" tal:attributes="src here/template/zoom-out.png/absolute_url" /> | |
80 zoom out | |
81 </a></li> | |
82 <li><a href="javascript:$digilib.digilib('zoomArea')"> <img tal:condition="exists:here/template/zoom-area.png" | |
83 tal:attributes="src here/template/zoom-area.png/absolute_url" /> zoom area | |
84 </a></li> | |
85 <li><a href="javascript:$digilib.digilib('zoomFull')"> <img tal:condition="exists:here/template/zoom-full.png" | |
86 tal:attributes="src here/template/zoom-full.png/absolute_url" /> full page | |
87 </a></li> | |
88 <li><a href="javascript:$digilib.digilib('zoomFull', 'width')"> <img | |
89 tal:condition="exists:here/template/pagewidth.png" tal:attributes="src here/template/pagewidth.png/absolute_url" /> page | |
90 width | |
91 </a></li> | |
92 <li><a href="javascript:$digilib.digilib('setMark')"> <img tal:condition="exists:here/template/mark.png" | |
93 tal:attributes="src here/template/mark.png/absolute_url" /> set mark | |
94 </a></li> | |
95 <li><a href="javascript:$digilib.digilib('removeMark')"> <img tal:condition="exists:here/template/delmark.png" | |
96 tal:attributes="src here/template/delmark.png/absolute_url" /> remove mark | |
97 </a></li> | |
98 <li><a href="javascript:$digilib.digilib('reference')"> <img tal:condition="exists:here/template/reference.png" | |
99 tal:attributes="src here/template/reference.png/absolute_url" /> get reference | |
100 </a></li> | |
101 <li><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')"> <img | |
102 tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" /> | |
103 digilib | |
104 </a></li> | |
105 </ul> | |
501 | 106 </div> |
483 | 107 </div> |
501 | 108 </div> |
109 <!-- page-body --> | |
485 | 110 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> |
483 | 111 <div class="errortext">Sorry, access to this document is restricted.</div> |
112 </div> | |
113 </tal:block> | |
114 </body> | |
115 <body tal:condition="not:numPages"> | |
116 <div class="errortext">Sorry, document doesn't exist.</div> | |
117 </body> | |
118 </html> |