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