Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 1 | % layout 'main', title => loc('searchtitle', q => stash('q'), ql => stash('ql')), schematype => 'SearchResultsPage'; |
Akron | 3239663 | 2018-10-11 17:08:37 +0200 | [diff] [blame] | 2 | <div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>> |
Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 3 | <div id="pagination"><%= pagination(stash('start_page'), stash('total_pages'), url_with->query(['p' => '{page}'])) =%></div> |
Akron | 7093b81 | 2018-10-19 17:28:21 +0200 | [diff] [blame^] | 4 | % my $found = stash('total_results') // 0; |
Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 5 | <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') %>)<% } %> |
Akron | 3239663 | 2018-10-11 17:08:37 +0200 | [diff] [blame] | 13 | % } elsif (stash('start_index') == 0 && stash('results')->size == 0) { |
Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 14 | <span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\ |
| 15 | % }; |
| 16 | </p> |
| 17 | </div> |
| 18 | |
| 19 | %= include 'query2' |
| 20 | |
| 21 | <div id="search"> |
Akron | 7093b81 | 2018-10-19 17:28:21 +0200 | [diff] [blame^] | 22 | % if (stash('results')->size && stash('total_results') != 0) { |
Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 23 | <ol class="align-left"> |
Akron | 7093b81 | 2018-10-19 17:28:21 +0200 | [diff] [blame^] | 24 | %= search_results2 begin |
Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 25 | %= include 'match', match => $_ |
| 26 | % end |
| 27 | </ol> |
Akron | 3239663 | 2018-10-11 17:08:37 +0200 | [diff] [blame] | 28 | % } elsif (stash('results')->size == 0) { |
Akron | 0e1ed24 | 2018-10-11 13:22:00 +0200 | [diff] [blame] | 29 | <p id="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p> |
| 30 | % } |
| 31 | </div> |