Mercurial > hg > documentViewer
comparison 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 |
comparison
equal
deleted
inserted
replaced
531:ac232c293ad9 | 532:0b8bed1223ad |
---|---|
11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
12 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> | 12 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> |
13 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> | 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> | 14 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script> |
15 <script type="text/javascript"> | 15 <script type="text/javascript"> |
16 // <!-- | 16 // <!-- |
17 $(document).ready(function() { | 17 $(document).ready(function() { |
18 // autosubmit forms | 18 // autosubmit forms |
19 $('form.autosubmit').find('.autosubmit').change(function() { | 19 $('form.autosubmit').find('.autosubmit').change(function() { |
20 this.form.submit(); | 20 this.form.submit(); |
21 }); | 21 }); |
22 $('form.autosubmit input[type="submit"]').hide(); | 22 $('form.autosubmit input[type="submit"]').hide(); |
23 }); | 23 }); |
24 // --> | 24 // --> |
25 </script> | 25 </script> |
26 <!-- layer headers (rendered always) --> | 26 <!-- layer headers (rendered always) --> |
27 <tal:block tal:repeat="layer availableLayers"> | 27 <tal:block tal:repeat="layer availableLayers"> |
28 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" | 28 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> |
29 tal:condition="python:exists(mpath)"> | |
30 <metal:block metal:use-macro="python:path(mpath)" /> | 29 <metal:block metal:use-macro="python:path(mpath)" /> |
31 </tal:block> | 30 </tal:block> |
32 </tal:block> | 31 </tal:block> |
33 | |
34 </head> | 32 </head> |
35 <body tal:condition="numPages"> | 33 <body tal:condition="numPages"> |
36 <tal:block | 34 <tal:block |
37 tal:define="docpath docinfo/textURLPath | nothing; | 35 tal:define="docpath docinfo/textURLPath | nothing; |
38 pn pageinfo/pn; | 36 pn pageinfo/pn; |
40 textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> | 38 textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> |
41 <!-- header --> | 39 <!-- header --> |
42 <div class="page-head"> | 40 <div class="page-head"> |
43 <metal:block metal:use-macro="here/template/common_template/macros/head" /> | 41 <metal:block metal:use-macro="here/template/common_template/macros/head" /> |
44 </div> | 42 </div> |
43 | |
45 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> | 44 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> |
46 <!--table of contents--> | 45 <!--table of contents--> |
47 <div class="col toc"> | 46 <div class="col toc"> |
48 <metal:block | 47 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> |
49 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> | |
50 </div> | 48 </div> |
51 | 49 |
52 <!-- text page --> | 50 <!-- text page --> |
53 <div class="col main"> | 51 <div class="col main"> |
54 <div class="ruler"> | 52 <div class="ruler"> |
55 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> | 53 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> |
56 </div> | 54 </div> |
57 <ul class="switcher"> | |
58 <li> | |
59 <a tal:attributes="href python:here.getLink('viewMode','images')">Image</a> | |
60 </li> | |
61 <li class="sel">Text</li> | |
62 </ul> | |
63 <div class="content"> | 55 <div class="content"> |
64 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" | 56 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" |
65 tal:content="structure pageinfo/pageHeaderTitle" /> | 57 tal:content="structure pageinfo/pageHeaderTitle" /> |
66 <tal:block tal:replace="structure textPage" /> | 58 <tal:block tal:replace="structure textPage" /> |
67 </div> | 59 </div> |
78 | 70 |
79 <!-- right-side options --> | 71 <!-- right-side options --> |
80 <div class="col buttons"> | 72 <div class="col buttons"> |
81 <!--"BEGIN TEXT DISPLAY" --> | 73 <!--"BEGIN TEXT DISPLAY" --> |
82 <div class="options"> | 74 <div class="options"> |
83 <h4>Text display</h4> | 75 <h4>Text layer</h4> |
84 <form tal:attributes="action viewerUrl" class="autosubmit"> | 76 <form tal:attributes="action viewerUrl" class="autosubmit"> |
85 <input type="hidden" | 77 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})" |
86 tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})" | 78 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
87 tal:repeat="param params" | |
88 tal:attributes="name param; value python:params[param]" /> | |
89 <ul> | 79 <ul> |
90 <li> | 80 <!-- text layer select buttons (rendered always) --> |
91 <input class="autosubmit" type="radio" name="viewMode" value="text" | 81 <tal:block tal:repeat="layer availableLayers"> |
92 tal:attributes="checked python:viewMode=='text'" /> Text | 82 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" |
93 <ul> | 83 tal:condition="python:exists(mpath)"> |
94 <!-- text layer select buttons (rendered always) --> | 84 <li metal:use-macro="python:path(mpath)" /> |
95 <tal:block tal:repeat="layer availableLayers"> | 85 </tal:block> |
96 <tal:block | 86 </tal:block> |
97 tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" | |
98 tal:condition="python:exists(mpath)"> | |
99 <li metal:use-macro="python:path(mpath)" /> | |
100 </tal:block> | |
101 </tal:block> | |
102 </ul> | |
103 </li> | |
104 <li> | |
105 <input type="radio" class="autosubmit" name="viewMode" value="xml" | |
106 tal:attributes="checked python:viewMode=='xml'" /> XML<br /> <input | |
107 type="submit" value="Go!" /> | |
108 </li> | |
109 </ul> | 87 </ul> |
110 </form> | 88 </form> |
111 </div> | 89 </div> |
112 <!--"END TEXT DISPLAY"--> | 90 <!--"END TEXT DISPLAY"--> |
113 | 91 |
114 <!--"BEGIN TEXT SIZE"--> | 92 <!--"BEGIN TEXT SIZE"--> |
115 <div class="options"> | 93 <!-- <div class="options"> |
116 <h4>Text size</h4> | 94 <h4>Text size</h4> |
117 <ul class="fsizer"> | 95 <ul class="fsizer"> |
118 <li> | 96 <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> |
119 <a href="javascript:fontSize(12);" class="fs_sml">S</a> | 97 <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> |
120 </li> | 98 <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> |
121 <li> | |
122 <a href="javascript:fontSize(14);" class="fs_med">M</a> | |
123 </li> | |
124 <li> | |
125 <a href="javascript:fontSize(16);" class="fs_lrg">L</a> | |
126 </li> | |
127 </ul> | 99 </ul> |
128 </div> | 100 </div> --> |
129 <!--"END TEXT SIZE"--> | 101 <!--"END TEXT SIZE"--> |
130 | 102 |
131 <!--"BEGIN TEXT NORMALIZATION"--> | 103 <!--"BEGIN TEXT NORMALIZATION"--> |
132 <div class="options"> | 104 <div class="options"> |
133 <h4>Text normalization</h4> | 105 <h4>Text normalization</h4> |
134 <form tal:attributes="action viewerUrl" class="autosubmit" | 106 <form tal:attributes="action viewerUrl" class="autosubmit" |
135 tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> | 107 tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> |
136 <input type="hidden" | 108 <input type="hidden" |
137 tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" | 109 tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})" |
138 tal:repeat="param params" | 110 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
139 tal:attributes="name param; value python:params[param]" /> | |
140 <ul> | 111 <ul> |
141 <li> | 112 <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" |
142 <input type="radio" class="autosubmit" name="characterNormalization" | 113 tal:attributes="checked python:norm=='orig'" /> Original</li> |
143 value="orig" tal:attributes="checked python:norm=='orig'" /> Original | 114 <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" |
144 </li> | 115 tal:attributes="checked python:norm=='reg'" /> Regularized</li> |
145 <li> | 116 <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" |
146 <input type="radio" class="autosubmit" name="characterNormalization" | 117 tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> |
147 value="reg" tal:attributes="checked python:norm=='reg'" /> Regularized | |
148 </li> | |
149 <li> | |
150 <input type="radio" class="autosubmit" name="characterNormalization" | |
151 value="regPlusNorm" tal:attributes="checked python:norm=='regPlusNorm'" /> | |
152 Normalized | |
153 </li> | |
154 </ul> | 118 </ul> |
155 <input type="submit" value="Go!" /> | 119 <input type="submit" value="Go!" /> |
156 </form> | 120 </form> |
157 </div> | 121 </div> |
158 <!--"END TEXT NORMALIZATION"--> | 122 <!--"END TEXT NORMALIZATION"--> |
159 | 123 |
160 <!-- layer option boxes (rendered if active) --> | 124 <!-- layer option boxes (rendered if active) --> |
161 <tal:block tal:repeat="layer availableLayers"> | 125 <tal:block tal:repeat="layer availableLayers"> |
162 <tal:block | 126 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" |
163 tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" | |
164 tal:condition="python:exists(mpath)"> | 127 tal:condition="python:exists(mpath)"> |
165 <metal:block metal:use-macro="python:path(mpath)" /> | 128 <metal:block metal:use-macro="python:path(mpath)" /> |
166 </tal:block> | 129 </tal:block> |
167 </tal:block> | 130 </tal:block> |
168 </div> | 131 </div> |