This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
lnapp/views/pagination/basic.php

29 lines
1.2 KiB
PHP

<nav>
<div class="text-center">
<ul class="pagination">
<li class="<?php echo $x=($page->first_page() !== FALSE) ? '' : 'disabled' ?>">
<a href="<?php echo $x ? '#' :HTML::chars($page->url($page->first_page())) ?>" rel="first"><?php echo __('First') ?></a>
</li>
<li class="<?php echo $x=($page->previous_page() !== FALSE) ? '' : 'disabled' ?>">
<a href="<?php echo $x ? '#' :HTML::chars($page->url($page->previous_page())) ?>" rel="prev"><?php echo __('Previous') ?></a>
</li>
<?php for ($i = 1; $i <= $page->total_pages(); $i++): ?>
<li class="<?php echo $x=($page->current_page() == $i) ? 'active disabled' : '' ?>">
<a href="<?php echo $x ? '#' : HTML::chars($page->url($i)) ?>"><?php echo $i ?></a>
</li>
<?php endfor ?>
<li class="<?php echo $x=($page->next_page() !== FALSE) ? '' : 'disabled' ?>">
<a href="<?php echo $x ? '#' : HTML::chars($page->url($page->next_page())) ?>" rel="next"><?php echo __('Next') ?></a>
</li>
<li class="<?php echo $x=($page->last_page() !== FALSE) ? '' : 'disabled' ?>">
<a href="<?php echo $x ? '#' : HTML::chars($page->url($page->last_page())) ?>" rel="last"><?php echo __('Last') ?></a>
</li>
</ul>
</div>
</nav>