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