view zpt/viewer_images.zpt @ 536:abd36d4d97b8

new version of index page. improvements for digilib page and thumbnail overview.
author casties
date Thu, 26 Jul 2012 21:22:56 +0200
parents 0b8bed1223ad
children dbf25bd05fc6
line wrap: on
line source

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
              tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
              numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
<link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
<script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.js"></script>
<script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.cookie.js"></script>
<script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.js"></script>
<script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.geometry.js"></script>
<script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.arrows.js"></script>
<script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.marks.js"></script>
<link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" />

<script type="text/javascript"
  tal:content="python:'''\n
       var dlOpts = {\n
            'interactionMode' : 'fullscreen',\n
            'digilibBaseUrl' : '%s',\n
            'fn' : '%s',\n
            'pn' : '%s',\n
            'suppressParamNames' : ['fn'],\n
            'scalerInsets' : {'x':300, 'y':100}\n
        };\n'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"></script>

<script type="text/javascript">
	// <!--
	$(document).ready(function() {
		// autosubmit forms
		$('form.autosubmit').find('.autosubmit').change(function() {
			this.form.submit();
		});
		$('form.autosubmit input[type="submit"]').hide();
		// get digilib div
		$digilib = $('div#scaler');
		// configure digilib
		$digilib.digilib(dlOpts);
	});
// -->
</script>
</head>
<body tal:condition="numPages">
  <tal:block
    tal:define="docpath docinfo/textURLPath | nothing;
              pn pageinfo/pn; 
              flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';">
    <div class="page-head">
      <metal:block metal:use-macro="here/template/common_template/macros/head" />
    </div>
    <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
      <!-- table of contents -->
      <div class="col toc">
        <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" />
      </div>
      <!-- col-main: text page -->
      <div class="col main">
        <div class="ruler">
          <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
        </div>
        <div class="content-images">
          <div id="scaler">
            <img tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" />
          </div>
        </div>
        <!-- /content -->
      </div>
      <!-- /col-main -->
      <div class="col buttons">
        <div class="digilib-buttons">
          <div>
            <a href="javascript:$digilib.digilib('zoomBy', 1.4)">zoom in</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('zoomBy', 0.7)">zoom out</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('zoomArea')">zoom area</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('zoomFull')">full page</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('zoomFull', 'width')">page width</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('setMark')">set mark</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('removeMark')">remove mark</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('reference')">get reference</a>
          </div>
          <div>
            <a href="javascript:$digilib.digilib('digilibUrl', 'open_new')">digilib</a>
          </div>
        </div>
      </div>
    </div>
    <!-- page-body -->
    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
      <div class="errortext">Sorry, access to this document is restricted.</div>
    </div>
  </tal:block>
</body>
<body tal:condition="not:numPages">
  <div class="errortext">Sorry, document doesn't exist.</div>
</body>
</html>