source: documentViewer/zpt/viewer_images.zpt @ 493:79d414cead6d

elementtree
Last change on this file since 493:79d414cead6d was 493:79d414cead6d, checked in by casties, 13 years ago

first button for digilib

File size: 5.7 KB
Line 
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;
5              tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl;
6              numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;">
7<head>
8  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
9  <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
10  <link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
11  <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.js"></script>
12  <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.cookie.js"></script>
13  <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.js"></script>
14  <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.geometry.js"></script>
15  <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.birdseye.js"></script>
16  <!-- <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.regions.js"></script> -->
17  <link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" />
18
19<script type="text/javascript"
20  tal:content="string:
21       var dlOpts = {
22            'interactionMode' : 'fullscreen',
23            'digilibBaseUrl' : '$dlBaseUrl',
24            'fn' : '${docinfo/imagePath}',
25            'pn' : '${pageinfo/pn}',
26            'suppressParamNames' : ['fn'],
27            'showRegionNumbers' : true,
28            'visibleButtonSets' : 0
29        };"></script>
30
31<script type="text/javascript">
32    //<!--
33    $(document).ready(function() {
34        // autosubmit forms
35        $('form.autosubmit').find('.autosubmit').change(function() {
36            this.form.submit();
37        });
38        $('form.autosubmit input[type="submit"]').hide();
39        // get digilib div
40        $digilib = $('div.scaler');
41        // configure digilib
42        $digilib.digilib(dlOpts);
43    });
44//-->
45</script>
46</head>
47<body tal:condition="numPages">
48  <tal:block
49    tal:define="docpath docinfo/textURLPath | nothing;
50              pn pageinfo/pn;
51              flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';
52              prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None);
53              first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None);
54              left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev);
55              leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);">
56    <div class="page-head">
57      <metal:block metal:use-macro="here/template/head_main/macros/main" />
58    </div>
59    <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
60      <!--table of contents-->
61      <div class="col-left">
62        <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" />
63      </div>
64      <!-- col-main: text page -->
65      <div class="col-main">
66        <div class="ruler">
67          <form class="autosubmit" tal:attributes="action viewerUrl">
68            <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params"
69              tal:attributes="name param; value python:params[param]" /> page <a tal:condition="leftest"
70              tal:attributes="href python:here.getLink('pn',leftest)">|&lt;</a> <span tal:condition="not:leftest">|&lt;</span> <a
71              tal:condition="left" tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span tal:condition="not:left">&lt;</span>
72            <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" />
73            <tal:block tal:define="originalPage pageinfo/pageNumberOrig | nothing" tal:condition="python:originalPage!=None">
74              (<span tal:replace="originalPage" />
75              <span tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing"
76                tal:condition="python:originalPageNorm!=None">[<span tal:replace="originalPageNorm" />]</span>)     
77            </tal:block>
78            <input type="submit" value="Go" />
79            of <span tal:replace="numPages" /> <a tal:condition="right"
80              tal:attributes="href python:here.getLink('pn',right)">&gt;</a> <span tal:condition="not:right">&gt;</span> <a
81              tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
82              tal:condition="not:rightest">&gt;|</span>
83          </form>
84        </div><!-- ruler -->
85        <ul class="switcher">
86          <li class="sel">Image</li>
87          <li><a tal:condition="docpath" tal:attributes="href python:here.getLink('viewMode','text')">Text</a></li>
88        </ul>
89        <div class="content">
90          <div class="dl-buttons">
91            <span><a href="javascript:$digilib.digilib('zoomArea')">zoom</a></span>
92          </div>
93          <div class="scaler">
94            <img tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" />
95          </div>
96        </div> <!-- content -->
97      </div> <!-- col-main -->
98      <div class="col-right">
99        BUTTONS
100      </div>
101    </div> <!-- page-body -->
102    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
103      <div class="errortext">Sorry, access to this document is restricted.</div>
104    </div>
105  </tal:block>
106</body>
107<body tal:condition="not:numPages">
108  <div class="errortext">Sorry, document doesn't exist.</div>
109</body>
110</html>
Note: See TracBrowser for help on using the repository browser.