Mercurial > hg > documentViewer
comparison zpt/viewer_images.zpt @ 585:83eeed69793f
new annotator layer for images.
author | casties |
---|---|
date | Tue, 13 Nov 2012 17:33:34 +0100 |
parents | 6cdc31e9ed8e |
children |
comparison
equal
deleted
inserted
replaced
584:011905457a5f | 585:83eeed69793f |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 <html xmlns="http://www.w3.org/1999/xhtml" | 3 <html xmlns="http://www.w3.org/1999/xhtml" |
4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; | 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; |
5 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; | |
6 availableLayers python:here.getAvailableLayers().get('images', None); | |
5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; | 7 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; |
6 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;"> | 8 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;"> |
7 <head> | 9 <head> |
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
9 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> | 11 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> |
24 'fn' : '%s',\n | 26 'fn' : '%s',\n |
25 'pn' : '%s',\n | 27 'pn' : '%s',\n |
26 'suppressParamNames' : ['fn'],\n | 28 'suppressParamNames' : ['fn'],\n |
27 'scalerInsets' : {'x':300, 'y':100}\n | 29 'scalerInsets' : {'x':300, 'y':100}\n |
28 };\n'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"></script> | 30 };\n'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"></script> |
31 | |
32 <!-- layer headers (rendered always) --> | |
33 <tal:block tal:repeat="layer availableLayers"> | |
34 <tal:block tal:define="mpath string:here/template/layer_images_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> | |
35 <metal:block metal:use-macro="python:path(mpath)" /> | |
36 </tal:block> | |
37 </tal:block> | |
29 | 38 |
30 <script type="text/javascript"> | 39 <script type="text/javascript"> |
31 // <!-- | 40 // <!-- |
32 $(document).ready(function() { | 41 $(document).ready(function() { |
33 // autosubmit forms | 42 // autosubmit forms |
54 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> | 63 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> |
55 <!-- table of contents --> | 64 <!-- table of contents --> |
56 <div class="col toc"> | 65 <div class="col toc"> |
57 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> | 66 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> |
58 </div> | 67 </div> |
59 <!-- col-main: text page --> | 68 <!-- col-main: document page --> |
60 <div class="col main"> | 69 <div class="col main"> |
61 <div class="ruler top"> | 70 <div class="ruler top"> |
62 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> | 71 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> |
63 </div> | 72 </div> |
64 <div class="content images"> | 73 <div class="content images"> |
67 </div> | 76 </div> |
68 </div> | 77 </div> |
69 <!-- /content --> | 78 <!-- /content --> |
70 </div> | 79 </div> |
71 <!-- /col-main --> | 80 <!-- /col-main --> |
81 | |
72 <div class="col buttons"> | 82 <div class="col buttons"> |
83 <!-- layer switcher --> | |
84 <div class="options" tal:condition="availableLayers"> | |
85 <h4>Image layer</h4> | |
86 <form tal:attributes="action viewerUrl" class="autosubmit"> | |
87 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" | |
88 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> | |
89 <ul> | |
90 <!-- layer select buttons (rendered always) --> | |
91 <tal:block tal:repeat="layer availableLayers"> | |
92 <tal:block tal:define="mpath string:here/template/layer_images_${layer}/macros/layer_select_li" | |
93 tal:condition="python:exists(mpath)"> | |
94 <li metal:use-macro="python:path(mpath)" /> | |
95 </tal:block> | |
96 </tal:block> | |
97 </ul> | |
98 <input type="submit" value="Go!" /> | |
99 </form> | |
100 </div> | |
101 | |
102 <!-- digilib options --> | |
73 <div class="options digilib"> | 103 <div class="options digilib"> |
74 <ul> | 104 <ul> |
75 <li><a href="javascript:$digilib.digilib('zoomBy', 1.4)"> <img tal:condition="exists:here/template/zoom-in.png" | 105 <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 | 106 tal:attributes="src here/template/zoom-in.png/absolute_url" /> zoom in |
77 </a></li> | 107 </a></li> |
102 tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" /> | 132 tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" /> |
103 digilib | 133 digilib |
104 </a></li> | 134 </a></li> |
105 </ul> | 135 </ul> |
106 </div> | 136 </div> |
137 | |
138 <!-- layer option boxes (rendered if active) --> | |
139 <tal:block tal:repeat="layer availableLayers"> | |
140 <tal:block tal:define="mpath string:here/template/layer_images_${layer}/macros/options_box" | |
141 tal:condition="python:exists(mpath)"> | |
142 <metal:block metal:use-macro="python:path(mpath)" /> | |
143 </tal:block> | |
144 </tal:block> | |
107 </div> | 145 </div> |
108 </div> | 146 </div><!-- /page-body --> |
109 <!-- page-body --> | 147 |
110 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> | 148 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> |
111 <div class="errortext">Sorry, access to this document is restricted.</div> | 149 <div class="errortext">Sorry, access to this document is restricted.</div> |
112 </div> | 150 </div> |
113 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> | 151 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
114 <!-- footer --> | 152 <!-- footer --> |