Mercurial > hg > documentViewer
annotate zpt/viewer_images.zpt @ 517:aaacdf551f6f
remove global info from processPageInfo.
| author | casties |
|---|---|
| date | Mon, 05 Mar 2012 19:11:59 +0100 |
| parents | c55e376be01b |
| children | 0b8bed1223ad |
| 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> | |
| 514 | 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| 501 | 9 <title |
| 10 tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> | |
| 483 | 11 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> |
| 492 | 12 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.js"></script> |
| 501 | 13 <script type="text/javascript" |
| 14 tal:attributes="src string:$dlBaseUrl/jquery/jquery.cookie.js"></script> | |
| 15 <script type="text/javascript" | |
| 16 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.js"></script> | |
| 17 <script type="text/javascript" | |
| 18 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.geometry.js"></script> | |
| 19 <script type="text/javascript" | |
| 20 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.arrows.js"></script> | |
| 21 <script type="text/javascript" | |
| 22 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.marks.js"></script> | |
| 23 <link rel="stylesheet" type="text/css" | |
| 24 tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" /> | |
| 483 | 25 |
| 501 | 26 <script type="text/javascript" |
| 27 tal:content="string: | |
| 483 | 28 var dlOpts = { |
| 29 'interactionMode' : 'fullscreen', | |
| 30 'digilibBaseUrl' : '$dlBaseUrl', | |
| 31 'fn' : '${docinfo/imagePath}', | |
| 32 'pn' : '${pageinfo/pn}', | |
| 33 'suppressParamNames' : ['fn'], | |
| 498 | 34 'scalerInsets' : {'x' : 140, 'y' : 100} |
| 483 | 35 };"></script> |
| 36 | |
| 501 | 37 <script type="text/javascript"> |
| 38 // <!-- | |
| 39 $(document).ready(function() { | |
| 40 // autosubmit forms | |
| 41 $('form.autosubmit').find('.autosubmit').change(function() { | |
| 42 this.form.submit(); | |
| 43 }); | |
| 44 $('form.autosubmit input[type="submit"]').hide(); | |
| 45 // get digilib div | |
| 46 $digilib = $('div#scaler'); | |
| 47 // configure digilib | |
| 48 $digilib.digilib(dlOpts); | |
| 49 }); | |
| 50 // --> | |
| 51 </script> | |
| 483 | 52 </head> |
| 53 <body tal:condition="numPages"> | |
| 54 <tal:block | |
| 55 tal:define="docpath docinfo/textURLPath | nothing; | |
| 56 pn pageinfo/pn; | |
| 512 | 57 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';"> |
|
490
6f116b86a226
more new template stuff. moved ImageFile index method to SrvTxtUtils
casties
parents:
489
diff
changeset
|
58 <div class="page-head"> |
| 501 | 59 <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
|
60 </div> |
| 485 | 61 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> |
| 501 | 62 <!-- table of contents --> |
| 510 | 63 <div class="col toc"> |
| 501 | 64 <metal:block |
| 65 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
|
66 </div> |
| 493 | 67 <!-- col-main: text page --> |
| 510 | 68 <div class="col main"> |
| 483 | 69 <div class="ruler"> |
| 501 | 70 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> |
| 71 </div> | |
| 483 | 72 <ul class="switcher"> |
| 73 <li class="sel">Image</li> | |
| 501 | 74 <li tal:condition="docpath"> |
| 75 <a tal:attributes="href python:here.getLink('viewMode','text')">Text</a> | |
| 76 </li> | |
| 483 | 77 </ul> |
| 501 | 78 <!-- /switcher --> |
| 483 | 79 <div class="content"> |
| 498 | 80 <div id="scaler"> |
| 501 | 81 <img |
| 82 tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" /> | |
| 483 | 83 </div> |
| 501 | 84 </div> |
| 85 <!-- /content --> | |
| 86 </div> | |
| 87 <!-- /col-main --> | |
| 510 | 88 <div class="col buttons"> |
| 501 | 89 <div class="digilib-buttons"> |
| 90 <div> | |
| 91 <a href="javascript:$digilib.digilib('zoomBy', 1.4)">zoom in</a> | |
| 92 </div> | |
| 93 <div> | |
| 94 <a href="javascript:$digilib.digilib('zoomBy', 0.7)">zoom out</a> | |
| 95 </div> | |
| 96 <div> | |
| 97 <a href="javascript:$digilib.digilib('zoomArea')">zoom area</a> | |
| 98 </div> | |
| 99 <div> | |
| 100 <a href="javascript:$digilib.digilib('zoomFull')">full page</a> | |
| 101 </div> | |
| 102 <div> | |
| 103 <a href="javascript:$digilib.digilib('zoomFull', 'width')">page width</a> | |
| 498 | 104 </div> |
| 501 | 105 <div> |
| 106 <a href="javascript:$digilib.digilib('setMark')">set mark</a> | |
| 107 </div> | |
| 108 <div> | |
| 109 <a href="javascript:$digilib.digilib('removeMark')">remove mark</a> | |
| 110 </div> | |
| 111 <div> | |
| 112 <a href="javascript:$digilib.digilib('reference')">get reference</a> | |
| 113 </div> | |
| 114 <div> | |
| 115 <a href="javascript:$digilib.digilib('digilibUrl', 'open_new')">digilib</a> | |
| 116 </div> | |
| 117 </div> | |
| 483 | 118 </div> |
| 501 | 119 </div> |
| 120 <!-- page-body --> | |
| 485 | 121 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> |
| 483 | 122 <div class="errortext">Sorry, access to this document is restricted.</div> |
| 123 </div> | |
| 124 </tal:block> | |
| 125 </body> | |
| 126 <body tal:condition="not:numPages"> | |
| 127 <div class="errortext">Sorry, document doesn't exist.</div> | |
| 128 </body> | |
| 129 </html> |
