Support timeExceeded in second frontend
diff --git a/templates/search.html.ep b/templates/search.html.ep
index abab210..077e93b 100644
--- a/templates/search.html.ep
+++ b/templates/search.html.ep
@@ -8,7 +8,13 @@
% $pages = $pages < 0 ? 0 : $pages;
<div id="pagination"><%= pagination(stash('search.startPage'), $pages, $url) =%></div>
<p class="found">Found
- <span id="total-results"><% if (stash('search.totalResults') == -1) { %>unknown<% } else { %><%= commify(stash('search.totalResults')) %><% } %> matches</span>
+% my $found = stash('search.totalResults');
+% if ($found == -1) {
+% $found = 'unknown amount of';
+% } elsif (stash('search.timeExceeded')) {
+% $found = 'more than ' . $found;
+% };
+ <span id="total-results"><%= $found %> matches</span>
<% if (stash 'search.benchmark') { %> in <%= stash 'search.benchmark' %><% } %>
</p>
</div>
@@ -16,7 +22,7 @@
%= include 'api-communication'
% };
-% unless (stash('search.totalResults') == 0) {
+% if (stash('search.totalResults') != 0 && scalar @{stash('search.hits')}) {
<div id="search">
<ol class="left-aligned">
%= search_hits begin