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