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