-
Notifications
You must be signed in to change notification settings - Fork 3
/
search.jsp
31 lines (28 loc) · 1.08 KB
/
search.jsp
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
<%@include file="/libs/foundation/global.jsp"%>
<%@page session="false" %>
<script id="search-results--tmpl" type="text/x-handlebars-template">
<p>Found {{totalHits}} matches ({{executionTime}} seconds)</p>
{{#each hits}}
<div class="result-item">
<h4 class="result-item_title">{{title}}</h4>
<a class="result-item_url" href="{{url}}">{{url}}</a>
<p class="result-item_excertp">{{{excerpt}}}</p>
<hr/>
</div>
{{/each}}
{{#if hasPrev}}
<button class="search-results_prev">Previous</button>
{{/if}}
{{#if hasNext}}
<button class="search-results_next">Next</button>
{{/if}}
</script>
<div class="ajax-search">
<form data-url="${properties.endpoint}" data-page-size="${properties.pagesize}">
<label for="searchTerm">Search</label>
<input type="text" class="field" name="searchTerm" placeholder="">
<button type="submit" class="button">Submit</button>
</form>
<div class="ajax-search_results"></div>
</div>
<cq:includeClientLib categories="apps.ajaxsearch.comp"/>