Last change
on this file since 1415 was
1415,
checked in by robert@…, 10 years ago
|
First version of advanced querying
|
File size:
1.4 KB
|
Line | |
---|
1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
4 | <meta name="layout" content="main"/> |
---|
5 | <title>Query database</title> |
---|
6 | <link rel="stylesheet" href="<g:resource dir="css" file="advancedQuery.css" />" type="text/css"/> |
---|
7 | <g:javascript src="advancedQuery.js" /> |
---|
8 | </head> |
---|
9 | <body> |
---|
10 | |
---|
11 | <h1>Query database</h1> |
---|
12 | |
---|
13 | <form id="input_criteria"> |
---|
14 | <h2>Add criterium</h2> |
---|
15 | <label for="field">Field</label> |
---|
16 | <select name="field"> |
---|
17 | <option value=""></option> |
---|
18 | <g:each in="${searchableFields}" var="entity"> |
---|
19 | <optgroup label="${entity.key}"> |
---|
20 | <g:each in="${entity.value}" var="field"> |
---|
21 | <option value="${entity.key}.${field}"> |
---|
22 | ${field[0].toUpperCase() + field[1..-1]} |
---|
23 | </option> |
---|
24 | </g:each> |
---|
25 | </optgroup> |
---|
26 | </g:each> |
---|
27 | </select> |
---|
28 | |
---|
29 | <label for="value">Value</label> |
---|
30 | <input class='text' type="text" name="value" /> |
---|
31 | |
---|
32 | <input class="button" type="button" onClick="addCriterium();" value="Add" /> |
---|
33 | </form> |
---|
34 | |
---|
35 | <div id="searchForm"> |
---|
36 | <g:form action="search" method="get"> |
---|
37 | <label for="entity">Search for</label><g:select from="${entitiesToSearchFor}" optionKey="key" optionValue="value" name="entity" /><br /> |
---|
38 | <label for="criteria">Criteria</label> |
---|
39 | <ul id="criteria"> |
---|
40 | <li class="emptyList">No criteria added. Use the form on the right to specify criteria to search on.</li> |
---|
41 | </ul> |
---|
42 | |
---|
43 | <input type="submit" value="Run query" class="submitcriteria" disabled="disabled" /> |
---|
44 | </g:form> |
---|
45 | </div> |
---|
46 | |
---|
47 | <br clear="all" /> |
---|
48 | </body> |
---|
49 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.