# HG changeset patch # User casties # Date 1353082610 -3600 # Node ID da7daa783df4a0e5b880379c5d217ab2d96e840d # Parent eb46138db6585bd4d7f47d72370fe06516f0153e rearranged viewer templates into folder. diff -r eb46138db658 -r da7daa783df4 documentViewer.py --- a/documentViewer.py Fri Nov 16 16:40:29 2012 +0100 +++ b/documentViewer.py Fri Nov 16 17:16:50 2012 +0100 @@ -95,35 +95,35 @@ # templates and forms # # viewMode templates - viewer_text = PageTemplateFile('zpt/viewer_text', globals()) - viewer_xml = PageTemplateFile('zpt/viewer_xml', globals()) - viewer_image = PageTemplateFile('zpt/viewer_image', globals()) - viewer_index = PageTemplateFile('zpt/viewer_index', globals()) - viewer_thumbs = PageTemplateFile('zpt/viewer_thumbs', globals()) - viewer_indexonly = PageTemplateFile('zpt/viewer_indexonly', globals()) + viewer_text = PageTemplateFile('zpt/viewer/viewer_text', globals()) + viewer_xml = PageTemplateFile('zpt/viewer/viewer_xml', globals()) + viewer_image = PageTemplateFile('zpt/viewer/viewer_image', globals()) + viewer_index = PageTemplateFile('zpt/viewer/viewer_index', globals()) + viewer_thumbs = PageTemplateFile('zpt/viewer/viewer_thumbs', globals()) + viewer_indexonly = PageTemplateFile('zpt/viewer/viewer_indexonly', globals()) # available layer types (annotator not default) builtinLayers = {'text': ['dict','search','gis'], 'xml': None, 'image': None, 'index': ['extended']} availableLayers = builtinLayers; # layer templates - layer_text_dict = PageTemplateFile('zpt/layer_text_dict', globals()) - layer_text_search = PageTemplateFile('zpt/layer_text_search', globals()) - layer_text_annotator = PageTemplateFile('zpt/layer_text_annotator', globals()) - layer_text_gis = PageTemplateFile('zpt/layer_text_gis', globals()) - layer_text_pundit = PageTemplateFile('zpt/layer_text_pundit', globals()) - layer_image_annotator = PageTemplateFile('zpt/layer_image_annotator', globals()) - layer_image_search = PageTemplateFile('zpt/layer_image_search', globals()) - layer_index_extended = PageTemplateFile('zpt/layer_index_extended', globals()) + layer_text_dict = PageTemplateFile('zpt/viewer/layer_text_dict', globals()) + layer_text_search = PageTemplateFile('zpt/viewer/layer_text_search', globals()) + layer_text_annotator = PageTemplateFile('zpt/viewer/layer_text_annotator', globals()) + layer_text_gis = PageTemplateFile('zpt/viewer/layer_text_gis', globals()) + layer_text_pundit = PageTemplateFile('zpt/viewer/layer_text_pundit', globals()) + layer_image_annotator = PageTemplateFile('zpt/viewer/layer_image_annotator', globals()) + layer_image_search = PageTemplateFile('zpt/viewer/layer_image_search', globals()) + layer_index_extended = PageTemplateFile('zpt/viewer/layer_index_extended', globals()) # toc templates - toc_thumbs = PageTemplateFile('zpt/toc_thumbs', globals()) - toc_text = PageTemplateFile('zpt/toc_text', globals()) - toc_figures = PageTemplateFile('zpt/toc_figures', globals()) - toc_concordance = PageTemplateFile('zpt/toc_concordance', globals()) - toc_handwritten = PageTemplateFile('zpt/toc_handwritten', globals()) - toc_none = PageTemplateFile('zpt/toc_none', globals()) + toc_thumbs = PageTemplateFile('zpt/viewer/toc_thumbs', globals()) + toc_text = PageTemplateFile('zpt/viewer/toc_text', globals()) + toc_figures = PageTemplateFile('zpt/viewer/toc_figures', globals()) + toc_concordance = PageTemplateFile('zpt/viewer/toc_concordance', globals()) + toc_handwritten = PageTemplateFile('zpt/viewer/toc_handwritten', globals()) + toc_none = PageTemplateFile('zpt/viewer/toc_none', globals()) # other templates - common_template = PageTemplateFile('zpt/common_template', globals()) - info_xml = PageTemplateFile('zpt/info_xml', globals()) + common_template = PageTemplateFile('zpt/viewer/common_template', globals()) + info_xml = PageTemplateFile('zpt/viewer/info_xml', globals()) docuviewer_css = ImageFile('css/docuviewer.css',globals()) # make docuviewer_css refreshable for development docuviewer_css.index_html = refreshingImageFileIndexHtml diff -r eb46138db658 -r da7daa783df4 zpt/common_template.zpt --- a/zpt/common_template.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ - - - - - - - - - -
-
- - , - , - - -
- - - - - - - -
- page |< |< < < - ( - [] - ) - of > > >| >| - - - -
- - - - -
- < < - > > -
-
- - - -
- < < > - > -
-
- - - - - - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_image_annotator.zpt --- a/zpt/layer_image_annotator.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - -
- -
    -
  • - Annotator -
  • -
-
- - - -
-

Annotator

- -

- User "". -

- -
- -

- In group -
- -

-
-

- Log in -

-
- -
- - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_image_search.zpt --- a/zpt/layer_image_search.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - -
- -
    -
  • - Search results -
  • -
-
- - - -
-

OCR Search

-

- Query: "". -

-
- -
- - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_index_extended.zpt --- a/zpt/layer_index_extended.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - -
- -
    - -
  • - All entries -
  • -
    -
-
- - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_text_annotator.zpt --- a/zpt/layer_text_annotator.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
    -
  • - Annotator -
  • -
-
- - - -
-

Annotator

-

- User "". -

- -
- -

- In group -
- -

-
-

- Log in -

-
- -
- - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_text_dict.zpt --- a/zpt/layer_text_dict.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - - - - - - - -
- -
    - -
  • - Dictionary -
  • -
    -
-
- - - - - - - - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_text_gis.zpt --- a/zpt/layer_text_gis.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ - - - - - - - -
- -
    - -
  • - Places
    -
  • -
    -
