<?php
//validate parameters
if ( !isset($accessPageId) ) {
    echo "<b>Render paginator: missing parameter accessPageId to access pageId value</b>";
    return;
}
if ( !isset($accessPagesCount) ) {
    echo "<b>Render paginator: missing parameter accessPagesCount to access pagesCount value</b>";
    return;
}

if ( !isset($accessFind) ) {
    echo "<b>Render paginator: missing parameter accessFind to access find() function</b>";
    return;
}
?>
<div class="pagination-box pull-right">
    <ul class="pagination pagination-sm inline" ng-show="<?= $accessPagesCount ?> > 0" 
        ng-init="steps = [ - 5, - 4, - 3, - 2, - 1, 0, 1, 2, 3, 4, 5 ]">
        <li ng-repeat="step in steps" class="@{{step == 0 ? 'active' : ''}}"  
        ng-show="<?= $accessPageId ?> + step >= 0 && <?= $accessPageId ?> + step < <?= $accessPagesCount ?>">
            <a href="javascript:;" ng-click="<?= $accessPageId ?> = <?= $accessPageId ?> + step;
                <?= $accessFind ?>">{{<?= $accessPageId ?> + step + 1}}</a>
        </li>
    </ul>
</div>
