blob: df52efd6c0fcf36cbf22b3240334529be225cba6 [file] [log] [blame]
Akron3c390c42020-03-30 09:06:21 +02001% layout 'main', schematype => 'SearchResultsPage';
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00002
Akron26d57f22021-09-10 16:48:57 +02003<div id="pagination"
4 class="button-group button-panel"
5 data-page="<%= stash('start_page') %>"
6 data-total="<%= stash('total_pages') %>"
7 data-count="<%= stash('items_per_page') %>"
8 ><%= pagination(stash('start_page'), stash('total_pages'), url_with->query({'p' => '{page}'})) =%></div>
Akron9bd140e2021-07-27 16:20:03 +02009
Akronfb6d87d2018-10-24 18:10:20 +020010<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
Akronfb6d87d2018-10-24 18:10:20 +020011% my $found = stash('total_results') // 0;
Akronb917a7c2015-07-02 11:02:42 +020012 <p class="found">\
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000013% if ($found != -1) {
Nils Diewalda898dac2015-05-06 21:04:16 +000014% my $found_text = loc('numf', number => $found);
Akronfb6d87d2018-10-24 18:10:20 +020015% if (stash('time_exceeded')) {
Nils Diewalda898dac2015-05-06 21:04:16 +000016% $found_text = '> ' . $found_text;
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000017% };
Akron179c8ac2015-06-30 19:30:50 +020018<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
Akronfb6d87d2018-10-24 18:10:20 +020019%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
20% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
Akronb917a7c2015-07-02 11:02:42 +020021<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000022% };
Akron179c8ac2015-06-30 19:30:50 +020023</p>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000024</div>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000025
Akron27ae9ec2015-06-23 00:43:21 +020026%= include 'query'
Akron9cc3eaf2015-06-10 22:15:52 +020027
Nils Diewald4af3f0b2014-06-25 01:43:17 +000028<div id="search">
Akronfb6d87d2018-10-24 18:10:20 +020029% if (stash('results')->size && stash('total_results') != 0) {
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000030 <ol class="align-left">
31%= search_results begin
32%= include 'match', match => $_
Nils Diewald4af3f0b2014-06-25 01:43:17 +000033% end
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000034 </ol>
Akronfb6d87d2018-10-24 18:10:20 +020035% } elsif (stash('results')->size == 0) {
36<p class="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000037% }
Akron4cdc4fc2020-04-28 12:19:11 +020038%= content_for 'after_search_results'
Akron48b1e4d2015-06-17 18:47:01 +020039</div>