pagination.phtml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. $url_next = Minz_Request::currentRequest();
  3. $url_next['params']['next'] = FreshRSS_Context::$next_id;
  4. $url_next['params']['state'] = FreshRSS_Context::$state;
  5. $url_next['params']['ajax'] = 1;
  6. $url_mark_read = array(
  7. 'c' => 'entry',
  8. 'a' => 'read',
  9. 'params' => array(
  10. 'get' => FreshRSS_Context::currentGet(),
  11. 'nextGet' => FreshRSS_Context::$next_get,
  12. 'idMax' => FreshRSS_Context::$id_max,
  13. 'search' => htmlspecialchars_decode(FreshRSS_Context::$search, ENT_QUOTES),
  14. 'state' => FreshRSS_Context::$state,
  15. )
  16. );
  17. ?>
  18. <form id="mark-read-pagination" method="post">
  19. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  20. <ul class="pagination">
  21. <li class="item pager-next">
  22. <?php if (FreshRSS_Context::$next_id) { ?>
  23. <a id="load_more" href="<?= Minz_Url::display($url_next) ?>">
  24. <?= _t('gen.pagination.load_more') ?>
  25. </a>
  26. <?php } elseif ($url_mark_read) { ?>
  27. <button id="bigMarkAsRead"
  28. class="as-link <?= FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : '' ?>"
  29. form="mark-read-pagination"
  30. formaction="<?= Minz_Url::display($url_mark_read) ?>"
  31. type="submit">
  32. <?= _t('gen.pagination.nothing_to_load') ?><br />
  33. <span class="bigTick">✓</span><br />
  34. <?= _t('gen.pagination.mark_all_read') ?>
  35. </button>
  36. <?php } else { ?>
  37. <a id="bigMarkAsRead" href=".">
  38. <?= _t('gen.pagination.nothing_to_load') ?><br />
  39. </a>
  40. <?php } ?>
  41. </li>
  42. </ul>
  43. </form>