This commit is contained in:
Jean-Christian Denis 2023-05-13 22:44:35 +02:00
parent 5934b35b2f
commit 40218754cc
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -47,10 +47,13 @@ class BackendList extends adminGenericListV2
(new Text('p', $filter ? __('No log matches the filter') : __('No log')))
->class('info')
->render();
} else {
return;
}
$pager = new dcPager($page, $this->rs_count, $nb_per_page, 10);
$cols = [
$cols = new ArrayObject([
'date' => (new Text('th', __('Date')))
->class('first')
->extra('colspan="2"'),
@ -64,8 +67,7 @@ class BackendList extends adminGenericListV2
->extra('scope="col"'),
'ip' => (new Text('th', __('IP')))
->extra('scope="col"'),
];
$cols = new ArrayObject($cols);
]);
$this->userColumns(My::BACKEND_LIST_ID, $cols);
$lines = [];
@ -98,7 +100,6 @@ class BackendList extends adminGenericListV2
) .
$pager->getLinks();
}
}
/**
* Get a records line.
@ -107,7 +108,7 @@ class BackendList extends adminGenericListV2
*/
private function line(bool $checked): Component
{
$cols = [
$cols = new ArrayObject([
'check' => (new Para(null, 'td'))
->class('nowrap minimal')
->items([
@ -126,8 +127,7 @@ class BackendList extends adminGenericListV2
->class('nowrap minimal'),
'ip' => (new Text('td', Html::escapeHTML($this->rs->log_ip)))
->class('nowrap minimal'),
];
$cols = new ArrayObject($cols);
]);
$this->userColumns(My::BACKEND_LIST_ID, $cols);
return