| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- if(!isset($pagination_object)) return;
- $page = $pagination_object->page;
- $page_count = $pagination_object->pageCount;
- $uri = $_SERVER["REQUEST_URI"];
- $parts = explode("?", $uri);
- $path = $parts[0];
- $query_string = $parts[1] ?? "";
- parse_str($query_string, $nvp);
- $previous_disabled = ($page <= 1) ? "disabled" : "";
- $next_disabled = ($page >= $page_count) ? "disabled" : "";
- $previous_url = $path . "?" . http_build_query(array_merge($nvp, ["page" => $page - 1]));
- $next_url = $path . "?" . http_build_query(array_merge($nvp, ["page" => $page + 1]));
- ?>
- <div class="row">
- <div class="col-sm align-self-center mb-3 mb-sm-0 text-center text-sm-left">
- <?=htmlspecialchars($pagination_object->rangeText)?>
- </div>
- <div class="col-sm-auto">
- <nav aria-label="Page navigation">
- <ul class="pagination mb-0 justify-content-center">
- <li class="page-item <?=$previous_disabled?>">
- <a class="page-link" href="<?=htmlspecialchars($previous_url)?>">
- <span aria-hidden="true">«</span>
- <span class="sr-only"><?=htmlspecialchars(_("Previous"))?></span>
- </a>
- </li>
- <li class="page-item">
- <a class="page-link" href="#" data-toggle="modal" data-target="#modal-page-jump">
- <?=sprintf(_("Page %s of %s"), number_format($page), number_format($page_count))?>
- </a>
- </li>
- <li class="page-item <?=$next_disabled?>">
- <a class="page-link" href="<?=htmlspecialchars($next_url)?>">
- <span aria-hidden="true">»</span>
- <span class="sr-only"><?=htmlspecialchars(_("Next"))?></span>
- </a>
- </li>
- </ul>
- </nav>
- </div>
- </div>
|