| % layout 'default', title 'KorAP'; |
| |
| |
| %= search begin |
| <div style="clear: both"> |
| <p class="found"><span class="pagination"> |
| % my $url = url_with->query(['p' => '{page}']); |
| % my $pages = (stash('search.totalResults') / (stash('search.itemsPerPage') || 1)); |
| % $pages = $pages < 0 ? 0 : $pages; |
| </span> |
| |
| <div id="pagination"> |
| %= pagination(stash('search.startPage'), $pages, $url) |
| </div> |
| |
| %#= l('Found <span id="total-results">[_1]</span> [quant,_1,match]') |
| %#= l('in [_1]) |
| Found <span id="total-results"><%= commify(stash('search.totalResults')) %> matches</span> |
| % if (stash 'search.bm.hit') { |
| in <%= stash 'search.bm.hit' %> (<%= stash 'search.bm.result' %>) |
| % } |
| </p> |
| </div> |
| |
| %= include 'query' |
| |
| <ol class="left-aligned"> |
| %= search_hits begin |
| <li> |
| %# ID, title, corpusID, author, pubDate, textClass |
| <%== $_->{snippet} %> |
| </li> |
| % end |
| </ol> |
| % end |