<div class="wo-admincp-feturepager">
    <div class="">
        <span>
          <?php echo "Showing ".$wo['page_id']." out of " . $wo['totalPages']; ?>
        </span>
    </div>
    <div class="">
        <nav>
            <ul class="pagination">
                <li>
                    <a href="{{LINK {{link}}?page-id=1}}"
                       data-ajax="{{ajax_link}}&page-id=1"
                       class="waves-effect" title='First Page'>
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M11 7l-5 5l5 5"></path><path d="M17 7l-5 5l5 5"></path></svg>
                    </a>
                </li>
                <?php if ($wo['page_id'] > 1) { ?>
                    <li>
                        <a href="{{LINK {{link}}?page-id=<?php echo(($wo['page_id'] - 1)) ?>}}"
                           data-ajax="{{ajax_link}}&page-id=<?php echo ($wo['page_id'] - 1); ?>"
                           class="waves-effect" title='Previous Page'>
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M15 6l-6 6l6 6"></path></svg>
                        </a>
                    </li>
                <?php } ?>

                <?php
                $nums = 0;
                $nums_pages = ($wo['page_id'] > 4) ? ($wo['page_id'] - 4) : $wo['page_id'];

                for ($i = $nums_pages; $i <= $wo['totalPages']; $i++) {
                    if ($nums < 20) {
                        ?>
                        <li class="<?php echo ($wo['page_id'] == $i) ? 'active' : ''; ?>">
                            <a href="{{LINK {{link}}?page-id=<?php echo($i) ?>}}"
                               data-ajax="{{ajax_link}}&page-id=<?php echo ($i); ?>"
                               class="waves-effect">
                                <?php echo $i ?>
                            </a>
                        </li>

                    <?php }
                    $nums++;
                } ?>

                <?php if ($wo['totalPages'] > $wo['page_id']) { ?>
                    <li>
                        <a href="{{LINK {{link}}?page-id=<?php echo(($wo['page_id'] + 1)) ?>}}"
                           data-ajax="{{ajax_link}}&page-id=<?php echo ($wo['page_id'] + 1); ?>"
                           class="waves-effect" title="Next Page">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M9 6l6 6l-6 6"></path></svg>
                        </a>
                    </li>
                <?php } ?>
                <li>
                    <a href="{{LINK {{link}}?page-id=<?php echo($wo['totalPages']) ?>}}"
                       data-ajax="{{ajax_link}}&page-id=<?php echo($wo['totalPages']) ?>"
                       class="waves-effect" title='Last Page'>
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M7 7l5 5l-5 5"></path><path d="M13 7l5 5l-5 5"></path></svg>
                    </a>
                </li>
            </ul>
        </nav>
    </div>
</div>