]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.workbench.search/search/search.ftl
Add missing influxdb-client-core to target platform
[simantics/platform.git] / bundles / org.simantics.workbench.search / search / search.ftl
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   <meta charset="utf-8">
5   <title>Results for query ${query}</title>
6   <script type="text/javascript" src="${dataUrl}jquery.min.js"></script>
7   <script type="text/javascript" src="${dataUrl}jquery.tablesorter.min.js"></script>
8   <link rel="stylesheet" href="${dataUrl}search.css" type="text/css" media="screen, print" />
9   <link rel="stylesheet" href="${dataUrl}blue/style.css" type="text/css" media="screen, print" />
10 </head>
11
12 <body id="index" class="home">
13
14 <!-- Initialize search input with proper value -->
15 <script type="text/javascript">
16   function go( field ) {
17     window.navigate(window.location.href.replace(window.location.search, "?search=" + encodeURIComponent(field.value)));
18   }
19
20   function queryString( key ) {
21     var re = new RegExp( "[?&]" + key + "=([^&$]*)", "i" );
22     var offset = location.search.search( re );
23     if ( offset == -1 ) return null;
24     return RegExp.$1;
25   }
26
27   $(document).ready(function() {
28     $("#search").value = decodeURIComponent(queryString('search')); 
29     if (!("autofocus" in document.createElement("input"))) {
30       $("#search").focus();
31     }
32   });
33
34   //$(document).ready(function() { $("#results").tablesorter(); } );
35 </script>
36
37 <form>
38   <input autofocus size="70" id="search" type="text" name="search" value="${query}" onChange="go(this)" />
39 </form>
40
41 <span class="resultCountText">
42 <#if resultCount = maxResults>
43 ${resultCount} or more results found.
44 <#else>
45 <#if resultCount = 1>
46 ${resultCount} result found.
47 <#else>
48 ${resultCount} results found.
49 </#if>
50 </#if>
51 </span>
52
53 <ol>
54 <#list results as result>
55 <li><div class="result">
56 <a class="emph" href="resource:${result.resource.resource}" <#if result.resource.uri??>title="${result.resource.uri}"</#if>>${result.resource.name}</a>
57 <#if result.principalTypes??>
58 is an instance of
59 <#list result.principalTypes as type>
60 <a class="small" href="resource:${type.resource}" <#if type.uri??>title="${type.uri}"</#if>>${type.name}</a>
61 </#list>
62 and
63 </#if>
64 <#if result.parent??>
65 is a part of <a class="small" href="resource:${result.parent.resource}" <#if result.parent.uri??>title="${result.parent.uri}"</#if>>${result.parent.name}</a>
66 </#if>
67 </div></li>
68 </#list>
69 </ol>
70
71 </body>