htmlPagination.phtml 918 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. /** @var FreshRSS_View $this */
  4. $url = $this->userQuery->sharedUrlHtml() . '&amp;nb=' . FreshRSS_Context::$number;
  5. $search = FreshRSS_Context::$search->toString();
  6. if ($search !== '') {
  7. $url .= '&amp;search=' . rawurlencode($search);
  8. }
  9. ?>
  10. <nav class="nav-pagination nav-list">
  11. <ul class="pagination">
  12. <?php if (FreshRSS_Context::$offset > 0): ?>
  13. <li class="item pager-first">
  14. <a href="<?= $url ?>">« <?= _t('conf.logs.pagination.first') ?></a>
  15. </li>
  16. <li class="item pager-previous">
  17. <a href="<?= $url . '&amp;offset=' . max(0, FreshRSS_Context::$offset - FreshRSS_Context::$number) ?>">‹ <?= _t('conf.logs.pagination.previous') ?></a>
  18. </li>
  19. <?php endif; ?>
  20. <li class="item pager-next">
  21. <a href="<?= $url . '&amp;offset=' . (FreshRSS_Context::$offset + FreshRSS_Context::$number) ?>"><?= _t('conf.logs.pagination.next') ?> ›</a>
  22. </li>
  23. </ul>
  24. </nav>