Mercurial > hg > documentViewer
comparison zpt/layer_text_search.zpt @ 540:4b43a57ad9b3
more nicer
author | casties |
---|---|
date | Thu, 16 Aug 2012 19:09:49 +0200 |
parents | 0b8bed1223ad |
children |
comparison
equal
deleted
inserted
replaced
539:37d122560028 | 540:4b43a57ad9b3 |
---|---|
14 <div class="col buttons"> | 14 <div class="col buttons"> |
15 <!-- LAYER DISPLAY OPTION --> | 15 <!-- LAYER DISPLAY OPTION --> |
16 <ul> | 16 <ul> |
17 <metal:block metal:define-macro="layer_select_li"> | 17 <metal:block metal:define-macro="layer_select_li"> |
18 <li tal:condition="python:query"><input type="checkbox" class="autosubmit" name="viewLayer" value="search" | 18 <li tal:condition="python:query"><input type="checkbox" class="autosubmit" name="viewLayer" value="search" |
19 tal:attributes="checked python:'search' in viewLayers" /> Search hits</li> | 19 tal:attributes="checked python:'search' in viewLayers" /> Search results</li> |
20 </metal:block> | 20 </metal:block> |
21 </ul> | 21 </ul> |
22 </div> | 22 </div> |
23 | 23 |
24 <metal:block metal:define-macro="extra_column" tal:condition="python:'search' in viewLayers"> | 24 <metal:block metal:define-macro="extra_column" tal:condition="python:'search' in viewLayers"> |
25 <!-- right-side search results --> | 25 <!-- right-side search results --> |
26 <div class="col results" tal:condition="query"> | 26 <div class="col results" tal:condition="query"> |
27 <!--"BEGIN SEARCH RESULTS" --> | 27 <div class="result"> |
28 <div class="options"> | |
29 <h4>Search results</h4> | 28 <h4>Search results</h4> |
30 <div | 29 <div |
31 tal:define="start pageinfo/resultStart; resultsize python:docinfo.get('resultSize',0); grpsize pageinfo/resultPageSize; | 30 tal:define="start pageinfo/resultStart; resultsize python:docinfo.get('resultSize',0); grpsize pageinfo/resultPageSize; |
32 batch python:here.getBatch(start=start,size=grpsize,end=resultsize);"> | 31 batch python:here.getBatch(start=start,size=grpsize,end=resultsize);"> |
33 <div class="ruler" tal:define="startParam string:resultStart"> | 32 <div class="ruler" tal:define="startParam string:resultStart"> |
34 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> | 33 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> |
34 </div> | |
35 <div class="query"> | |
36 Searching "<span tal:content="query" />" (<span tal:content="queryType" />) | |
35 </div> | 37 </div> |
36 <div class="content" | 38 <div class="content" |
37 tal:content="structure python:here.getResultsPage(mode=queryType,query=query,start=start,size=grpsize,pageinfo=pageinfo,docinfo=docinfo)" /> | 39 tal:content="structure python:here.getResultsPage(mode=queryType,query=query,start=start,size=grpsize,pageinfo=pageinfo,docinfo=docinfo)" /> |
38 </div> | 40 </div> |
39 </div> | 41 </div> |
40 </div> | 42 </div> |
41 </metal:block> | 43 </metal:block> |
42 | 44 |
43 <metal:block metal:define-macro="options_box"> | 45 <metal:block metal:define-macro="options_box"> |
44 <!--"BEGIN SEARCH"--> | 46 <!-- search options --> |
45 <div class="options"> | 47 <div class="options"> |
46 <h4>Search</h4> | 48 <h4>Search</h4> |
47 <form tal:attributes="action viewerUrl"> | 49 <form tal:attributes="action viewerUrl"> |
48 <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})" | 50 <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})" |
49 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> | 51 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
52 <input type="hidden" name="viewLayer" tal:attributes="value vl" tal:condition="python:vl != 'search'" /> | 54 <input type="hidden" name="viewLayer" tal:attributes="value vl" tal:condition="python:vl != 'search'" /> |
53 </tal:block> | 55 </tal:block> |
54 <input type="hidden" name="viewLayer" value="search" /> | 56 <input type="hidden" name="viewLayer" value="search" /> |
55 <!-- query text --> | 57 <!-- query text --> |
56 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a | 58 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a |
57 tal:attributes="href python:here.getLink('query',None)">Clear</a> | 59 tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a> |
58 <ul> | 60 <ul> |
59 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> | 61 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> |
60 Exact</li> | 62 Exact</li> |
61 <li><input type="radio" name="queryType" value="fulltextMorph" | 63 <li><input type="radio" name="queryType" value="fulltextMorph" |
62 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> | 64 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> |
65 <li><input type="radio" name="queryType" value="ftIndexMorph" | 67 <li><input type="radio" name="queryType" value="ftIndexMorph" |
66 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> | 68 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> |
67 </ul> | 69 </ul> |
68 </form> | 70 </form> |
69 </div> | 71 </div> |
70 <!--"END SEARCH"--> | 72 <!-- end search options--> |
71 </metal:block> | 73 </metal:block> |
72 | 74 |
73 </body> | 75 </body> |
74 | 76 |
75 </html> | 77 </html> |