annotate zpt/layer_text_search.zpt @ 540:4b43a57ad9b3

more nicer
author casties
date Thu, 16 Aug 2012 19:09:49 +0200
parents 0b8bed1223ad
children
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">
532
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
18 <li tal:condition="python:query"><input type="checkbox" class="autosubmit" name="viewLayer" value="search"
540
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
19 tal:attributes="checked python:'search' in viewLayers" /> Search results</li>
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
20 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
21 </ul>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
22 </div>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
23
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
24 <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
25 <!-- right-side search results -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
26 <div class="col results" tal:condition="query">
540
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
27 <div class="result">
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
28 <h4>Search results</h4>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
29 <div
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
30 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
31 batch python:here.getBatch(start=start,size=grpsize,end=resultsize);">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
32 <div class="ruler" tal:define="startParam string:resultStart">
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
33 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
34 </div>
540
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
35 <div class="query">
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
36 Searching "<span tal:content="query" />" (<span tal:content="queryType" />)
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
37 </div>
526
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">
540
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
46 <!-- search options -->
526
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">
532
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
50 <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})"
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
51 tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
52 <!-- make sure we have one viewLayer=search -->
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
53 <tal:block tal:repeat="vl viewLayers">
532
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
54 <input type="hidden" name="viewLayer" tal:attributes="value vl" tal:condition="python:vl != 'search'" />
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
55 </tal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
56 <input type="hidden" name="viewLayer" value="search" />
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
57 <!-- query text -->
532
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
58 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
540
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
59 tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a>
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
60 <ul>
532
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
61 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
62 Exact</li>
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
63 <li><input type="radio" name="queryType" value="fulltextMorph"
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
64 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
65 <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
66 Fulltext index</li>
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
67 <li><input type="radio" name="queryType" value="ftIndexMorph"
0b8bed1223ad new layout and styles.
casties
parents: 526
diff changeset
68 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
69 </ul>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
70 </form>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
71 </div>
540
4b43a57ad9b3 more nicer
casties
parents: 532
diff changeset
72 <!-- end search options-->
526
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
73 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
74
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
75 </body>
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
76
3f375a048402 moved search and dict into separate layers.
casties
parents:
diff changeset
77 </html>