% layout 'main', schematype => 'SearchResultsPage';
% my $numf = sub { return loc('numf', number => $_[0]) };

<div id="pagination"
     class="button-group button-panel"
     data-page="<%= stash('start_page') %>"
     data-total="<%= stash('total_pages') %>"
     data-count="<%= stash('items_per_page') %>"
     ><%= pagination(stash('start_page'), stash('total_pages'), url_with->query({'p' => '{page}'}), { num_format => $numf }) =%></div>

<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
% my $found = stash('total_results') // 0;
  <p class="found">\
% if ($found != -1) {
%   my $found_text = loc('numf', number => $found);
%   if (stash('time_exceeded')) {
%     $found_text = '> ' . $found_text;
%   };
<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
% };
</p>
</div>

%= include 'query'

<div id="search">
% if (stash('results')->size && stash('total_results') != 0) {
  <ol class="align-left">
%=  search_results begin
%=    include 'match', match => $_
%   end
  </ol>
% } elsif (stash('results')->size == 0) {
<p class="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
% }
%= content_for 'after_search_results'
</div>
