upgrade to dcPager

This commit is contained in:
Jean-Christian Denis 2021-10-21 23:21:32 +02:00
parent 3ef8a1d395
commit 91a601f235
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -316,11 +316,8 @@ if (isset($filters_id[$default_part])) {
'&part=' . $default_part . '&part=' . $default_part .
'#record'; '#record';
$pager = new pager($sorts->page, $counter->f(0), $sorts->nb, 10); $pager = new dcPager($sorts->page, $counter->f(0), $sorts->nb, 10);
$pager->html_prev = __('«prev.');
$pager->html_next = __('next»');
$pager->base_url = sprintf($pager_url, $sorts->sortby, $sorts->order, '%s'); $pager->base_url = sprintf($pager_url, $sorts->sortby, $sorts->order, '%s');
$pager->var_page = 'page';
} catch (Exception $e) { } catch (Exception $e) {
$core->error->add($e->getMessage()); $core->error->add($e->getMessage());
} }
@ -332,8 +329,10 @@ if (isset($filters_id[$default_part])) {
echo '<p>' . __('No record') . '</p>'; echo '<p>' . __('No record') . '</p>';
} else { } else {
echo ' echo '
<form action="' . sprintf($pager_url, $sorts->sortby, $sorts->order, $sorts->page) . '" method="post"> <form action="' . sprintf($pager_url, $sorts->sortby, $sorts->order, $sorts->page) . '" method="post">' .
<p>' . __('Page(s)') . ' : ' . $pager->getLinks() . '</p>
$pager->getLinks() . '
<div class="table-outer"> <div class="table-outer">
<table><caption class="hidden">' . __('Records') . '</caption> <table><caption class="hidden">' . __('Records') . '</caption>
<thead><tr>'; <thead><tr>';
@ -369,8 +368,9 @@ if (isset($filters_id[$default_part])) {
echo ' echo '
</tbody> </tbody>
</table></div> </table></div>
<p class="form-note">' . __('In order to remove a record, leave empty its key or value.') . '</p> <p class="form-note">' . __('In order to remove a record, leave empty its key or value.') . '</p>' .
<p>' . __('Page(s)') . ' : ' . $pager->getLinks() . '</p>
$pager->getLinks() . '
<div class="clear"> <div class="clear">
<p>' . <p>' .