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
|
echo
|
||||||
'<div class="fieldset">' .
|
'<div class="fieldset">' .
|
||||||
'<h4>' . Html::escapeHTML(My::name()) . '</h4>' .
|
'<h4>' . Html::escapeHTML(My::name()) . '</h4>' .
|
||||||
(new Para())->items([
|
(new Para())
|
||||||
(new Checkbox('dcLatestVersionsItems', (bool) dcCore::app()->auth->user_prefs->get('dashboard')->get('dcLatestVersionsItems')))->value(1),
|
->__call('items', [[
|
||||||
(new Label(__("Show Dotclear's latest versions on dashboards."), Label::OUTSIDE_LABEL_AFTER))->for('dcLatestVersionsItems')->class('classic'),
|
(new Checkbox('dcLatestVersionsItems', (bool) dcCore::app()->auth->user_prefs->get('dashboard')->get('dcLatestVersionsItems')))
|
||||||
])->render() .
|
->__call('value', [1]),
|
||||||
|
(new Label(__("Show Dotclear's latest versions on dashboards."), Label::OUTSIDE_LABEL_AFTER))
|
||||||
|
->__call('for', ['dcLatestVersionsItems'])
|
||||||
|
->__call('class', ['classic']),
|
||||||
|
]])
|
||||||
|
->render() .
|
||||||
'</div>';
|
'</div>';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Widgets
|
||||||
|
|
||||||
public static function parseWidget(WidgetsElement $w): string
|
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 '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class Widgets
|
||||||
$updater->getVersion(),
|
$updater->getVersion(),
|
||||||
$updater->getFileURL(),
|
$updater->getFileURL(),
|
||||||
],
|
],
|
||||||
$w->text
|
$w->__get('text')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,10 +103,10 @@ class Widgets
|
||||||
|
|
||||||
# Display
|
# Display
|
||||||
return $w->renderDiv(
|
return $w->renderDiv(
|
||||||
(bool) $w->content_only,
|
(bool) $w->__get('content_only'),
|
||||||
'dclatestversionswidget ' . $w->class,
|
'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