Mercurial > hg > documentViewer
annotate zpt/viewer_text.zpt @ 541:c4cc01b104d7
better metadata display for index page.
author | casties |
---|---|
date | Mon, 20 Aug 2012 20:13:56 +0200 |
parents | 4b43a57ad9b3 |
children | 6cdc31e9ed8e |
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> |
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'; |
506 | 40 textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> |
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> | |
540 | 57 <div class="content text"> |
501 | 58 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" |
59 tal:content="structure pageinfo/pageHeaderTitle" /> | |
60 <tal:block tal:replace="structure textPage" /> | |
61 </div> | |
62 </div> | |
508 | 63 <!-- end of col-main --> |
501 | 64 |
526 | 65 <!-- layer columns (rendered always) --> |
66 <tal:block tal:repeat="layer availableLayers"> | |
67 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column" | |
68 tal:condition="python:exists(mpath)"> | |
69 <metal:block metal:use-macro="python:path(mpath)" /> | |
70 </tal:block> | |
71 </tal:block> | |
510 | 72 |
501 | 73 <!-- right-side options --> |
510 | 74 <div class="col buttons"> |
501 | 75 <!--"BEGIN TEXT DISPLAY" --> |
76 <div class="options"> | |
532 | 77 <h4>Text layer</h4> |
501 | 78 <form tal:attributes="action viewerUrl" class="autosubmit"> |
532 | 79 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})" |
80 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> | |
508 | 81 <ul> |
532 | 82 <!-- text layer select buttons (rendered always) --> |
83 <tal:block tal:repeat="layer availableLayers"> | |
84 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" | |
85 tal:condition="python:exists(mpath)"> | |
86 <li metal:use-macro="python:path(mpath)" /> | |
87 </tal:block> | |
88 </tal:block> | |
508 | 89 </ul> |
501 | 90 </form> |
91 </div> | |
92 <!--"END TEXT DISPLAY"--> | |
93 | |
94 <!--"BEGIN TEXT SIZE"--> | |
532 | 95 <!-- <div class="options"> |
501 | 96 <h4>Text size</h4> |
508 | 97 <ul class="fsizer"> |
532 | 98 <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> |
99 <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> | |
100 <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> | |
508 | 101 </ul> |
532 | 102 </div> --> |
501 | 103 <!--"END TEXT SIZE"--> |
485 | 104 |
501 | 105 <!--"BEGIN TEXT NORMALIZATION"--> |
508 | 106 <div class="options"> |
501 | 107 <h4>Text normalization</h4> |
108 <form tal:attributes="action viewerUrl" class="autosubmit" | |
109 tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> | |
110 <input type="hidden" | |
509
9d05befdd462
try to get characterNormalization in search result working.
casties
parents:
508
diff
changeset
|
111 tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" |
532 | 112 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
508 | 113 <ul> |
532 | 114 <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" |
115 tal:attributes="checked python:norm=='orig'" /> Original</li> | |
116 <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" | |
117 tal:attributes="checked python:norm=='reg'" /> Regularized</li> | |
118 <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" | |
119 tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> | |
508 | 120 </ul> |
121 <input type="submit" value="Go!" /> | |
501 | 122 </form> |
123 </div> | |
124 <!--"END TEXT NORMALIZATION"--> | |
125 | |
526 | 126 <!-- layer option boxes (rendered if active) --> |
127 <tal:block tal:repeat="layer availableLayers"> | |
532 | 128 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" |
525 | 129 tal:condition="python:exists(mpath)"> |
130 <metal:block metal:use-macro="python:path(mpath)" /> | |
501 | 131 </tal:block> |
525 | 132 </tal:block> |
501 | 133 </div> |
134 <!-- /col-right --> | |
135 | |
136 </div> | |
137 <!-- /page-body --> | |
138 | |
139 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> | |
140 <div class="errortext">Sorry, access to this document is restricted.</div> | |
141 </div> | |
142 | |
143 </tal:block> | |
144 </body> | |
145 <body tal:condition="not:numPages"> | |
146 <div class="errortext">Sorry, document doesn't exist.</div> | |
147 </body> | |
148 </html> |