Akron | a17bc5b | 2018-10-05 13:35:01 +0200 | [diff] [blame] | 1 | % layout 'main', title => loc('searchtitle', q => search->query, ql => search->query_language), schematype => 'SearchResultsPage'; |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 2 | |
Akron | b917a7c | 2015-07-02 11:02:42 +0200 | [diff] [blame] | 3 | <div id="resultinfo" <% if (search->results->size) { %> class="found"<%} %>> |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 4 | <div id="pagination"><%= pagination(search->start_page, search->total_pages, url_with->query(['p' => '{page}'])) =%></div> |
Nils Diewald | 8f4b5da | 2014-12-03 22:13:39 +0000 | [diff] [blame] | 5 | % my $found = search->total_results; |
Akron | b917a7c | 2015-07-02 11:02:42 +0200 | [diff] [blame] | 6 | <p class="found">\ |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 7 | % if ($found != -1) { |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 8 | % my $found_text = loc('numf', number => $found); |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 9 | % if (search->time_exceeded) { |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 10 | % $found_text = '> ' . $found_text; |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 11 | % }; |
Akron | 179c8ac | 2015-06-30 19:30:50 +0200 | [diff] [blame] | 12 | <span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\ |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 13 | %# <% if (search->benchmark) { %> (~ <%= search->benchmark %>)<% } %> |
Akron | b917a7c | 2015-07-02 11:02:42 +0200 | [diff] [blame] | 14 | % } elsif (search->start_index == 0 && search->results->size == 0) { |
| 15 | <span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\ |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 16 | % }; |
Akron | 179c8ac | 2015-06-30 19:30:50 +0200 | [diff] [blame] | 17 | </p> |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 18 | </div> |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 19 | |
Akron | 27ae9ec | 2015-06-23 00:43:21 +0200 | [diff] [blame] | 20 | %= include 'query' |
Akron | 9cc3eaf | 2015-06-10 22:15:52 +0200 | [diff] [blame] | 21 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 22 | <div id="search"> |
Akron | 48b1e4d | 2015-06-17 18:47:01 +0200 | [diff] [blame] | 23 | % if (search->total_results != 0 && search->results->size) { |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 24 | <ol class="align-left"> |
| 25 | %= search_results begin |
| 26 | %= include 'match', match => $_ |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 27 | % end |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 28 | </ol> |
Akron | b917a7c | 2015-07-02 11:02:42 +0200 | [diff] [blame] | 29 | % } elsif (search->results->size == 0) { |
Akron | 37513a6 | 2015-11-17 01:07:11 +0100 | [diff] [blame] | 30 | <p id="no-results"><%= loc 'noMatches', q => search->query, ql => search->query_language %></p> |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 31 | % } |
Akron | 48b1e4d | 2015-06-17 18:47:01 +0200 | [diff] [blame] | 32 | </div> |