source: documentViewer/zpt/layer_text_search.zpt @ 562:60f5a636bc57

Last change on this file since 562:60f5a636bc57 was 540:4b43a57ad9b3, checked in by casties, 12 years ago

more nicer

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"><input type="checkbox" class="autosubmit" name="viewLayer" value="search"
19          tal:attributes="checked python:'search' in viewLayers" /> Search results</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      <div class="result">
28        <h4>Search results</h4>
29        <div
30          tal:define="start pageinfo/resultStart; resultsize python:docinfo.get('resultSize',0); grpsize pageinfo/resultPageSize;
31                batch python:here.getBatch(start=start,size=grpsize,end=resultsize);">
32          <div class="ruler" tal:define="startParam string:resultStart">
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" />)
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    <!-- search options -->
47    <div class="options">
48      <h4>Search</h4>
49      <form tal:attributes="action viewerUrl">
50        <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})"
51          tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
52        <!-- make sure we have one viewLayer=search -->
53        <tal:block tal:repeat="vl viewLayers">
54          <input type="hidden" name="viewLayer" tal:attributes="value vl" tal:condition="python:vl != 'search'" />
55        </tal:block>
56        <input type="hidden" name="viewLayer" value="search" />
57        <!-- query text -->
58        <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
59          tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a>
60        <ul>
61          <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
62            Exact</li>
63          <li><input type="radio" name="queryType" value="fulltextMorph"
64            tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
65          <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
66            Fulltext index</li>
67          <li><input type="radio" name="queryType" value="ftIndexMorph"
68            tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
69        </ul>
70      </form>
71    </div>
72    <!-- end search options-->
73  </metal:block>
74
75</body>
76
77</html>
Note: See TracBrowser for help on using the repository browser.