blob: 4673c0edf8d39d40a89c3a99fbc92edb863b1fad [file] [log] [blame]
Nils Diewald0ec142f2015-05-05 00:29:23 +00001% layout 'main', title => loc('searchtitle', q => search->query, ql => search->query_language);
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00002
Akron179c8ac2015-06-30 19:30:50 +02003<div id="resultinfo">
Nils Diewalda898dac2015-05-06 21:04:16 +00004 <div id="pagination"><%= pagination(search->start_page, search->total_pages, url_with->query(['p' => '{page}'])) =%></div>
Akron179c8ac2015-06-30 19:30:50 +02005 <p class="found">\
Nils Diewald8f4b5da2014-12-03 22:13:39 +00006% my $found = search->total_results;
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 %>)<% } %>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000014% };
Akron179c8ac2015-06-30 19:30:50 +020015</p>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000016</div>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000017
Akron27ae9ec2015-06-23 00:43:21 +020018%= include 'query'
Akron9cc3eaf2015-06-10 22:15:52 +020019
Nils Diewald4af3f0b2014-06-25 01:43:17 +000020<div id="search">
Akron48b1e4d2015-06-17 18:47:01 +020021% if (search->total_results != 0 && search->results->size) {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000022 <ol class="align-left">
23%= search_results begin
24%= include 'match', match => $_
Nils Diewald4af3f0b2014-06-25 01:43:17 +000025% end
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000026 </ol>
Nils Diewalda898dac2015-05-06 21:04:16 +000027% } else {
28<p id="no-results"><%== loc 'noMatches', q => search->query %></p>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000029% }
Akron48b1e4d2015-06-17 18:47:01 +020030</div>