<?php
$args = g('col') && g('sens') ? '.html?col=' . g('col') . '&sens=' . g('sens') : '';
$previousPage = Paginate::getPage() == 1 ? 1 : Paginate::getPage() - 1;
$nextPage = Paginate::getPage() == Paginate::NbPages() ? Paginate::NbPages() : Paginate::getPage() + 1;
if (Paginate::NbPages() > 1) {
    ?>
<div class="pagination pagination-centered">
    <ul class="paginate">
        <li <?php echo Paginate::getPage() == 1 ? 'class="disabled"' : ''; ?>>
            <?php echo href('«', '/' . Routage::controleur() . '/' . Routage::action() . '/' . $previousPage . $args, false, false, false, false); ?>
        </li>
        <?php
        for ($i = 1; $i <= Paginate::NbPages(); $i++) {
            ?>
            <li class="<?php echo Paginate::getPage() == $i ? 'active' : ''; ?>">
                <?php
                if (Paginate::getPage() != $i) {
                    echo href($i, '/' . Routage::controleur() . '/' . Routage::action() . '/' . $i . $args, false, false, false, false);
                } else {
                    ?><span><?php echo $i; ?></span><?php
                }
                ?>
            </li><?php
        } ?>
        <li <?php echo Paginate::getPage() == Paginate::NbPages() ? 'class="disabled"' : ''; ?>>
            <?php echo href('»', '/' . Routage::controleur() . '/' . Routage::action() . '/' . $nextPage . $args, false, false, false, false); ?>
        </li>
    </ul>
</div>
<?php } ?>