source: documentViewer/zpt/layer_text_search.zpt @ 537:ad6f97fd3944

Last change on this file since 537:ad6f97fd3944 was 532:0b8bed1223ad, checked in by casties, 12 years ago

new layout and styles.

File size: 3.3 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"><input type="checkbox" class="autosubmit" name="viewLayer" value="search"
19          tal:attributes="checked python:'search' in viewLayers" /> Search hits</li>
20      </metal:block>
21    </ul>
22  </div>
23
24  <metal:block metal:define-macro="extra_column" tal:condition="python:'search' in viewLayers">
25    <!-- right-side search results -->
26    <div class="col results" tal:condition="query">
27      <!--"BEGIN SEARCH RESULTS"  -->
28      <div class="options">
29        <h4>Search results</h4>
30        <div
31          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);">
33          <div class="ruler" tal:define="startParam string:resultStart">
34            <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" />
35          </div>
36          <div class="content"
37            tal:content="structure python:here.getResultsPage(mode=queryType,query=query,start=start,size=grpsize,pageinfo=pageinfo,docinfo=docinfo)" />
38        </div>
39      </div>
40    </div>
41  </metal:block>
42
43  <metal:block metal:define-macro="options_box">
44    <!--"BEGIN SEARCH"-->
45    <div class="options">
46      <h4>Search</h4>
47      <form tal:attributes="action viewerUrl">
48        <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]" />
50        <!-- make sure we have one viewLayer=search -->
51        <tal:block tal:repeat="vl viewLayers">
52          <input type="hidden" name="viewLayer" tal:attributes="value vl" tal:condition="python:vl != 'search'" />
53        </tal:block>
54        <input type="hidden" name="viewLayer" value="search" />
55        <!-- query text -->
56        <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>
58        <ul>
59          <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
60            Exact</li>
61          <li><input type="radio" name="queryType" value="fulltextMorph"
62            tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
63          <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
64            Fulltext index</li>
65          <li><input type="radio" name="queryType" value="ftIndexMorph"
66            tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
67        </ul>
68      </form>
69    </div>
70    <!--"END SEARCH"-->
71  </metal:block>
72
73</body>
74
75</html>
Note: See TracBrowser for help on using the repository browser.