diff --git a/src/ManageList.php b/src/ManageList.php index c21e9ad..567ed06 100644 --- a/src/ManageList.php +++ b/src/ManageList.php @@ -31,10 +31,15 @@ use Dotclear\Helper\Html\Html; */ class ManageList extends adminGenericListV2 { - public function display(adminGenericFilterV2 $filter, string $enclose = '',): void + public function display(adminGenericFilterV2 $filter, string $enclose = ''): void { + if (is_null(dcCore::app()->auth) || is_null(dcCore::app()->blog)) { + return; + } + if ($this->rs->isEmpty()) { - echo '
' . ($filter->show() ?
+ echo ' ' . (
+ $filter->show() ?
__('No widgets matching the filter.') : __('No widget')
) . '' .
'
' . (new Checkbox(['widgets[]'], (bool) $this->rs->f('option_id')))->value($this->rs->f('periodical_id'))->disabled(!$this->rs->isEditable())->render() . ' ',
- 'name' => '' .
+ 'check' => ' ' . (new Checkbox(['widgets[]'], (bool) $this->rs->f('option_id')))->value($this->rs->f('option_id'))->disabled(!$this->rs->isEditable())->render() . ' ',
+ 'name' => '' .
Html::escapeHTML($this->rs->f('post_title')) . ' ',
- 'post_dt' => '' . Date::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->f('post_dt'), $tz ?? 'UTC') . ' ',
- 'option_title' => '' . $w_title . ' ',
- 'option_creadt' => '' . Date::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->f('option_upddt'), $tz ?? 'UTC') . ' ',
- 'user_id' => '' . $this->rs->f('user_id') . ' ',
- 'post_type' => '' . $this->rs->f('post_type') . ' ',
+ 'post_dt' => '' . Date::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->f('post_dt'), $tz) . ' ',
+ 'option_title' => '' . $w_title . ' ',
+ 'option_creadt' => '' . Date::dt2str(__('%Y-%m-%d %H:%M'), $this->rs->f('option_upddt'), $tz) . ' ',
+ 'user_id' => '' . $this->rs->f('user_id') . ' ',
+ 'post_type' => '' . $this->rs->f('post_type') . ' ',
]);
$this->userColumns(My::id(), $cols);
- $content .=
- '' .
+ $content .= ' ' .
implode(iterator_to_array($cols)) .
' ';
-
}
$content .= '