source: documentViewer/zpt/layer_text_search.zpt @ 526:3f375a048402

Last change on this file since 526:3f375a048402 was 526:3f375a048402, checked in by casties, 12 years ago

moved search and dict into separate layers.
removed search_template.
added tocMode=concordance.
fixed bug with paging tocs.

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