Mercurial > hg > documentViewer
annotate zpt/viewer_text.zpt @ 535:510bae2b593b
more fixes, e.g. IE support. first version of index page.
author | casties |
---|---|
date | Thu, 26 Jul 2012 19:32:31 +0200 |
parents | 0b8bed1223ad |
children | abd36d4d97b8 |
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"> | |
532 | 17 // <!-- |
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> |
34 <body tal:condition="numPages"> | |
35 <tal:block | |
530 | 36 tal:define="docpath docinfo/textURLPath | nothing; |
506 | 37 pn pageinfo/pn; |
512 | 38 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; |
506 | 39 textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> |
502 | 40 <!-- header --> |
501 | 41 <div class="page-head"> |
42 <metal:block metal:use-macro="here/template/common_template/macros/head" /> | |
43 </div> | |
532 | 44 |
501 | 45 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> |
46 <!--table of contents--> | |
510 | 47 <div class="col toc"> |
532 | 48 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> |
501 | 49 </div> |
50 | |
51 <!-- text page --> | |
510 | 52 <div class="col main"> |
501 | 53 <div class="ruler"> |
54 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> | |
55 </div> | |
56 <div class="content"> | |
57 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" | |
58 tal:content="structure pageinfo/pageHeaderTitle" /> | |
59 <tal:block tal:replace="structure textPage" /> | |
60 </div> | |
61 </div> | |
508 | 62 <!-- end of col-main --> |
501 | 63 |
526 | 64 <!-- layer columns (rendered always) --> |
65 <tal:block tal:repeat="layer availableLayers"> | |
66 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column" | |
67 tal:condition="python:exists(mpath)"> | |
68 <metal:block metal:use-macro="python:path(mpath)" /> | |
69 </tal:block> | |
70 </tal:block> | |
510 | 71 |
501 | 72 <!-- right-side options --> |
510 | 73 <div class="col buttons"> |
501 | 74 <!--"BEGIN TEXT DISPLAY" --> |
75 <div class="options"> | |
532 | 76 <h4>Text layer</h4> |
501 | 77 <form tal:attributes="action viewerUrl" class="autosubmit"> |
532 | 78 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})" |
79 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> | |
508 | 80 <ul> |
532 | 81 <!-- text layer select buttons (rendered always) --> |
82 <tal:block tal:repeat="layer availableLayers"> | |
83 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" | |
84 tal:condition="python:exists(mpath)"> | |
85 <li metal:use-macro="python:path(mpath)" /> | |
86 </tal:block> | |
87 </tal:block> | |
508 | 88 </ul> |
501 | 89 </form> |
90 </div> | |
91 <!--"END TEXT DISPLAY"--> | |
92 | |
93 <!--"BEGIN TEXT SIZE"--> | |
532 | 94 <!-- <div class="options"> |
501 | 95 <h4>Text size</h4> |
508 | 96 <ul class="fsizer"> |
532 | 97 <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> |
98 <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> | |
99 <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> | |
508 | 100 </ul> |
532 | 101 </div> --> |
501 | 102 <!--"END TEXT SIZE"--> |
485 | 103 |
501 | 104 <!--"BEGIN TEXT NORMALIZATION"--> |
508 | 105 <div class="options"> |
501 | 106 <h4>Text normalization</h4> |
107 <form tal:attributes="action viewerUrl" class="autosubmit" | |
108 tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> | |
109 <input type="hidden" | |
509
9d05befdd462
try to get characterNormalization in search result working.
casties
parents:
508
diff
changeset
|
110 tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" |
532 | 111 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
508 | 112 <ul> |
532 | 113 <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" |
114 tal:attributes="checked python:norm=='orig'" /> Original</li> | |
115 <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" | |
116 tal:attributes="checked python:norm=='reg'" /> Regularized</li> | |
117 <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" | |
118 tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> | |
508 | 119 </ul> |
120 <input type="submit" value="Go!" /> | |
501 | 121 </form> |
122 </div> | |
123 <!--"END TEXT NORMALIZATION"--> | |
124 | |
526 | 125 <!-- layer option boxes (rendered if active) --> |
126 <tal:block tal:repeat="layer availableLayers"> | |
532 | 127 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" |
525 | 128 tal:condition="python:exists(mpath)"> |
129 <metal:block metal:use-macro="python:path(mpath)" /> | |
501 | 130 </tal:block> |
525 | 131 </tal:block> |
501 | 132 </div> |
133 <!-- /col-right --> | |
134 | |
135 </div> | |
136 <!-- /page-body --> | |
137 | |
138 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> | |
139 <div class="errortext">Sorry, access to this document is restricted.</div> | |
140 </div> | |
141 | |
142 </tal:block> | |
143 </body> | |
144 <body tal:condition="not:numPages"> | |
145 <div class="errortext">Sorry, document doesn't exist.</div> | |
146 </body> | |
147 </html> |