blob: 47ec86a35a01fd86d30c87f2658e549196e81643 [file] [log] [blame]
Nils Diewald0ec142f2015-05-05 00:29:23 +00001% layout 'main', title => loc('searchtitle', q => search->query, ql => search->query_language);
Akron9cc3eaf2015-06-10 22:15:52 +02002% use Mojo::JSON 'encode_json';
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00003
4<div class="resultinfo">
Nils Diewalda898dac2015-05-06 21:04:16 +00005 <div id="pagination"><%= pagination(search->start_page, search->total_pages, url_with->query(['p' => '{page}'])) =%></div>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00006
Nils Diewald8f4b5da2014-12-03 22:13:39 +00007% my $found = search->total_results;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00008% if ($found != -1) {
Nils Diewalda898dac2015-05-06 21:04:16 +00009% my $found_text = loc('numf', number => $found);
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000010% if (search->time_exceeded) {
Nils Diewalda898dac2015-05-06 21:04:16 +000011% $found_text = '> ' . $found_text;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000012% };
13 <p class="found"><span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %></p>
Nils Diewalda898dac2015-05-06 21:04:16 +000014%# <% if (search->benchmark) { %> (~ <%= search->benchmark %>)<% } %>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000015% } else {
16 <p></p>
17% };
Nils Diewald5d1ffb42014-05-21 17:45:34 +000018</div>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000019
Akron9cc3eaf2015-06-10 22:15:52 +020020% if (search->collection_jsonld) {
21%= javascript begin
22KorAP.currentVC = <%== encode_json search->collection_jsonld %>;
23% end
24% };
25
26
Nils Diewald4af3f0b2014-06-25 01:43:17 +000027<div id="search">
Akron48b1e4d2015-06-17 18:47:01 +020028% if (search->total_results != 0 && search->results->size) {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000029 <ol class="align-left">
30%= search_results begin
31%= include 'match', match => $_
Nils Diewald4af3f0b2014-06-25 01:43:17 +000032% end
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000033 </ol>
Nils Diewalda898dac2015-05-06 21:04:16 +000034% } else {
35<p id="no-results"><%== loc 'noMatches', q => search->query %></p>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000036% }
Akron48b1e4d2015-06-17 18:47:01 +020037</div>
Nils Diewald845282c2015-05-14 07:53:03 +000038
39%= include 'query'