blob: 21589ee2bdc0b6b7d005082fc1fa56971c89dfd2 [file] [log] [blame]
Akrona17bc5b2018-10-05 13:35:01 +02001% layout 'main', title => loc('searchtitle', q => search->query, ql => search->query_language), schematype => 'SearchResultsPage';
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00002
Akronb917a7c2015-07-02 11:02:42 +02003<div id="resultinfo" <% if (search->results->size) { %> class="found"<%} %>>
Nils Diewalda898dac2015-05-06 21:04:16 +00004 <div id="pagination"><%= pagination(search->start_page, search->total_pages, url_with->query(['p' => '{page}'])) =%></div>
Nils Diewald8f4b5da2014-12-03 22:13:39 +00005% my $found = search->total_results;
Akronb917a7c2015-07-02 11:02:42 +02006 <p class="found">\
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00007% if ($found != -1) {
Nils Diewalda898dac2015-05-06 21:04:16 +00008% my $found_text = loc('numf', number => $found);
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00009% if (search->time_exceeded) {
Nils Diewalda898dac2015-05-06 21:04:16 +000010% $found_text = '> ' . $found_text;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000011% };
Akron179c8ac2015-06-30 19:30:50 +020012<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
Nils Diewalda898dac2015-05-06 21:04:16 +000013%# <% if (search->benchmark) { %> (~ <%= search->benchmark %>)<% } %>
Akronb917a7c2015-07-02 11:02:42 +020014% } elsif (search->start_index == 0 && search->results->size == 0) {
15<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000016% };
Akron179c8ac2015-06-30 19:30:50 +020017</p>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000018</div>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000019
Akron27ae9ec2015-06-23 00:43:21 +020020%= include 'query'
Akron9cc3eaf2015-06-10 22:15:52 +020021
Nils Diewald4af3f0b2014-06-25 01:43:17 +000022<div id="search">
Akron48b1e4d2015-06-17 18:47:01 +020023% if (search->total_results != 0 && search->results->size) {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000024 <ol class="align-left">
25%= search_results begin
26%= include 'match', match => $_
Nils Diewald4af3f0b2014-06-25 01:43:17 +000027% end
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000028 </ol>
Akronb917a7c2015-07-02 11:02:42 +020029% } elsif (search->results->size == 0) {
Akron37513a62015-11-17 01:07:11 +010030<p id="no-results"><%= loc 'noMatches', q => search->query, ql => search->query_language %></p>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000031% }
Akron48b1e4d2015-06-17 18:47:01 +020032</div>