remove magic
This commit is contained in:
parent
357d143121
commit
7f6b8947c4
2 changed files with 14 additions and 9 deletions
|
@ -113,10 +113,15 @@ class Backend extends dcNsProcess
|
|||
echo
|
||||
'<div class="fieldset">' .
|
||||
'<h4>' . Html::escapeHTML(My::name()) . '</h4>' .
|
||||
(new Para())->items([
|
||||
(new Checkbox('dcLatestVersionsItems', (bool) dcCore::app()->auth->user_prefs->get('dashboard')->get('dcLatestVersionsItems')))->value(1),
|
||||
(new Label(__("Show Dotclear's latest versions on dashboards."), Label::OUTSIDE_LABEL_AFTER))->for('dcLatestVersionsItems')->class('classic'),
|
||||
])->render() .
|
||||
(new Para())
|
||||
->__call('items', [[
|
||||
(new Checkbox('dcLatestVersionsItems', (bool) dcCore::app()->auth->user_prefs->get('dashboard')->get('dcLatestVersionsItems')))
|
||||
->__call('value', [1]),
|
||||
(new Label(__("Show Dotclear's latest versions on dashboards."), Label::OUTSIDE_LABEL_AFTER))
|
||||
->__call('for', ['dcLatestVersionsItems'])
|
||||
->__call('class', ['classic']),
|
||||
]])
|
||||
->render() .
|
||||
'</div>';
|
||||
},
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class Widgets
|
|||
|
||||
public static function parseWidget(WidgetsElement $w): string
|
||||
{
|
||||
if ($w->offline || !$w->checkHomeOnly(dcCore::app()->url->type) || $w->text == '') {
|
||||
if ($w->__get('offline') || !$w->checkHomeOnly(dcCore::app()->url->type) || $w->__get('text') == '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ class Widgets
|
|||
$updater->getVersion(),
|
||||
$updater->getFileURL(),
|
||||
],
|
||||
$w->text
|
||||
$w->__get('text')
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -103,10 +103,10 @@ class Widgets
|
|||
|
||||
# Display
|
||||
return $w->renderDiv(
|
||||
(bool) $w->content_only,
|
||||
'dclatestversionswidget ' . $w->class,
|
||||
(bool) $w->__get('content_only'),
|
||||
'dclatestversionswidget ' . $w->__get('class'),
|
||||
'',
|
||||
($w->title ? $w->renderTitle(Html::escapeHTML($w->title)) : '') . sprintf('<ul>%s</ul>', implode('', $li))
|
||||
($w->__get('title') ? $w->renderTitle(Html::escapeHTML($w->__get('title'))) : '') . sprintf('<ul>%s</ul>', implode('', $li))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue