blob: 20353d0e1551cc07e8e21170da9db86eec51021f [file] [log] [blame]
% 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
% };
% if (search->total_results != 0 && search->results->size) {
<div id="search">
<ol class="align-left">
%= search_results begin
%= include 'match', match => $_
% end
</ol>
</div>
% } else {
<p id="no-results"><%== loc 'noMatches', q => search->query %></p>
% }
%= include 'query'