2021-09-08 15:51:33 +00:00
|
|
|
<?php declare(strict_types=1);
|
2020-10-02 15:38:16 +00:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
use CodeIgniter\Pager\PagerRenderer;
|
2021-05-20 11:02:08 +00:00
|
|
|
|
2021-09-08 15:51:33 +00:00
|
|
|
/** @var PagerRenderer $pager */
|
2021-05-06 14:00:48 +00:00
|
|
|
$pager->setSurroundCount(2);
|
|
|
|
?>
|
2020-10-02 15:38:16 +00:00
|
|
|
|
|
|
|
<nav aria-label="<?= lang('Pager.pageNavigation') ?>">
|
|
|
|
<ul class="flex justify-center">
|
|
|
|
<?php if ($pager->hasPreviousPage()): ?>
|
|
|
|
<li>
|
|
|
|
<a href="<?= $pager->getFirst() ?>" aria-label="<?= lang(
|
2023-02-22 16:29:45 +00:00
|
|
|
'Pager.first',
|
|
|
|
) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
|
2020-10-02 15:38:16 +00:00
|
|
|
<span aria-hidden="true"><?= lang('Pager.first') ?></span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="<?= $pager->getPreviousPage() ?>" aria-label="<?= lang(
|
2023-02-22 16:29:45 +00:00
|
|
|
'Pager.previous',
|
|
|
|
) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
|
2020-10-02 15:38:16 +00:00
|
|
|
<span aria-hidden="true"><?= lang(
|
2023-02-22 16:29:45 +00:00
|
|
|
'Pager.previous',
|
|
|
|
) ?></span>
|
2020-10-02 15:38:16 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php foreach ($pager->links() as $link): ?>
|
|
|
|
<li>
|
|
|
|
<?php if ($link['active']): ?>
|
2021-11-05 14:36:34 +00:00
|
|
|
<span class="block px-4 py-2 font-semibold rounded-full text-accent-contrast bg-accent-base">
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $link['title'] ?>
|
|
|
|
</span>
|
|
|
|
<?php else: ?>
|
2023-02-22 16:29:45 +00:00
|
|
|
<a href="<?= $link['uri'] ?>" class="block px-4 py-2 rounded-full text-skin-muted hover:bg-highlight">
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $link['title'] ?>
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
<?php if ($pager->hasNextPage()): ?>
|
|
|
|
<li>
|
|
|
|
<a href="<?= $pager->getNextPage() ?>" aria-label="<?= lang(
|
2023-02-22 16:29:45 +00:00
|
|
|
'Pager.next',
|
|
|
|
) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
|
2020-10-02 15:38:16 +00:00
|
|
|
<span aria-hidden="true"><?= lang('Pager.next') ?></span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="<?= $pager->getLast() ?>" aria-label="<?= lang(
|
2023-02-22 16:29:45 +00:00
|
|
|
'Pager.last',
|
|
|
|
) ?>" class="block px-3 py-2 text-skin-muted hover:bg-highlight">
|
2020-10-02 15:38:16 +00:00
|
|
|
<span aria-hidden="true"><?= lang('Pager.last') ?></span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
|
|
|
</ul>
|
|
|
|
</nav>
|