blob: 907cc0389d2f36aeac1f58c428b24465eb1b6174 [file] [log] [blame]
Akron0e1ed242018-10-11 13:22:00 +02001% layout 'main', title => loc('searchtitle', q => stash('q'), ql => stash('ql')), schematype => 'SearchResultsPage';
Akron8ea84292018-10-24 13:41:52 +02002
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>
Akron7093b812018-10-19 17:28:21 +02005% my $found = stash('total_results') // 0;
Akron0e1ed242018-10-11 13:22:00 +02006 <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">
Akron7093b812018-10-19 17:28:21 +020023% if (stash('results')->size && stash('total_results') != 0) {
Akron0e1ed242018-10-11 13:22:00 +020024 <ol class="align-left">
Akron7093b812018-10-19 17:28:21 +020025%= search_results2 begin
Akron0e1ed242018-10-11 13:22:00 +020026%= include 'match', match => $_
27% end
28 </ol>
Akron32396632018-10-11 17:08:37 +020029% } elsif (stash('results')->size == 0) {
Akron8ea84292018-10-24 13:41:52 +020030<p class="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
Akron0e1ed242018-10-11 13:22:00 +020031% }
32</div>