annotate zpt/viewer/viewer_image.zpt @ 597:fabd394302f1

image search layer uses different color for its annotations.
author casties
date Mon, 19 Nov 2012 13:15:57 +0100
parents da7daa783df4
children
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;
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
5 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers;
590
ed4485d2748e viewMode "images" changed to "image".
casties
parents: 585
diff changeset
6 availableLayers python:here.getAvailableLayers().get('image', None);
503
030251fe9dbc more cleanup.
casties
parents: 501
diff changeset
7 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
8 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
9 <head>
536
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
10 <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
11 <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
12 <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
13 <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
14 <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
15 <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
16 <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
17 <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
18 <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
19 <link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" />
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
20
536
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
21 <script type="text/javascript"
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
22 tal:content="python:'''\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
23 var dlOpts = {\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
24 'interactionMode' : 'fullscreen',\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
25 'digilibBaseUrl' : '%s',\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
26 'fn' : '%s',\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
27 'pn' : '%s',\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
28 'suppressParamNames' : ['fn'],\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
29 'scalerInsets' : {'x':300, 'y':100}\n
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
30 };\n'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"></script>
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
31
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
32 <!-- layer headers (rendered always) -->
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
33 <tal:block tal:repeat="layer availableLayers">
590
ed4485d2748e viewMode "images" changed to "image".
casties
parents: 585
diff changeset
34 <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
35 <metal:block metal:use-macro="python:path(mpath)" />
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
36 </tal:block>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
37 </tal:block>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
38
536
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
39 <script type="text/javascript">
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
40 // <!--
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
41 $(document).ready(function() {
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
42 // autosubmit forms
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
43 $('form.autosubmit').find('.autosubmit').change(function() {
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
44 this.form.submit();
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
45 });
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
46 $('form.autosubmit input[type="submit"]').hide();
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
47 // get digilib div
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
48 $digilib = $('div#scaler');
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
49 // configure digilib
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
50 $digilib.digilib(dlOpts);
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
51 });
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
52 // -->
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
53 </script>
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
54 </head>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
55 <body tal:condition="numPages">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
56 <tal:block
ab9b34a1c62a more new templates
casties
parents:
diff changeset
57 tal:define="docpath docinfo/textURLPath | nothing;
ab9b34a1c62a more new templates
casties
parents:
diff changeset
58 pn pageinfo/pn;
512
92a6443a6f16 fix pageFlow.
casties
parents: 510
diff changeset
59 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';">
490
6f116b86a226 more new template stuff. moved ImageFile index method to SrvTxtUtils
casties
parents: 489
diff changeset
60 <div class="page-head">
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
61 <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
62 </div>
485
1e51d440f08b more new templates
casties
parents: 483
diff changeset
63 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
64 <!-- table of contents -->
510
4fb35343d2e7 more search. nicer css.
casties
parents: 503
diff changeset
65 <div class="col toc">
536
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
66 <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
67 </div>
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
68 <!-- col-main: document page -->
510
4fb35343d2e7 more search. nicer css.
casties
parents: 503
diff changeset
69 <div class="col main">
540
4b43a57ad9b3 more nicer
casties
parents: 538
diff changeset
70 <div class="ruler top">
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
71 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
72 </div>
597
fabd394302f1 image search layer uses different color for its annotations.
casties
parents: 594
diff changeset
73 <div tal:attributes="class string:content image $viewLayer">
498
3146b4e7b6a5 more clean up.
casties
parents: 493
diff changeset
74 <div id="scaler">
536
abd36d4d97b8 new version of index page. improvements for digilib page and thumbnail overview.
casties
parents: 532
diff changeset
75 <img tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" />
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
76 </div>
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
77 </div>
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
78 <!-- /content -->
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
79 </div>
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
80 <!-- /col-main -->
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
81
510
4fb35343d2e7 more search. nicer css.
casties
parents: 503
diff changeset
82 <div class="col buttons">
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
83 <!-- layer switcher -->
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
84 <div class="options" tal:condition="availableLayers">
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
85 <h4>Image layer</h4>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
86 <form tal:attributes="action viewerUrl" class="autosubmit">
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
87 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})"
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
88 tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
89 <ul>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
90 <!-- layer select buttons (rendered always) -->
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
91 <tal:block tal:repeat="layer availableLayers">
590
ed4485d2748e viewMode "images" changed to "image".
casties
parents: 585
diff changeset
92 <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/layer_select_li"
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
93 tal:condition="python:exists(mpath)">
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
94 <li metal:use-macro="python:path(mpath)" />
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
95 </tal:block>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
96 </tal:block>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
97 </ul>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
98 <input type="submit" value="Go!" />
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
99 </form>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
100 </div>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
101
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
102 <!-- digilib options -->
538
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
103 <div class="options digilib">
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
104 <ul>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
105 <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
106 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
107 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
108 <li><a href="javascript:$digilib.digilib('zoomBy', 0.7)"> <img
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
109 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
110 zoom out
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
111 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
112 <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
113 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
114 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
115 <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
116 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
117 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
118 <li><a href="javascript:$digilib.digilib('zoomFull', 'width')"> <img
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
119 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
120 width
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
121 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
122 <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
123 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
124 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
125 <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
126 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
127 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
128 <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
129 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
130 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
131 <li><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')"> <img
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
132 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
133 digilib
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
134 </a></li>
dbf25bd05fc6 digilib buttons get icons. pid on index page.
casties
parents: 536
diff changeset
135 </ul>
501
29c6d09a506c more cleanup.
casties
parents: 500
diff changeset
136 </div>
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
137
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
138 <!-- layer option boxes (rendered if active) -->
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
139 <tal:block tal:repeat="layer availableLayers">
590
ed4485d2748e viewMode "images" changed to "image".
casties
parents: 585
diff changeset
140 <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/options_box"
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
141 tal:condition="python:exists(mpath)">
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
142 <metal:block metal:use-macro="python:path(mpath)" />
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
143 </tal:block>
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
144 </tal:block>
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
145 </div>
585
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
146 </div><!-- /page-body -->
83eeed69793f new annotator layer for images.
casties
parents: 543
diff changeset
147
485
1e51d440f08b more new templates
casties
parents: 483
diff changeset
148 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
149 <div class="errortext">Sorry, access to this document is restricted.</div>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
150 </div>
543
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
151 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
152 <!-- footer -->
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
153 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
154 </tal:block>
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
155
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
156 </tal:block>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
157 </body>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
158 <body tal:condition="not:numPages">
ab9b34a1c62a more new templates
casties
parents:
diff changeset
159 <div class="errortext">Sorry, document doesn't exist.</div>
543
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
160 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
161 <!-- footer -->
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
162 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
6cdc31e9ed8e fixed problem with dict-mode in default view.
casties
parents: 540
diff changeset
163 </tal:block>
483
ab9b34a1c62a more new templates
casties
parents:
diff changeset
164 </body>
ab9b34a1c62a more new templates
casties
parents:
diff changeset
165 </html>