blob: 200d69385ca1ec93cf390943572f8ab3c997a563 [file] [log] [blame]
Akron0e1ed242018-10-11 13:22:00 +02001% layout 'main', title => loc('searchtitle', q => stash('q'), ql => stash('ql')), schematype => 'SearchResultsPage';
2
Akron32396632018-10-11 17:08:37 +02003<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
Akron0e1ed242018-10-11 13:22:00 +02004 <div id="pagination"><%= pagination(stash('start_page'), stash('total_pages'), url_with->query(['p' => '{page}'])) =%></div>
5% my $found = stash('total_results');
6 <p class="found">\
7% if ($found != -1) {
8% my $found_text = loc('numf', number => $found);
9% if (stash('time_exceeded')) {
10% $found_text = '> ' . $found_text;
11% };
12<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
13%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
Akron32396632018-10-11 17:08:37 +020014% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
Akron0e1ed242018-10-11 13:22:00 +020015<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
16% };
17</p>
18</div>
19
20%= include 'query2'
21
22<div id="search">
Akron32396632018-10-11 17:08:37 +020023% if (stash('total_results') != 0 && stash('results')->size) {
Akron0e1ed242018-10-11 13:22:00 +020024 <ol class="align-left">
25%= search_results begin
26%= include 'match', match => $_
27% end
28 </ol>
Akron32396632018-10-11 17:08:37 +020029% } elsif (stash('results')->size == 0) {
Akron0e1ed242018-10-11 13:22:00 +020030<p id="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
31% }
32</div>