Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 1 | % layout 'default', title 'KorAP'; |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 2 | |
| 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 Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame^] | 10 | </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 Diewald | dd2d4e8 | 2014-05-31 17:08:33 +0000 | [diff] [blame] | 18 | Found <span id="total-results"><%= commify(stash('search.totalResults')) %> matches</span> |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 19 | % if (stash 'search.bm.hit') { |
| 20 | in <%= stash 'search.bm.hit' %> (<%= stash 'search.bm.result' %>) |
| 21 | % } |
| 22 | </p> |
| 23 | </div> |
| 24 | |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame^] | 25 | %= include 'query' |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 26 | |
| 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 |