-
- - - -
- -

Places

- Show all places - -
-
- -
- - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_text_pundit.zpt --- a/zpt/layer_text_pundit.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - - - - - - -
- -
    - -
  • - Pundit -
  • -
    -
-
- - - - - - - - diff -r eb46138db658 -r da7daa783df4 zpt/layer_text_search.zpt --- a/zpt/layer_text_search.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ - - - - - - - - -
- -
    - -
  • Search results
  • -
    -
-
- - - -
-
-

Search results

-
-
- -
-
- Searching "" () -
-
-
-
-
- - - - -
-

Search

-
- - - - - - - -
Clear -
    -
  • - Exact
  • -
  • All forms
  • -
  • - Fulltext index
  • -
  • Morphological index
  • -
-
-
- -
- - - - diff -r eb46138db658 -r da7daa783df4 zpt/toc_concordance.zpt --- a/zpt/toc_concordance.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - - - - - - -
-
- -
-

Page concordance

-
- -
-
- - - - - - - - - - - -
ScanOriginal
ScanNo [] -
-
-
- -
-
-
- - - diff -r eb46138db658 -r da7daa783df4 zpt/toc_figures.zpt --- a/zpt/toc_figures.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - - - - -
-
- -
-

Table of figures

-
- -
-
-
- -
-
-
- - - diff -r eb46138db658 -r da7daa783df4 zpt/toc_handwritten.zpt --- a/zpt/toc_handwritten.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - - - - -
-
- -
-

Table of handwritten notes

-
- -
-
-
- -
-
-
- - - diff -r eb46138db658 -r da7daa783df4 zpt/toc_none.zpt --- a/zpt/toc_none.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - - - - - -
-
- -
- - - diff -r eb46138db658 -r da7daa783df4 zpt/toc_text.zpt --- a/zpt/toc_text.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - - - - -
-
- -
-

Table of contents

-
- -
-
-
- -
-
-
- - - diff -r eb46138db658 -r da7daa783df4 zpt/toc_thumbs.zpt --- a/zpt/toc_thumbs.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ - - - - - - -
-
- -
- -
-

List of thumbnails

-
- -
- - - - -

- -
-
- -
-
- -
- -
- - diff -r eb46138db658 -r da7daa783df4 zpt/viewer/common_template.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/common_template.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,132 @@ + + + + + + + + + +
+
+ + , + , + + +
+ + + + + + + +
+ page |< |< < < + ( + [] + ) + of > > >| >| + + + +
+ + + + +
+ < < + > > +
+
+ + + +
+ < < > + > +
+
+ + + + + + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_image_annotator.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_image_annotator.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + +
+ +
    +
  • + Annotator +
  • +
+
+ + + +
+

Annotator

+ +

+ User "". +

+ +
+ +

+ In group +
+ +

+
+

+ Log in +

+
+ +
+ + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_image_search.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_image_search.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + +
+ +
    +
  • + Search results +
  • +
+
+ + + +
+

OCR Search

+

+ Query: "". +

+
+ +
+ + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_index_extended.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_index_extended.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,27 @@ + + + + + + + + + + + + +
+ +
    + +
  • + All entries +
  • +
    +
+
+ + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_text_annotator.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_text_annotator.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
    +
  • + Annotator +
  • +
+
+ + + +
+

Annotator

+

+ User "". +

+ +
+ +

+ In group +
+ +

+
+

+ Log in +

+
+ +
+ + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_text_dict.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_text_dict.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,45 @@ + + + + + + + +
+ +
    + +
  • + Dictionary +
  • +
    +
+
+ + + + + + + + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_text_gis.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_text_gis.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,53 @@ + + + + + + + +
+ +
    + +
  • + Places
    +
  • +
    +
+
+ + + +
+ +

Places

+ Show all places + +
+
+ +
+ + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_text_pundit.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_text_pundit.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,43 @@ + + + + + + + +
+ +
    + +
  • + Pundit +
  • +
    +
+
+ + + + + + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/layer_text_search.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/layer_text_search.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,77 @@ + + + + + + + + +
+ +
    + +
  • Search results
  • +
    +
+
+ + + +
+
+

Search results

+
+
+ +
+
+ Searching "" () +
+
+
+
+
+ + + + +
+

Search

+
+ + + + + + + +
Clear +
    +
  • + Exact
  • +
  • All forms
  • +
  • + Fulltext index
  • +
  • Morphological index
  • +
+
+
+ +
+ + + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/toc_concordance.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/toc_concordance.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,45 @@ + + + + + + +
+
+ +
+

Page concordance

+
+ +
+
+ + + + + + + + + + + +
ScanOriginal
ScanNo [] +
+
+
+ +
+
+
+ + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/toc_figures.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/toc_figures.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,27 @@ + + + + + + +
+
+ +
+

Table of figures

+
+ +
+
+
+ +
+
+
+ + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/toc_handwritten.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/toc_handwritten.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,27 @@ + + + + + + +
+
+ +
+

Table of handwritten notes

+
+ +
+
+
+ +
+
+
+ + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/toc_none.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/toc_none.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,15 @@ + + + + + + + +
+
+ +
+ + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/toc_text.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/toc_text.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,26 @@ + + + + + + +
+
+ +
+

Table of contents

+
+ +
+
+
+ +
+
+
+ + + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/toc_thumbs.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/toc_thumbs.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,46 @@ + + + + + + +
+
+ +
+ +
+

List of thumbnails

+
+ +
+ + + + +

