Skip to content

Commit d9d6113

Browse files
committed
Merge pull request #57 from jensopetersen/master
defaulting to kwic (concordance) hit-list
2 parents b17690c + 0821357 commit d9d6113

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

modules/search.xql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare variable $dq:CHARS_KWIC := 80;
2020
Templating function: process the query.
2121
:)
2222
declare
23-
%public %templates:default("field", "all") %templates:default("view", "summary")
23+
%public %templates:default("field", "all") %templates:default("view", "kwic")
2424
function dq:query($node as node()*, $model as map(*), $q as xs:string?, $field as xs:string, $view as xs:string) {
2525
if ($q) then
2626
let $hits := dq:do-query(collection($config:data-root), $q, $field)

resources/css/doc.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
width:20em;
1111
}
1212

13+
.form-group select {
14+
width:10em;
15+
}
16+
1317
table a {
1418
padding-left:3px;
1519
padding-right:3px;
@@ -20,7 +24,8 @@ span.score {
2024
}
2125

2226
div.headings, td.headings {
23-
background: #DCDCDC;
27+
background:#EBEBEB;
28+
font-size:110%;
2429
}
2530

2631
td.previous {

search.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
21
<div class="templates:surround?with=templates/page.html&amp;at=main">
32
<div class="row" id="container-body">
43
<div class="col-md-12" id="content">
54
<form name="f-query" action="search.html" method="GET" class="form-horizontal" role="form">
65
<div class="form-group">
7-
<label for="inputSearch" class="control-label col-sm-2">Search:</label>
6+
<label for="inputSearch" class="control-label col-sm-2">Search for</label>
87
<div class="col-sm-10">
98
<input id="inputSearch" name="q" type="text" class="form-control templates:form-control"/>
109
</div>
@@ -13,17 +12,17 @@
1312
<label for="field" class="control-label col-sm-2">in</label>
1413
<div class="col-sm-10">
1514
<select name="field" class="form-control templates:form-control">
16-
<option value="all">All</option>
15+
<option value="all" selected="selected">All</option>
1716
<option value="title">Headings Only</option>
1817
</select>
1918
</div>
2019
</div>
2120
<div class="form-group">
22-
<label for="view" class="control-label col-sm-2">View:</label>
21+
<label for="view" class="control-label col-sm-2">View</label>
2322
<div class="col-sm-10">
2423
<select name="view" class="form-control templates:form-control">
2524
<option value="summary">Summary</option>
26-
<option value="kwic">One Line</option>
25+
<option value="kwic" selected="selected">Concordance</option>
2726
</select>
2827
</div>
2928
</div>

0 commit comments

Comments
 (0)