Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
25 / 25 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /* |
3 | * This file is part of Aplus Framework Pagination Library. |
4 | * |
5 | * (c) Natan Felles <natanfelles@gmail.com> |
6 | * |
7 | * For the full copyright and license information, please view the LICENSE |
8 | * file that was distributed with this source code. |
9 | */ |
10 | /** |
11 | * @var Framework\Pagination\Pager $pager |
12 | */ |
13 | $language = $pager->getLanguage(); |
14 | ?> |
15 | <div class="w3-center"> |
16 | <div class="w3-bar"> |
17 | <?php if ($pager->getCurrentPage() - $pager->getSurround() > 1) : ?> |
18 | <a class="w3-button" href="<?= $pager->getFirstPageUrl() ?>"><?= $pager->getLanguage() |
19 | ->render('pagination', 'first') ?></a> |
20 | <?php endif ?> |
21 | |
22 | <?php if ($pager->getPreviousPage()) : ?> |
23 | <a class="w3-button" rel="prev" href="<?= $pager->getPreviousPageUrl() ?>" title="<?= |
24 | $language->render('pagination', 'previous') ?>">«</a> |
25 | <?php endif ?> |
26 | |
27 | <?php foreach ($pager->getPreviousPagesUrls() as $p => $url) : ?> |
28 | <a href="<?= $url ?>" class="w3-button"><?= $p ?></a> |
29 | <?php endforeach ?> |
30 | |
31 | <a href="<?= $pager->getCurrentPageUrl() ?>" rel="canonical" class="w3-button w3-blue w3-hover-blue"> |
32 | <?= $pager->getCurrentPage() ?> |
33 | </a> |
34 | |
35 | <?php foreach ($pager->getNextPagesUrls() as $p => $url) : ?> |
36 | <a href="<?= $url ?>" class="w3-button"><?= $p ?></a> |
37 | <?php endforeach ?> |
38 | |
39 | <?php if ($pager->getNextPage() && $pager->getNextPage() < $pager->getLastPage() + 1) : ?> |
40 | <a class="w3-button" rel="next" href="<?= $pager->getNextPageUrl() ?>" title="<?= |
41 | $language->render('pagination', 'next') ?>">»</a> |
42 | <?php endif ?> |
43 | |
44 | <?php if ($pager->getLastPage() |
45 | && $pager->getCurrentPage() + $pager->getSurround() < $pager->getLastPage() |
46 | ) : ?> |
47 | <a class="w3-button" href="<?= $pager->getLastPageUrl() ?>"><?= $pager->getLanguage() |
48 | ->render('pagination', 'last') ?></a> |
49 | <?php endif ?> |
50 | </div> |
51 | </div> |