blob: be4ced8582e92fc29093fb602d03e4f05fce64ee [file] [log] [blame]
Akron3c390c42020-03-30 09:06:21 +02001% layout 'main', schematype => 'SearchResultsPage';
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00002
Akronab7e9992021-08-04 10:58:51 +02003<div id="pagination" class="button-group button-panel"><%= pagination(stash('start_page'), stash('total_pages'), url_with->query({'p' => '{page}'})) =%></div>
Akron9bd140e2021-07-27 16:20:03 +02004
Akronfb6d87d2018-10-24 18:10:20 +02005<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
Akronfb6d87d2018-10-24 18:10:20 +02006% my $found = stash('total_results') // 0;
Akronb917a7c2015-07-02 11:02:42 +02007 <p class="found">\
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);
Akronfb6d87d2018-10-24 18:10:20 +020010% if (stash('time_exceeded')) {
Nils Diewalda898dac2015-05-06 21:04:16 +000011% $found_text = '> ' . $found_text;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000012% };
Akron179c8ac2015-06-30 19:30:50 +020013<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
Akronfb6d87d2018-10-24 18:10:20 +020014%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
15% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
Akronb917a7c2015-07-02 11:02:42 +020016<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000017% };
Akron179c8ac2015-06-30 19:30:50 +020018</p>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000019</div>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000020
Akron27ae9ec2015-06-23 00:43:21 +020021%= include 'query'
Akron9cc3eaf2015-06-10 22:15:52 +020022
Nils Diewald4af3f0b2014-06-25 01:43:17 +000023<div id="search">
Akronfb6d87d2018-10-24 18:10:20 +020024% if (stash('results')->size && stash('total_results') != 0) {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000025 <ol class="align-left">
26%= search_results begin
27%= include 'match', match => $_
Nils Diewald4af3f0b2014-06-25 01:43:17 +000028% end
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000029 </ol>
Akronfb6d87d2018-10-24 18:10:20 +020030% } elsif (stash('results')->size == 0) {
31<p class="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000032% }
Akron4cdc4fc2020-04-28 12:19:11 +020033%= content_for 'after_search_results'
Akron48b1e4d2015-06-17 18:47:01 +020034</div>