blob: b8df8d3709b12b5a54d8cfa29629939c0ab39e67 [file] [log] [blame]
Nils Diewald5d1ffb42014-05-21 17:45:34 +00001% layout 'default', title 'KorAP';
Nils Diewald5d1ffb42014-05-21 17:45:34 +00002
3
4%= search begin
5<div style="clear: both">
6<p class="found"><span class="pagination">
7% my $url = url_with->query(['p' => '{page}']);
8% my $pages = (stash('search.totalResults') / (stash('search.itemsPerPage') || 1));
9% $pages = $pages < 0 ? 0 : $pages;
Nils Diewald02df9912014-06-03 16:08:07 +000010</span>
11
12<div id="pagination">
13%= pagination(stash('search.startPage'), $pages, $url)
14</div>
15
16%#= l('Found <span id="total-results">[_1]</span> [quant,_1,match]')
17%#= l('in [_1])
Nils Diewalddd2d4e82014-05-31 17:08:33 +000018Found <span id="total-results"><%= commify(stash('search.totalResults')) %> matches</span>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000019% if (stash 'search.bm.hit') {
20 in <%= stash 'search.bm.hit' %> (<%= stash 'search.bm.result' %>)
21% }
22</p>
23</div>
24
Nils Diewald02df9912014-06-03 16:08:07 +000025%= include 'query'
Nils Diewald5d1ffb42014-05-21 17:45:34 +000026
27<ol class="left-aligned">
28%= search_hits begin
29 <li>
30%# ID, title, corpusID, author, pubDate, textClass
31<%== $_->{snippet} %>
32 </li>
33% end
34</ol>
35% end