+ +
+
+ +
+
+ +
+ +
+ + diff -r eb46138db658 -r da7daa783df4 zpt/viewer/viewer_image.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/viewer_image.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,165 @@ + + + + + +<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> + +<!-- layer headers (rendered always) --> +<tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> + <metal:block metal:use-macro="python:path(mpath)" /> + </tal:block> +</tal:block> + +<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: document page --> + <div class="col main"> + <div class="ruler top"> + <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> + </div> + <div class="content image"> + <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"> + <!-- layer switcher --> + <div class="options" tal:condition="availableLayers"> + <h4>Image layer</h4> + <form tal:attributes="action viewerUrl" class="autosubmit"> + <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" + tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> + <ul> + <!-- layer select buttons (rendered always) --> + <tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/layer_select_li" + tal:condition="python:exists(mpath)"> + <li metal:use-macro="python:path(mpath)" /> + </tal:block> + </tal:block> + </ul> + <input type="submit" value="Go!" /> + </form> + </div> + + <!-- digilib options --> + <div class="options digilib"> + <ul> + <li><a href="javascript:$digilib.digilib('zoomBy', 1.4)"> <img tal:condition="exists:here/template/zoom-in.png" + tal:attributes="src here/template/zoom-in.png/absolute_url" /> zoom in + </a></li> + <li><a href="javascript:$digilib.digilib('zoomBy', 0.7)"> <img + tal:condition="exists:here/template/zoom-out.png" tal:attributes="src here/template/zoom-out.png/absolute_url" /> + zoom out + </a></li> + <li><a href="javascript:$digilib.digilib('zoomArea')"> <img tal:condition="exists:here/template/zoom-area.png" + tal:attributes="src here/template/zoom-area.png/absolute_url" /> zoom area + </a></li> + <li><a href="javascript:$digilib.digilib('zoomFull')"> <img tal:condition="exists:here/template/zoom-full.png" + tal:attributes="src here/template/zoom-full.png/absolute_url" /> full page + </a></li> + <li><a href="javascript:$digilib.digilib('zoomFull', 'width')"> <img + tal:condition="exists:here/template/pagewidth.png" tal:attributes="src here/template/pagewidth.png/absolute_url" /> page + width + </a></li> + <li><a href="javascript:$digilib.digilib('setMark')"> <img tal:condition="exists:here/template/mark.png" + tal:attributes="src here/template/mark.png/absolute_url" /> set mark + </a></li> + <li><a href="javascript:$digilib.digilib('removeMark')"> <img tal:condition="exists:here/template/delmark.png" + tal:attributes="src here/template/delmark.png/absolute_url" /> remove mark + </a></li> + <li><a href="javascript:$digilib.digilib('reference')"> <img tal:condition="exists:here/template/reference.png" + tal:attributes="src here/template/reference.png/absolute_url" /> get reference + </a></li> + <li><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')"> <img + tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" /> + digilib + </a></li> + </ul> + </div> + + <!-- layer option boxes (rendered if active) --> + <tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/options_box" + tal:condition="python:exists(mpath)"> + <metal:block metal:use-macro="python:path(mpath)" /> + </tal:block> + </tal:block> + </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> + + </tal:block> +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> + <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> +</body> +</html> diff -r eb46138db658 -r da7daa783df4 zpt/viewer/viewer_index.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/viewer_index.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,220 @@ +<!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; + viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; + availableLayers python:here.getAvailableLayers().get('index', None); + docpath docinfo/textURLPath | nothing; + query nothing; + numPages docinfo/numPages | nothing; + global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));"> +<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" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" /> +<script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></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(); + }); +// --> +</script> +<!-- layer headers (all available) --> +<tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> + <metal:block metal:use-macro="python:path(mpath)" /> + </tal:block> +</tal:block> +</head> +<body tal:condition="numPages"> + <!-- header --> + <div class="page-head"> + <metal:block metal:use-macro="here/template/common_template/macros/head" /> + </div> + + <!-- main --> + <div class="page-body"> + + <div class="col index-image"> + <!-- image --> + <a tal:define="tp docinfo/titlePage | string:1" + tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" + tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img + tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" + src="template/book.png" /></a> + </div> + + <div class="col main"> + <!-- main content column --> + <div class="index-info"> + <h2>Bibliographic information</h2> + <table border="0"> + <tal:x condition="python:formattedData"> + <!-- wenn es bibinfo in docinfo gibt --> + <tr tal:replace="structure python:formattedData" /> + </tal:x> + + <tal:x condition="not:formattedData"> + <!-- kein template fuer die daten --> + <tal:x condition="exists:docinfo/bib"> + <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> + <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> + <td class="content" tal:content="bibinfo/bib" /> + </tr> + </tal:x> + + <tal:y condition="not:exists:docinfo/bib"> + <!-- wenn es kein bibinfo gibt (archimedes-texte) --> + <tr> + <td class="type">Author:</td> + <td class="content" tal:content="docinfo/creator" /> + </tr> + <tr> + <td class="type">Title:</td> + <td class="content" tal:content="docinfo/title" /> + </tr> + <tr> + <td class="type">Date:</td> + <td class="content" tal:content="docinfo/date" /> + </tr> + </tal:y> + </tal:x> + <!-- ende kein template fuer die daten --> + </table> + + <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> + <h2>Permanent URL</h2> + <table> + <tr> + <td class="type">Document ID:</td> + <td class="content" tal:content="dri" /> + </tr> + <tr> + <td class="type">Permanent URL:</td> + <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" + tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> + </tr> + </table> + </tal:block> + + <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs"> + <h2>Presentation context</h2> + <ul> + <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name" + tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li> + </ul> + </tal:block> + + <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> + <h2>Copyright information</h2> + <table border="0" tal:condition="attribution | copyright"> + <!-- attribution --> + <tr tal:condition="attribution" + tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> + <!-- copyright --> + <tr tal:condition="copyright" + tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> + </table> + <table border="0" tal:condition="not:attribution | copyright"> + <tr> + <td class="type">Copyright:</td> + <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the + History of Science</a> (unless stated otherwise)</td> + </tr> + <tr tal:define="accType python:docinfo.get('accessType', None)"> + <td class="type">License:</td> + <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" + href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> + <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" + tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> + (unless stated otherwise) + </td> + </tr> + </table> + </tal:block> + </div> + </div> + <!-- /main content column --> + + <div class="col buttons"> + <!-- option block column --> + <div class="options"> + <h4>Browse</h4> + <ul class="list"> + <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> + </ul> + </div> + + <div class="options" tal:condition="docpath"> + <h4>Download</h4> + Download full document + <ul class="list"> + <li><a target="_blank" rel="nofollow" class="download" + tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" target="_blank">as HTML</a></li> + <li><a target="_blank" rel="nofollow" class="download" + tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as XML</a></li> + </ul> + (copyright and license see below) + </div> + + <div class="options" tal:condition="docpath"> + <h4>Search</h4> + <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl"> + <input type="hidden" + tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" + tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> + <!-- query text --> + <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a + tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a> + <ul> + <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> + Exact</li> + <li><input type="radio" name="queryType" value="fulltextMorph" + tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> + <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> + Fulltext index</li> + <li><input type="radio" name="queryType" value="ftIndexMorph" + tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> + </ul> + </form> + </div> + + <div class="options" tal:condition="availableLayers"> + <h4>Metadata</h4> + <form tal:attributes="action viewerUrl" class="autosubmit"> + <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" tal:repeat="param params" + tal:attributes="name param; value python:params[param]" /> + <ul> + <!-- text layer select buttons (rendered always) --> + <tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" + tal:condition="python:exists(mpath)"> + <li metal:use-macro="python:path(mpath)" /> + </tal:block> + </tal:block> + </ul> + <input type="submit" value="Go!" /> + </form> + </div> + </div> + <!-- /option block column --> + </div> + <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> + </tal:block> + +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> + <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> + </tal:block> +</body> +</html> \ No newline at end of file diff -r eb46138db658 -r da7daa783df4 zpt/viewer/viewer_indexonly.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/viewer_indexonly.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,132 @@ +<!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; + docpath docinfo/textURLPath | nothing; + query nothing; + numPages docinfo/numPages | nothing; + global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));"> +<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" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" /> +</head> +<body tal:condition="numPages"> + <!-- header --> + <div class="page-head"> + <metal:block metal:use-macro="here/template/common_template/macros/head"> + <div metal:fill-slot="view-switcher"></div> + </metal:block> + </div> + + <!-- main --> + <div class="page-body"> + + <div class="col index-image"> + <!-- image --> + <a tal:define="tp docinfo/titlePage | string:1" + tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" + tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img + tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" + src="template/book.png" /></a> + </div> + + <div class="col main"> + <!-- main content column --> + <div class="index-info"> + <h2>Bibliographic information</h2> + <table border="0"> + <tal:x condition="python:formattedData"> + <!-- wenn es bibinfo in docinfo gibt --> + <tr tal:replace="structure python:formattedData" /> + </tal:x> + + <tal:x condition="not:formattedData"> + <!-- kein template fuer die daten --> + <tal:x condition="exists:docinfo/bib"> + <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> + <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> + <td class="content" tal:content="bibinfo/bib" /> + </tr> + </tal:x> + + <tal:y condition="not:exists:docinfo/bib"> + <!-- wenn es kein bibinfo gibt (archimedes-texte) --> + <tr> + <td class="type">Author:</td> + <td class="content" tal:content="docinfo/creator" /> + </tr> + <tr> + <td class="type">Title:</td> + <td class="content" tal:content="docinfo/title" /> + </tr> + <tr> + <td class="type">Date:</td> + <td class="content" tal:content="docinfo/date" /> + </tr> + </tal:y> + </tal:x> + <!-- ende kein template fuer die daten --> + </table> + + <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> + <h2>Permanent URL</h2> + <table> + <tr> + <td class="type">Document ID:</td> + <td class="content" tal:content="dri" /> + </tr> + <tr> + <td class="type">Permanent URL:</td> + <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" + tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> + </tr> + </table> + </tal:block> + + <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs"> + <h2>Presentation context</h2> + <ul> + <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name" + tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li> + </ul> + </tal:block> + + <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> + <h2>Copyright information</h2> + <table border="0" tal:condition="attribution | copyright"> + <!-- attribution --> + <tr tal:condition="attribution" + tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> + <!-- copyright --> + <tr tal:condition="copyright" + tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> + </table> + <table border="0" tal:condition="not:attribution | copyright"> + <tr> + <td class="type">Copyright:</td> + <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the + History of Science</a> (unless stated otherwise)</td> + </tr> + <tr tal:define="accType python:docinfo.get('accessType', None)"> + <td class="type">License:</td> + <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" + href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> + <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" + tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> + (unless stated otherwise) + </td> + </tr> + </table> + </tal:block> + </div> + </div> + <!-- /main content column --> + </div> + +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> +</body> +</html> \ No newline at end of file diff -r eb46138db658 -r da7daa783df4 zpt/viewer/viewer_text.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/viewer_text.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,158 @@ +<!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; viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; + availableLayers python:here.getAvailableLayers().get('text', None); + viewerUrl docinfo/viewerUrl; + rootUrl here/getDocumentViewerURL; + numPages docinfo/numPages | 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" /> +<!--[if IE]><link rel="stylesheet" href="template/docuviewer_ie_css" type="text/css" /><![endif]--> +<script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></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(); + }); +// --> +</script> +<!-- layer headers (rendered always) --> +<tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> + <metal:block metal:use-macro="python:path(mpath)" /> + </tal:block> +</tal:block> +</head> +<!-- body --> +<body tal:condition="numPages"> + <tal:block + tal:define="docpath docinfo/textURLPath | nothing; + pn pageinfo/pn; + flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; + textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);"> + <!-- header --> + <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> + + <!-- text page --> + <div class="col main"> + <div class="ruler top"> + <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> + </div> + <div class="content text"> + <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" + tal:content="structure pageinfo/pageHeaderTitle" /> + <tal:block tal:condition="textPage" tal:replace="structure textPage"/> + <div class="emptyPage" tal:condition="not:textPage">[Error: no text]</div> + </div> + </div> + <!-- end of col-main --> + + <!-- layer columns (rendered always) --> + <tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column" + tal:condition="python:exists(mpath)"> + <metal:block metal:use-macro="python:path(mpath)" /> + </tal:block> + </tal:block> + + <!-- right-side options --> + <div class="col buttons"> + <!--BEGIN TEXT LAYERS --> + <div class="options" tal:condition="availableLayers"> + <h4>Text layer</h4> + <form tal:attributes="action viewerUrl" class="autosubmit"> + <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" + tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> + <ul> + <!-- text layer select buttons (rendered always) --> + <tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" + tal:condition="python:exists(mpath)"> + <li metal:use-macro="python:path(mpath)" /> + </tal:block> + </tal:block> + </ul> + <input type="submit" value="Go!" /> + </form> + </div> + <!--END TEXT LAYERS--> + + <!--"BEGIN TEXT SIZE"--> + <!-- <div class="options"> + <h4>Text size</h4> + <ul class="fsizer"> + <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> + <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> + <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> + </ul> + </div> --> + <!--"END TEXT SIZE"--> + + <!--"BEGIN TEXT NORMALIZATION"--> + <div class="options"> + <h4>Text normalization</h4> + <form tal:attributes="action viewerUrl" class="autosubmit" + tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> + <input type="hidden" + tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" + tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> + <ul> + <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" + tal:attributes="checked python:norm=='orig'" /> Original</li> + <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" + tal:attributes="checked python:norm=='reg'" /> Regularized</li> + <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" + tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> + </ul> + <input type="submit" value="Go!" /> + </form> + </div> + <!--"END TEXT NORMALIZATION"--> + + <!-- layer option boxes (rendered if active) --> + <tal:block tal:repeat="layer availableLayers"> + <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" + tal:condition="python:exists(mpath)"> + <metal:block metal:use-macro="python:path(mpath)" /> + </tal:block> + </tal:block> + </div> + <!-- /col-right --> + + </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> + </tal:block> +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> + <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> +</body> +</html> diff -r eb46138db658 -r da7daa783df4 zpt/viewer/viewer_thumbs.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/viewer_thumbs.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,111 @@ +<!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; + viewerUrl docinfo/viewerUrl; + rootUrl here/getDocumentViewerURL; + numPages docinfo/numPages | 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:$rootUrl/template/jquery_js"></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(); + }); +// --> +</script> +</head> +<body tal:condition="numPages"> + <tal:block + tal:define="pn pageinfo/pn; + start pageinfo/start; + thumbRows python:int(request.get('thumbRows', 10)); + thumbCols python:int(request.get('thumbCols', 12)); + thumbSize python:int(request.get('thumbSize', 100)); + flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; + pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, maxIdx=numPages); + pageNumbers docinfo/pageNumbers | nothing; + left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']); + right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);"> + <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)"> + <!-- col-main: text page --> + <div class="col main"> + <div class="ruler"> + <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> + </div> + <div class="content-thumbs"> + <table class="thumbs"> + <tr tal:repeat="row pageBatch/pages"> + <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a + tal:define="idx thumb/idx" tal:condition="idx" + tal:attributes="href python:here.getLink(params={'pn':idx, 'viewMode':'images'})"> <img + tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=thumbSize,dh=thumbSize,docinfo=docinfo),'images/pic'); + alt idx" /><br /> + <span title="Scan number" tal:content="idx" /> <span + tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']" + title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" /> + </a></td> + </tr> + </table> + </div> + <div class="ruler bottom"> + <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> + </div> + </div> + <!-- /col-main --> + + <!-- right-side options --> + <div class="col buttons"> + <!--"BEGIN TEXT DISPLAY" --> + <div class="options"> + <h4>Thumbnail display</h4> + <form tal:attributes="action viewerUrl" class="autosubmit"> + <input type="hidden" + tal:define="params python:here.getParams(params={'thumbRows':None,'thumbCols':None,'thumbSize':None})" + tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> + <ul> + <li>Rows <select class="autosubmit" name="thumbRows" tal:define="rows python:[2,3,5,10,12,15,20,50,100]"> + <option tal:repeat="row rows" tal:attributes="selected python:thumbRows==row; value row" tal:content="row" /> + </select> + </li> + <li>Columns <select class="autosubmit" name="thumbCols" tal:define="cols python:[2,3,5,10,12,15,20,50,100]"> + <option tal:repeat="col cols" tal:attributes="selected python:thumbCols==col; value col" tal:content="col" /> + </select> + </li> + <li>Thumbnail size <select class="autosubmit" name="thumbSize" tal:define="sizes python:[100,150,200,300,500]"> + <option tal:repeat="size sizes" tal:attributes="selected python:thumbSize==size; value size" tal:content="size" /> + </select> + </li> + </ul> + </form> + </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> + </tal:block> +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> + <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> +</body> +</html> \ No newline at end of file diff -r eb46138db658 -r da7daa783df4 zpt/viewer/viewer_xml.zpt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer/viewer_xml.zpt Fri Nov 16 17:16:50 2012 +0100 @@ -0,0 +1,98 @@ +<!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; + rootUrl here/getDocumentViewerURL; + numPages docinfo/numPages | 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:$rootUrl/template/jquery_js"></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(); + }); + // --> + </script> +</head> +<body tal:condition="numPages"> + <tal:block + tal:define="docpath docinfo/textURLPath; + pn pageinfo/pn; + flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; + textPage python:here.getTextPage(mode='xml', pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> + <!-- header --> + <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> + + <!-- text page --> + <div class="col main"> + <div class="ruler top"> + <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> + </div> + <div class="content xml"> + <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" + tal:content="structure pageinfo/pageHeaderTitle" /> + <tal:block tal:replace="structure textPage" /> + </div> + </div> + <!-- col-main --> + + <!-- right-side options --> + <div class="col buttons"> + <!--"BEGIN TEXT SIZE"--> + <!-- <div class="options"> + <h4>Text size</h4> + <ul class="fsizer"> + <li> + <a href="javascript:fontSize(12);" class="fs_sml">S</a> + </li> + <li> + <a href="javascript:fontSize(14);" class="fs_med">M</a> + </li> + <li> + <a href="javascript:fontSize(16);" class="fs_lrg">L</a> + </li> + </ul> + </div> --> + <!--"END TEXT SIZE"--> + + </div> + <!-- /col-right --> + + </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> + </tal:block> +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> + <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> + <!-- footer --> + <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> + </tal:block> +</body> +</html> diff -r eb46138db658 -r da7daa783df4 zpt/viewer_image.zpt --- a/zpt/viewer_image.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -<!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; - viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; - availableLayers python:here.getAvailableLayers().get('image', None); - 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> - -<!-- layer headers (rendered always) --> -<tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> - <metal:block metal:use-macro="python:path(mpath)" /> - </tal:block> -</tal:block> - -<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: document page --> - <div class="col main"> - <div class="ruler top"> - <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> - </div> - <div class="content image"> - <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"> - <!-- layer switcher --> - <div class="options" tal:condition="availableLayers"> - <h4>Image layer</h4> - <form tal:attributes="action viewerUrl" class="autosubmit"> - <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" - tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> - <ul> - <!-- layer select buttons (rendered always) --> - <tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/layer_select_li" - tal:condition="python:exists(mpath)"> - <li metal:use-macro="python:path(mpath)" /> - </tal:block> - </tal:block> - </ul> - <input type="submit" value="Go!" /> - </form> - </div> - - <!-- digilib options --> - <div class="options digilib"> - <ul> - <li><a href="javascript:$digilib.digilib('zoomBy', 1.4)"> <img tal:condition="exists:here/template/zoom-in.png" - tal:attributes="src here/template/zoom-in.png/absolute_url" /> zoom in - </a></li> - <li><a href="javascript:$digilib.digilib('zoomBy', 0.7)"> <img - tal:condition="exists:here/template/zoom-out.png" tal:attributes="src here/template/zoom-out.png/absolute_url" /> - zoom out - </a></li> - <li><a href="javascript:$digilib.digilib('zoomArea')"> <img tal:condition="exists:here/template/zoom-area.png" - tal:attributes="src here/template/zoom-area.png/absolute_url" /> zoom area - </a></li> - <li><a href="javascript:$digilib.digilib('zoomFull')"> <img tal:condition="exists:here/template/zoom-full.png" - tal:attributes="src here/template/zoom-full.png/absolute_url" /> full page - </a></li> - <li><a href="javascript:$digilib.digilib('zoomFull', 'width')"> <img - tal:condition="exists:here/template/pagewidth.png" tal:attributes="src here/template/pagewidth.png/absolute_url" /> page - width - </a></li> - <li><a href="javascript:$digilib.digilib('setMark')"> <img tal:condition="exists:here/template/mark.png" - tal:attributes="src here/template/mark.png/absolute_url" /> set mark - </a></li> - <li><a href="javascript:$digilib.digilib('removeMark')"> <img tal:condition="exists:here/template/delmark.png" - tal:attributes="src here/template/delmark.png/absolute_url" /> remove mark - </a></li> - <li><a href="javascript:$digilib.digilib('reference')"> <img tal:condition="exists:here/template/reference.png" - tal:attributes="src here/template/reference.png/absolute_url" /> get reference - </a></li> - <li><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')"> <img - tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" /> - digilib - </a></li> - </ul> - </div> - - <!-- layer option boxes (rendered if active) --> - <tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/options_box" - tal:condition="python:exists(mpath)"> - <metal:block metal:use-macro="python:path(mpath)" /> - </tal:block> - </tal:block> - </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> - - </tal:block> -</body> -<body tal:condition="not:numPages"> - <div class="errortext">Sorry, document doesn't exist.</div> - <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> -</body> -</html> diff -r eb46138db658 -r da7daa783df4 zpt/viewer_index.zpt --- a/zpt/viewer_index.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,220 +0,0 @@ -<!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; - viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; - availableLayers python:here.getAvailableLayers().get('index', None); - docpath docinfo/textURLPath | nothing; - query nothing; - numPages docinfo/numPages | nothing; - global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));"> -<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" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" /> -<script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></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(); - }); -// --> -</script> -<!-- layer headers (all available) --> -<tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> - <metal:block metal:use-macro="python:path(mpath)" /> - </tal:block> -</tal:block> -</head> -<body tal:condition="numPages"> - <!-- header --> - <div class="page-head"> - <metal:block metal:use-macro="here/template/common_template/macros/head" /> - </div> - - <!-- main --> - <div class="page-body"> - - <div class="col index-image"> - <!-- image --> - <a tal:define="tp docinfo/titlePage | string:1" - tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" - tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img - tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" - src="template/book.png" /></a> - </div> - - <div class="col main"> - <!-- main content column --> - <div class="index-info"> - <h2>Bibliographic information</h2> - <table border="0"> - <tal:x condition="python:formattedData"> - <!-- wenn es bibinfo in docinfo gibt --> - <tr tal:replace="structure python:formattedData" /> - </tal:x> - - <tal:x condition="not:formattedData"> - <!-- kein template fuer die daten --> - <tal:x condition="exists:docinfo/bib"> - <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> - <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> - <td class="content" tal:content="bibinfo/bib" /> - </tr> - </tal:x> - - <tal:y condition="not:exists:docinfo/bib"> - <!-- wenn es kein bibinfo gibt (archimedes-texte) --> - <tr> - <td class="type">Author:</td> - <td class="content" tal:content="docinfo/creator" /> - </tr> - <tr> - <td class="type">Title:</td> - <td class="content" tal:content="docinfo/title" /> - </tr> - <tr> - <td class="type">Date:</td> - <td class="content" tal:content="docinfo/date" /> - </tr> - </tal:y> - </tal:x> - <!-- ende kein template fuer die daten --> - </table> - - <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> - <h2>Permanent URL</h2> - <table> - <tr> - <td class="type">Document ID:</td> - <td class="content" tal:content="dri" /> - </tr> - <tr> - <td class="type">Permanent URL:</td> - <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" - tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> - </tr> - </table> - </tal:block> - - <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs"> - <h2>Presentation context</h2> - <ul> - <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name" - tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li> - </ul> - </tal:block> - - <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> - <h2>Copyright information</h2> - <table border="0" tal:condition="attribution | copyright"> - <!-- attribution --> - <tr tal:condition="attribution" - tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> - <!-- copyright --> - <tr tal:condition="copyright" - tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> - </table> - <table border="0" tal:condition="not:attribution | copyright"> - <tr> - <td class="type">Copyright:</td> - <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the - History of Science</a> (unless stated otherwise)</td> - </tr> - <tr tal:define="accType python:docinfo.get('accessType', None)"> - <td class="type">License:</td> - <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" - href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> - <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" - tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> - (unless stated otherwise) - </td> - </tr> - </table> - </tal:block> - </div> - </div> - <!-- /main content column --> - - <div class="col buttons"> - <!-- option block column --> - <div class="options"> - <h4>Browse</h4> - <ul class="list"> - <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> - </ul> - </div> - - <div class="options" tal:condition="docpath"> - <h4>Download</h4> - Download full document - <ul class="list"> - <li><a target="_blank" rel="nofollow" class="download" - tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" target="_blank">as HTML</a></li> - <li><a target="_blank" rel="nofollow" class="download" - tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as XML</a></li> - </ul> - (copyright and license see below) - </div> - - <div class="options" tal:condition="docpath"> - <h4>Search</h4> - <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl"> - <input type="hidden" - tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" - tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> - <!-- query text --> - <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a - tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a> - <ul> - <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> - Exact</li> - <li><input type="radio" name="queryType" value="fulltextMorph" - tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> - <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> - Fulltext index</li> - <li><input type="radio" name="queryType" value="ftIndexMorph" - tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> - </ul> - </form> - </div> - - <div class="options" tal:condition="availableLayers"> - <h4>Metadata</h4> - <form tal:attributes="action viewerUrl" class="autosubmit"> - <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" tal:repeat="param params" - tal:attributes="name param; value python:params[param]" /> - <ul> - <!-- text layer select buttons (rendered always) --> - <tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" - tal:condition="python:exists(mpath)"> - <li metal:use-macro="python:path(mpath)" /> - </tal:block> - </tal:block> - </ul> - <input type="submit" value="Go!" /> - </form> - </div> - </div> - <!-- /option block column --> - </div> - <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> - </tal:block> - -</body> -<body tal:condition="not:numPages"> - <div class="errortext">Sorry, document doesn't exist.</div> - <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> - </tal:block> -</body> -</html> \ No newline at end of file diff -r eb46138db658 -r da7daa783df4 zpt/viewer_indexonly.zpt --- a/zpt/viewer_indexonly.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -<!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; - docpath docinfo/textURLPath | nothing; - query nothing; - numPages docinfo/numPages | nothing; - global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));"> -<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" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" /> -</head> -<body tal:condition="numPages"> - <!-- header --> - <div class="page-head"> - <metal:block metal:use-macro="here/template/common_template/macros/head"> - <div metal:fill-slot="view-switcher"></div> - </metal:block> - </div> - - <!-- main --> - <div class="page-body"> - - <div class="col index-image"> - <!-- image --> - <a tal:define="tp docinfo/titlePage | string:1" - tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" - tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img - tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" - src="template/book.png" /></a> - </div> - - <div class="col main"> - <!-- main content column --> - <div class="index-info"> - <h2>Bibliographic information</h2> - <table border="0"> - <tal:x condition="python:formattedData"> - <!-- wenn es bibinfo in docinfo gibt --> - <tr tal:replace="structure python:formattedData" /> - </tal:x> - - <tal:x condition="not:formattedData"> - <!-- kein template fuer die daten --> - <tal:x condition="exists:docinfo/bib"> - <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> - <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> - <td class="content" tal:content="bibinfo/bib" /> - </tr> - </tal:x> - - <tal:y condition="not:exists:docinfo/bib"> - <!-- wenn es kein bibinfo gibt (archimedes-texte) --> - <tr> - <td class="type">Author:</td> - <td class="content" tal:content="docinfo/creator" /> - </tr> - <tr> - <td class="type">Title:</td> - <td class="content" tal:content="docinfo/title" /> - </tr> - <tr> - <td class="type">Date:</td> - <td class="content" tal:content="docinfo/date" /> - </tr> - </tal:y> - </tal:x> - <!-- ende kein template fuer die daten --> - </table> - - <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> - <h2>Permanent URL</h2> - <table> - <tr> - <td class="type">Document ID:</td> - <td class="content" tal:content="dri" /> - </tr> - <tr> - <td class="type">Permanent URL:</td> - <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" - tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> - </tr> - </table> - </tal:block> - - <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs"> - <h2>Presentation context</h2> - <ul> - <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name" - tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li> - </ul> - </tal:block> - - <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> - <h2>Copyright information</h2> - <table border="0" tal:condition="attribution | copyright"> - <!-- attribution --> - <tr tal:condition="attribution" - tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> - <!-- copyright --> - <tr tal:condition="copyright" - tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> - </table> - <table border="0" tal:condition="not:attribution | copyright"> - <tr> - <td class="type">Copyright:</td> - <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the - History of Science</a> (unless stated otherwise)</td> - </tr> - <tr tal:define="accType python:docinfo.get('accessType', None)"> - <td class="type">License:</td> - <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" - href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> - <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" - tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> - (unless stated otherwise) - </td> - </tr> - </table> - </tal:block> - </div> - </div> - <!-- /main content column --> - </div> - -</body> -<body tal:condition="not:numPages"> - <div class="errortext">Sorry, document doesn't exist.</div> -</body> -</html> \ No newline at end of file diff -r eb46138db658 -r da7daa783df4 zpt/viewer_text.zpt --- a/zpt/viewer_text.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -<!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; viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; - availableLayers python:here.getAvailableLayers().get('text', None); - viewerUrl docinfo/viewerUrl; - rootUrl here/getDocumentViewerURL; - numPages docinfo/numPages | 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" /> -<!--[if IE]><link rel="stylesheet" href="template/docuviewer_ie_css" type="text/css" /><![endif]--> -<script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></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(); - }); -// --> -</script> -<!-- layer headers (rendered always) --> -<tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> - <metal:block metal:use-macro="python:path(mpath)" /> - </tal:block> -</tal:block> -</head> -<!-- body --> -<body tal:condition="numPages"> - <tal:block - tal:define="docpath docinfo/textURLPath | nothing; - pn pageinfo/pn; - flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; - textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);"> - <!-- header --> - <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> - - <!-- text page --> - <div class="col main"> - <div class="ruler top"> - <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> - </div> - <div class="content text"> - <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" - tal:content="structure pageinfo/pageHeaderTitle" /> - <tal:block tal:condition="textPage" tal:replace="structure textPage"/> - <div class="emptyPage" tal:condition="not:textPage">[Error: no text]</div> - </div> - </div> - <!-- end of col-main --> - - <!-- layer columns (rendered always) --> - <tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column" - tal:condition="python:exists(mpath)"> - <metal:block metal:use-macro="python:path(mpath)" /> - </tal:block> - </tal:block> - - <!-- right-side options --> - <div class="col buttons"> - <!--BEGIN TEXT LAYERS --> - <div class="options" tal:condition="availableLayers"> - <h4>Text layer</h4> - <form tal:attributes="action viewerUrl" class="autosubmit"> - <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" - tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> - <ul> - <!-- text layer select buttons (rendered always) --> - <tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" - tal:condition="python:exists(mpath)"> - <li metal:use-macro="python:path(mpath)" /> - </tal:block> - </tal:block> - </ul> - <input type="submit" value="Go!" /> - </form> - </div> - <!--END TEXT LAYERS--> - - <!--"BEGIN TEXT SIZE"--> - <!-- <div class="options"> - <h4>Text size</h4> - <ul class="fsizer"> - <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> - <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> - <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> - </ul> - </div> --> - <!--"END TEXT SIZE"--> - - <!--"BEGIN TEXT NORMALIZATION"--> - <div class="options"> - <h4>Text normalization</h4> - <form tal:attributes="action viewerUrl" class="autosubmit" - tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> - <input type="hidden" - tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" - tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> - <ul> - <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" - tal:attributes="checked python:norm=='orig'" /> Original</li> - <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" - tal:attributes="checked python:norm=='reg'" /> Regularized</li> - <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" - tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> - </ul> - <input type="submit" value="Go!" /> - </form> - </div> - <!--"END TEXT NORMALIZATION"--> - - <!-- layer option boxes (rendered if active) --> - <tal:block tal:repeat="layer availableLayers"> - <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" - tal:condition="python:exists(mpath)"> - <metal:block metal:use-macro="python:path(mpath)" /> - </tal:block> - </tal:block> - </div> - <!-- /col-right --> - - </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> - </tal:block> -</body> -<body tal:condition="not:numPages"> - <div class="errortext">Sorry, document doesn't exist.</div> - <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> -</body> -</html> diff -r eb46138db658 -r da7daa783df4 zpt/viewer_thumbs.zpt --- a/zpt/viewer_thumbs.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -<!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; - viewerUrl docinfo/viewerUrl; - rootUrl here/getDocumentViewerURL; - numPages docinfo/numPages | 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:$rootUrl/template/jquery_js"></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(); - }); -// --> -</script> -</head> -<body tal:condition="numPages"> - <tal:block - tal:define="pn pageinfo/pn; - start pageinfo/start; - thumbRows python:int(request.get('thumbRows', 10)); - thumbCols python:int(request.get('thumbCols', 12)); - thumbSize python:int(request.get('thumbSize', 100)); - flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; - pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, maxIdx=numPages); - pageNumbers docinfo/pageNumbers | nothing; - left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']); - right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);"> - <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)"> - <!-- col-main: text page --> - <div class="col main"> - <div class="ruler"> - <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> - </div> - <div class="content-thumbs"> - <table class="thumbs"> - <tr tal:repeat="row pageBatch/pages"> - <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a - tal:define="idx thumb/idx" tal:condition="idx" - tal:attributes="href python:here.getLink(params={'pn':idx, 'viewMode':'images'})"> <img - tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=thumbSize,dh=thumbSize,docinfo=docinfo),'images/pic'); - alt idx" /><br /> - <span title="Scan number" tal:content="idx" /> <span - tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']" - title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" /> - </a></td> - </tr> - </table> - </div> - <div class="ruler bottom"> - <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> - </div> - </div> - <!-- /col-main --> - - <!-- right-side options --> - <div class="col buttons"> - <!--"BEGIN TEXT DISPLAY" --> - <div class="options"> - <h4>Thumbnail display</h4> - <form tal:attributes="action viewerUrl" class="autosubmit"> - <input type="hidden" - tal:define="params python:here.getParams(params={'thumbRows':None,'thumbCols':None,'thumbSize':None})" - tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> - <ul> - <li>Rows <select class="autosubmit" name="thumbRows" tal:define="rows python:[2,3,5,10,12,15,20,50,100]"> - <option tal:repeat="row rows" tal:attributes="selected python:thumbRows==row; value row" tal:content="row" /> - </select> - </li> - <li>Columns <select class="autosubmit" name="thumbCols" tal:define="cols python:[2,3,5,10,12,15,20,50,100]"> - <option tal:repeat="col cols" tal:attributes="selected python:thumbCols==col; value col" tal:content="col" /> - </select> - </li> - <li>Thumbnail size <select class="autosubmit" name="thumbSize" tal:define="sizes python:[100,150,200,300,500]"> - <option tal:repeat="size sizes" tal:attributes="selected python:thumbSize==size; value size" tal:content="size" /> - </select> - </li> - </ul> - </form> - </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> - </tal:block> -</body> -<body tal:condition="not:numPages"> - <div class="errortext">Sorry, document doesn't exist.</div> - <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> -</body> -</html> \ No newline at end of file diff -r eb46138db658 -r da7daa783df4 zpt/viewer_xml.zpt --- a/zpt/viewer_xml.zpt Fri Nov 16 16:40:29 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -<!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; - rootUrl here/getDocumentViewerURL; - numPages docinfo/numPages | 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:$rootUrl/template/jquery_js"></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(); - }); - // --> - </script> -</head> -<body tal:condition="numPages"> - <tal:block - tal:define="docpath docinfo/textURLPath; - pn pageinfo/pn; - flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; - textPage python:here.getTextPage(mode='xml', pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> - <!-- header --> - <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> - - <!-- text page --> - <div class="col main"> - <div class="ruler top"> - <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> - </div> - <div class="content xml"> - <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" - tal:content="structure pageinfo/pageHeaderTitle" /> - <tal:block tal:replace="structure textPage" /> - </div> - </div> - <!-- col-main --> - - <!-- right-side options --> - <div class="col buttons"> - <!--"BEGIN TEXT SIZE"--> - <!-- <div class="options"> - <h4>Text size</h4> - <ul class="fsizer"> - <li> - <a href="javascript:fontSize(12);" class="fs_sml">S</a> - </li> - <li> - <a href="javascript:fontSize(14);" class="fs_med">M</a> - </li> - <li> - <a href="javascript:fontSize(16);" class="fs_lrg">L</a> - </li> - </ul> - </div> --> - <!--"END TEXT SIZE"--> - - </div> - <!-- /col-right --> - - </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 tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> - </tal:block> -</body> -<body tal:condition="not:numPages"> - <div class="errortext">Sorry, document doesn't exist.</div> - <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> - <!-- footer --> - <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> - </tal:block> -</body> -</html>