Mercurial > hg > documentViewer
annotate zpt/viewer/viewer_text.zpt @ 616:3f9b42840901
bug fix, configure annotation pageuri
| author | dwinter |
|---|---|
| date | Wed, 23 Jul 2014 17:20:34 +0200 |
| parents | da7daa783df4 |
| children | e36bf3226fde |
| rev | line source |
|---|---|
| 479 | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
490
6f116b86a226
more new template stuff. moved ImageFile index method to SrvTxtUtils
casties
parents:
489
diff
changeset
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 479 | 3 <html xmlns="http://www.w3.org/1999/xhtml" |
| 501 | 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; |
| 508 | 5 tocMode pageinfo/tocMode; viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; |
| 525 | 6 availableLayers python:here.getAvailableLayers().get('text', None); |
| 508 | 7 viewerUrl docinfo/viewerUrl; |
| 501 | 8 rootUrl here/getDocumentViewerURL; |
| 9 numPages docinfo/numPages | nothing;"> | |
| 10 <head> | |
| 525 | 11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 12 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> | |
| 13 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> | |
|
535
510bae2b593b
more fixes, e.g. IE support. first version of index page.
casties
parents:
532
diff
changeset
|
14 <!--[if IE]><link rel="stylesheet" href="template/docuviewer_ie_css" type="text/css" /><![endif]--> |
| 525 | 15 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script> |
| 16 <script type="text/javascript"> | |
| 543 | 17 // <!-- |
| 532 | 18 $(document).ready(function() { |
| 19 // autosubmit forms | |
| 20 $('form.autosubmit').find('.autosubmit').change(function() { | |
| 21 this.form.submit(); | |
| 22 }); | |
| 23 $('form.autosubmit input[type="submit"]').hide(); | |
| 24 }); | |
| 525 | 25 // --> |
| 26 </script> | |
| 526 | 27 <!-- layer headers (rendered always) --> |
| 28 <tal:block tal:repeat="layer availableLayers"> | |
| 532 | 29 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> |
| 525 | 30 <metal:block metal:use-macro="python:path(mpath)" /> |
| 31 </tal:block> | |
| 32 </tal:block> | |
| 501 | 33 </head> |
|
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
34 <!-- body --> |
| 501 | 35 <body tal:condition="numPages"> |
| 36 <tal:block | |
| 530 | 37 tal:define="docpath docinfo/textURLPath | nothing; |
| 506 | 38 pn pageinfo/pn; |
| 512 | 39 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; |
| 543 | 40 textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);"> |
| 502 | 41 <!-- header --> |
| 501 | 42 <div class="page-head"> |
| 43 <metal:block metal:use-macro="here/template/common_template/macros/head" /> | |
| 44 </div> | |
| 532 | 45 |
| 501 | 46 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> |
| 47 <!--table of contents--> | |
| 510 | 48 <div class="col toc"> |
| 532 | 49 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> |
| 501 | 50 </div> |
| 51 | |
| 52 <!-- text page --> | |
| 510 | 53 <div class="col main"> |
| 540 | 54 <div class="ruler top"> |
| 501 | 55 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> |
| 56 </div> | |
| 570 | 57 <div class="content text"> |
| 501 | 58 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" |
| 59 tal:content="structure pageinfo/pageHeaderTitle" /> | |
| 543 | 60 <tal:block tal:condition="textPage" tal:replace="structure textPage"/> |
| 571 | 61 <div class="emptyPage" tal:condition="not:textPage">[Error: no text]</div> |
| 501 | 62 </div> |
| 63 </div> | |
| 508 | 64 <!-- end of col-main --> |
| 501 | 65 |
| 526 | 66 <!-- layer columns (rendered always) --> |
| 67 <tal:block tal:repeat="layer availableLayers"> | |
| 68 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column" | |
| 69 tal:condition="python:exists(mpath)"> | |
| 70 <metal:block metal:use-macro="python:path(mpath)" /> | |
| 71 </tal:block> | |
| 72 </tal:block> | |
| 510 | 73 |
| 501 | 74 <!-- right-side options --> |
| 510 | 75 <div class="col buttons"> |
| 585 | 76 <!--BEGIN TEXT LAYERS --> |
| 559 | 77 <div class="options" tal:condition="availableLayers"> |
| 532 | 78 <h4>Text layer</h4> |
| 501 | 79 <form tal:attributes="action viewerUrl" class="autosubmit"> |
| 559 | 80 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" |
| 532 | 81 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
| 508 | 82 <ul> |
| 532 | 83 <!-- text layer select buttons (rendered always) --> |
| 84 <tal:block tal:repeat="layer availableLayers"> | |
| 85 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" | |
| 86 tal:condition="python:exists(mpath)"> | |
| 87 <li metal:use-macro="python:path(mpath)" /> | |
| 88 </tal:block> | |
| 89 </tal:block> | |
| 508 | 90 </ul> |
| 545 | 91 <input type="submit" value="Go!" /> |
| 501 | 92 </form> |
| 93 </div> | |
| 585 | 94 <!--END TEXT LAYERS--> |
| 501 | 95 |
| 96 <!--"BEGIN TEXT SIZE"--> | |
| 532 | 97 <!-- <div class="options"> |
| 501 | 98 <h4>Text size</h4> |
| 508 | 99 <ul class="fsizer"> |
| 532 | 100 <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> |
| 101 <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> | |
| 102 <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> | |
| 508 | 103 </ul> |
| 532 | 104 </div> --> |
| 501 | 105 <!--"END TEXT SIZE"--> |
| 485 | 106 |
| 501 | 107 <!--"BEGIN TEXT NORMALIZATION"--> |
| 508 | 108 <div class="options"> |
| 501 | 109 <h4>Text normalization</h4> |
| 110 <form tal:attributes="action viewerUrl" class="autosubmit" | |
| 111 tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> | |
| 112 <input type="hidden" | |
|
509
9d05befdd462
try to get characterNormalization in search result working.
casties
parents:
508
diff
changeset
|
113 tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" |
| 532 | 114 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
| 508 | 115 <ul> |
| 532 | 116 <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" |
| 117 tal:attributes="checked python:norm=='orig'" /> Original</li> | |
| 118 <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" | |
| 119 tal:attributes="checked python:norm=='reg'" /> Regularized</li> | |
| 120 <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" | |
| 121 tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> | |
| 508 | 122 </ul> |
| 123 <input type="submit" value="Go!" /> | |
| 501 | 124 </form> |
| 125 </div> | |
| 126 <!--"END TEXT NORMALIZATION"--> | |
| 127 | |
| 526 | 128 <!-- layer option boxes (rendered if active) --> |
| 129 <tal:block tal:repeat="layer availableLayers"> | |
| 532 | 130 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" |
| 525 | 131 tal:condition="python:exists(mpath)"> |
| 132 <metal:block metal:use-macro="python:path(mpath)" /> | |
| 501 | 133 </tal:block> |
| 525 | 134 </tal:block> |
| 501 | 135 </div> |
| 136 <!-- /col-right --> | |
| 137 | |
| 138 </div> | |
| 139 <!-- /page-body --> | |
| 140 | |
| 141 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> | |
| 142 <div class="errortext">Sorry, access to this document is restricted.</div> | |
| 143 </div> | |
| 543 | 144 |
| 145 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> | |
| 146 <!-- footer --> | |
| 147 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> | |
| 148 </tal:block> | |
| 501 | 149 </tal:block> |
| 150 </body> | |
| 151 <body tal:condition="not:numPages"> | |
| 152 <div class="errortext">Sorry, document doesn't exist.</div> | |
| 543 | 153 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
| 154 <!-- footer --> | |
| 155 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/> | |
| 156 </tal:block> | |
| 501 | 157 </body> |
| 158 </html> |
