• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aplus-framework / pagination / 8127679472

16 Jan 2024 08:39PM UTC coverage: 100.0%. Remained the same
8127679472

push

github

natanfelles
Merge branch 'new' into development

589 of 589 relevant lines covered (100.0%)

6.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Views/bulma.php
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();
1✔
14
?>
15
<nav class="pagination is-centered">
1✔
16
    <ul class="pagination-list">
1✔
17
        <?php if ($pager->getCurrentPage() - $pager->getSurround() > 1) : ?>
1✔
18
            <li>
1✔
19
                <a class="pagination-link" href="<?= $pager->getFirstPageUrl() ?>"><?= $pager->getLanguage()
1✔
20
            ->render('pagination', 'first') ?></a>
1✔
21
            </li>
22
        <?php endif ?>
23

24
        <?php if ($pager->getPreviousPage()) : ?>
1✔
25
            <li>
1✔
26
                <a class="pagination-link" rel="prev" href="<?= $pager->getPreviousPageUrl(); ?>" title="<?=
1✔
27
                $language->render('pagination', 'previous') ?>">&laquo;</a>
1✔
28
            </li>
29
        <?php endif ?>
30

31
        <?php foreach ($pager->getPreviousPagesUrls() as $p => $url) : ?>
1✔
32
            <li>
1✔
33
                <a class="pagination-link" href="<?= $url ?>"><?= $p ?></a>
1✔
34
            </li>
35
        <?php endforeach ?>
36

37
        <li>
1✔
38
            <a class="pagination-link is-current" rel="canonical" href="<?= $pager->getCurrentPageUrl() ?>">
1✔
39
                <?= $pager->getCurrentPage() ?>
1✔
40
            </a>
1✔
41
        </li>
42

43
        <?php foreach ($pager->getNextPagesUrls() as $p => $url) : ?>
1✔
44
            <li>
1✔
45
                <a class="pagination-link" href="<?= $url ?>"><?= $p ?></a>
1✔
46
            </li>
47
        <?php endforeach ?>
48

49
        <?php if ($pager->getNextPage() && $pager->getNextPage() < $pager->getLastPage() + 1) : ?>
1✔
50
            <li>
1✔
51
                <a class="pagination-link" rel="next" href="<?= $pager->getNextPageUrl() ?>" title="<?=
1✔
52
                $language->render('pagination', 'next') ?>">&raquo;</a>
1✔
53
            </li>
54
        <?php endif ?>
55

56
        <?php if ($pager->getLastPage()
1✔
57
            && $pager->getCurrentPage() + $pager->getSurround() < $pager->getLastPage()
1✔
58
        ) : ?>
59
            <li>
1✔
60
                <a class="pagination-link" href="<?= $pager->getLastPageUrl() ?>"><?= $pager->getLanguage()
1✔
61
            ->render('pagination', 'last') ?></a>
1✔
62
            </li>
63
        <?php endif ?>
64
    </ul>
1✔
65
</nav>
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc