blob: be95990f79af34c481aa980212c837fb3a197103 [file] [log] [blame]
Akronfb6d87d2018-10-24 18:10:20 +02001% layout 'main', title => loc('searchtitle', q => stash('q'), ql => stash('ql')), schematype => 'SearchResultsPage';
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00002
Akronfb6d87d2018-10-24 18:10:20 +02003<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
4 <div id="pagination"><%= pagination(stash('start_page'), stash('total_pages'), url_with->query(['p' => '{page}'])) =%></div>
5% my $found = stash('total_results') // 0;
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);
Akronfb6d87d2018-10-24 18:10:20 +02009% if (stash('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) %>\
Akronfb6d87d2018-10-24 18:10:20 +020013%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
14% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
Akronb917a7c2015-07-02 11:02:42 +020015<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">
Akronfb6d87d2018-10-24 18:10:20 +020023% if (stash('results')->size && stash('total_results') != 0) {
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>
Akronfb6d87d2018-10-24 18:10:20 +020029% } elsif (stash('results')->size == 0) {
30<p class="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000031% }
Akron48b1e4d2015-06-17 18:47:01 +020032</div>