annotate zpt/viewer_images.zpt @ 540:4b43a57ad9b3

more nicer
author casties
date Thu, 16 Aug 2012 19:09:49 +0200
parents dbf25bd05fc6
children 6cdc31e9ed8e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
ab9b34a1c62a more new templates
casties
parents:
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
3 <html xmlns="http://www.w3.org/1999/xhtml"
ab9b34a1c62a more new templates
casties
parents:
diff changeset
4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
503
030251fe9dbc more cleanup.
casties
parents: 501
diff changeset
5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
6 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
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
ab9b34a1c62a more new templates
casties
parents:
diff changeset
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
ab9b34a1c62a more new templates
casties
parents:
diff changeset
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
ab9b34a1c62a more new templates
casties
parents:
diff changeset
45 </head>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
46 <body tal:condition="numPages">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
47 <tal:block
ab9b34a1c62a more new templates
casties
parents:
diff changeset
48 tal:define="docpath docinfo/textURLPath | nothing;
ab9b34a1c62a more new templates
casties
parents:
diff changeset
49 pn pageinfo/pn;
512
92a6443a6f16 fix pageFlow.
casties
parents: 510
diff changeset
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
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
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
1e51d440f08b more new templates
casties
parents: 483
diff changeset
54 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
55 <!-- table of contents -->
510
4fb35343d2e7 more search. nicer css.
casties
parents: 503
diff changeset
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
79d414cead6d first button for digilib
casties
parents: 492
diff changeset
59 <!-- col-main: text page -->
510
4fb35343d2e7 more search. nicer css.
casties
parents: 503
diff changeset
60 <div class="col main">
540
4b43a57ad9b3 more nicer
casties
parents: 538
diff changeset
61 <div class="ruler top">
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
62 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
63 </div>
540
4b43a57ad9b3 more nicer
casties
parents: 538
diff changeset
64 <div class="content images">
498
3146b4e7b6a5 more clean up.
casties
parents: 493
diff changeset
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
ab9b34a1c62a more new templates
casties
parents:
diff changeset
67 </div>
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
68 </div>
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
69 <!-- /content -->
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
70 </div>
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
71 <!-- /col-main -->
510
4fb35343d2e7 more search. nicer css.
casties
parents: 503
diff changeset
72 <div class="col buttons">
538
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
73 <div class="options digilib">
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
74 <ul>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
75 <li><a href="javascript:$digilib.digilib('zoomBy', 1.4)"> <img tal:condition="exists:here/template/zoom-in.png"
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
76 tal:attributes="src here/template/zoom-in.png/absolute_url" /> zoom in
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
77 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
78 <li><a href="javascript:$digilib.digilib('zoomBy', 0.7)"> <img
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
79 tal:condition="exists:here/template/zoom-out.png" tal:attributes="src here/template/zoom-out.png/absolute_url" />
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
80 zoom out
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
81 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
82 <li><a href="javascript:$digilib.digilib('zoomArea')"> <img tal:condition="exists:here/template/zoom-area.png"
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
83 tal:attributes="src here/template/zoom-area.png/absolute_url" /> zoom area
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
84 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
85 <li><a href="javascript:$digilib.digilib('zoomFull')"> <img tal:condition="exists:here/template/zoom-full.png"
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
86 tal:attributes="src here/template/zoom-full.png/absolute_url" /> full page
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
87 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
88 <li><a href="javascript:$digilib.digilib('zoomFull', 'width')"> <img
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
89 tal:condition="exists:here/template/pagewidth.png" tal:attributes="src here/template/pagewidth.png/absolute_url" /> page
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
90 width
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
91 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
92 <li><a href="javascript:$digilib.digilib('setMark')"> <img tal:condition="exists:here/template/mark.png"
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
93 tal:attributes="src here/template/mark.png/absolute_url" /> set mark
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
94 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
95 <li><a href="javascript:$digilib.digilib('removeMark')"> <img tal:condition="exists:here/template/delmark.png"
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
96 tal:attributes="src here/template/delmark.png/absolute_url" /> remove mark
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
97 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
98 <li><a href="javascript:$digilib.digilib('reference')"> <img tal:condition="exists:here/template/reference.png"
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
99 tal:attributes="src here/template/reference.png/absolute_url" /> get reference
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
100 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
101 <li><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')"> <img
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
102 tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" />
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
103 digilib
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
104 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
105 </ul>
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
106 </div>
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
107 </div>
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
108 </div>
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
109 <!-- page-body -->
485
1e51d440f08b more new templates
casties
parents: 483
diff changeset
110 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
111 <div class="errortext">Sorry, access to this document is restricted.</div>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
112 </div>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
113 </tal:block>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
114 </body>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
115 <body tal:condition="not:numPages">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
116 <div class="errortext">Sorry, document doesn't exist.</div>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
117 </body>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
118 </html>