annotate zpt/layer_text_search.zpt @ 526:3f375a048402

moved search and dict into separate layers. removed search_template. added tocMode=concordance. fixed bug with paging tocs.
author casties
date Tue, 10 Apr 2012 19:41:44 +0200
parents
children 0b8bed1223ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
3 <html xmlns="http://www.w3.org/1999/xhtml">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
4 <head>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
5 <metal:block metal:define-macro="html_head"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
6 tal:define="
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
7 global query python:request.get('query', None);
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
8 global queryType python:request.get('queryType','fulltextMorph');
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
9 ">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
10 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
11 </head>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
12 <body>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
13 <!-- right-side options -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
14 <div class="col buttons">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
15 <!-- LAYER DISPLAY OPTION -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
16 <ul>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
17 <metal:block metal:define-macro="layer_select_li">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
18 <li tal:condition="python:query">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
19 <input type="checkbox" class="autosubmit" name="viewLayer" value="search"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
20 tal:attributes="checked python:'search' in viewLayers" /> Search hits
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
21 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
22 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
23 </ul>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
24 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
25
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
26 <metal:block metal:define-macro="extra_column" tal:condition="python:'search' in viewLayers">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
27 <!-- right-side search results -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
28 <div class="col results" tal:condition="query">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
29 <!--"BEGIN SEARCH RESULTS" -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
30 <div class="options">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
31 <h4>Search results</h4>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
32 <div
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
33 tal:define="start pageinfo/resultStart; resultsize python:docinfo.get('resultSize',0); grpsize pageinfo/resultPageSize;
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
34 batch python:here.getBatch(start=start,size=grpsize,end=resultsize);">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
35 <div class="ruler" tal:define="startParam string:resultStart">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
36 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
37 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
38 <div class="content"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
39 tal:content="structure python:here.getResultsPage(mode=queryType,query=query,start=start,size=grpsize,pageinfo=pageinfo,docinfo=docinfo)" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
40 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
41 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
42 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
43 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
44
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
45 <metal:block metal:define-macro="options_box">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
46 <!--"BEGIN SEARCH"-->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
47 <div class="options">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
48 <h4>Search</h4>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
49 <form tal:attributes="action viewerUrl">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
50 <input type="hidden"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
51 tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
52 tal:repeat="param params"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
53 tal:attributes="name param; value python:params[param]" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
54 <!-- make sure we have one viewLayer=search -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
55 <tal:block tal:repeat="vl viewLayers">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
56 <input type="hidden" name="viewLayer" tal:attributes="value vl"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
57 tal:condition="python:vl != 'search'" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
58 </tal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
59 <input type="hidden" name="viewLayer" value="search" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
60 <!-- query text -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
61 <input type="text" name="query" tal:attributes="value query" /> <input
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
62 type="submit" value="Search" /> <a
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
63 tal:attributes="href python:here.getLink('query',None)">Clear</a>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
64 <ul>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
65 <li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
66 <input type="radio" name="queryType" value="fulltext"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
67 tal:attributes="checked python:queryType=='fulltext'" /> Exact
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
68 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
69 <li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
70 <input type="radio" name="queryType" value="fulltextMorph"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
71 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
72 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
73 <li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
74 <input type="radio" name="queryType" value="ftIndex"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
75 tal:attributes="checked python:queryType=='ftIndex'" /> Fulltext index
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
76 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
77 <li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
78 <input type="radio" name="queryType" value="ftIndexMorph"
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
79 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
80 index
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
81 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
82 </ul>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
83 </form>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
84 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
85 <!--"END SEARCH"-->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
86 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
87
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
88 </body>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
89
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
90 </html>