boolean_search.smarty
3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!-- NBM: FIX THE TEMPLATING SYSTEM -->
<script language="javascript" src="/thirdpartyjs/MochiKit/Base.js"> </script>
<script language="javascript" src="/thirdpartyjs/MochiKit/DateTime.js"> </script>
<script language="javascript" src="/thirdpartyjs/MochiKit/Iter.js"> </script>
<script language="javascript" src="/thirdpartyjs/MochiKit/DOM.js"> </script>
<script language="javascript" src="/thirdpartyjs/MochiKit/Async.js"> </script>
<script language="javascript" src="/presentation/lookAndFeel/knowledgeTree/js/taillog.js"> </script>
<script language="javascript" src="/presentation/lookAndFeel/knowledgeTree/js/constructed_search.js"> </script>
{literal}
<script type="text/javascript">
function testStartup() {
simpleLog('INFO','Log initialised.');
}
addLoadEvent(testStartup);
</script>
<style>
fieldset { border: 1px dotted #999; }
legend { border: 1px dotted #999;}
.helpText { color: #666; }
/* logging support */
#brad-log thead th { border-bottom: 1px solid black; }
#brad-log {font-size: smaller; }
#brad-log .severity-INFO { color: blue; font-weight: bold; }
#brad-log .severity-DEBUG { color: green; font-weight: bold; }
#brad-log .severity-ERROR { color: red; font-weight: bold; }
#brad-log .explanation { font-family: monospace; white-space: pre; }
</style>
{/literal}
<!-- this is bad, but we really don't need a roundtrip -->
<div style="display: none" id="search-criteria-container">
<select name="querytype">
{foreach item=oCriteria from=$aCriteria}
<option value="{$oCriteria->getID()}">{$oCriteria->headerDisplay()}</option>
{/foreach}
</select>
</div>
<h2>{$title|default:"Boolean Search"}</h2>
<form method="POST">
<input type="hidden" name="action" value="performSearch" />
{if $sNameTitle}
{$sNameTitle}: <input type="text" name="name" value="" /> <br />
{/if}
<p class="helpText">Return items which match <select
name="boolean_search[join]"><option value="AND">all</option><option value="OR">any</option></select> of the <strong>criteria groups</strong> specified.</p>
<fieldset>
<legend>Criteria Group</legend>
<p class="helpText">Return items which match <select name="boolean_search[subgroup][0][join]"><option value="AND">all</option><option value="OR">any</option></select> of the criteria specified.</p>
<table class="advanced-search-form">
<tbody>
<tr>
<th>Criteria</th>
<th>Values</th>
<th> </th>
</tr>
<tr>
<td><select name="querytype">
{foreach item=oCriteria from=$aCriteria}
<option value="{$oCriteria->getID()}">{$oCriteria->headerDisplay()}</option>
{/foreach}
</select>
</td>
<td><p class="helpText">first select a type of query</p></td>
<td><input type="button" value="Add" onclick="addNewCriteria(this);" /></td>
</tr>
</tbody>
</table>
</fieldset>
<input type="button" value="add another set of criteria" onclick="addBooleanGroup(this)"/>
<input type="submit" name="submit" value="{$searchButton|default:"Search"}" />
</form>
<!--
<table id="brad-log" width="100%">
<thead>
<tr>
<th width="10%">Severity</th>
<th width="10%">Time</th>
<th>Entry</th>
</tr>
</thead>
<tbody>
-->
</tbody>
</table>