| % layout 'main', title => loc('searchtitle', q => search->query, ql => search->query_language); |
| % use Mojo::JSON 'encode_json'; |
| |
| <div class="resultinfo"> |
| <div id="pagination"><%= pagination(search->start_page, search->total_pages, url_with->query(['p' => '{page}'])) =%></div> |
| |
| % my $found = search->total_results; |
| % if ($found != -1) { |
| % my $found_text = loc('numf', number => $found); |
| % if (search->time_exceeded) { |
| % $found_text = '> ' . $found_text; |
| % }; |
| <p class="found"><span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %></p> |
| %# <% if (search->benchmark) { %> (~ <%= search->benchmark %>)<% } %> |
| % } else { |
| <p></p> |
| % }; |
| </div> |
| |
| % if (search->collection_jsonld) { |
| %= javascript begin |
| KorAP.currentVC = <%== encode_json search->collection_jsonld %>; |
| % end |
| % }; |
| |
| |
| <div id="search"> |
| % if (search->total_results != 0 && search->results->size) { |
| <ol class="align-left"> |
| %= search_results begin |
| %= include 'match', match => $_ |
| % end |
| </ol> |
| % } else { |
| <p id="no-results"><%== loc 'noMatches', q => search->query %></p> |
| % } |
| </div> |
| |
| %= include 'query' |