cosmetic fix
parent
32c2d73daf
commit
275602c804
|
@ -22,7 +22,7 @@ use dcFavorites;
|
|||
use dcNsProcess;
|
||||
|
||||
/* clearbricks */
|
||||
use Clearbricks;
|
||||
use Dotclear\Helper\Clearbricks;
|
||||
use files;
|
||||
|
||||
/**
|
||||
|
@ -49,9 +49,9 @@ class Backend extends dcNsProcess
|
|||
|
||||
dcCore::app()->addBehavior('adminDashboardFavoritesV2', function (dcFavorites $favs): void {
|
||||
$favs->register(
|
||||
'improve',
|
||||
Core::id(),
|
||||
[
|
||||
'title' => __('improve'),
|
||||
'title' => Core::name(),
|
||||
'url' => dcCore::app()->adminurl->get('admin.plugin.' . Core::id()),
|
||||
'small-icon' => dcPage::getPF(Core::id() . '/icon.svg'),
|
||||
'large-icon' => dcPage::getPF(Core::id() . '/icon.svg'),
|
||||
|
@ -61,7 +61,7 @@ class Backend extends dcNsProcess
|
|||
});
|
||||
|
||||
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||
__('improve'),
|
||||
Core::name(),
|
||||
dcCore::app()->adminurl->get('admin.plugin.' . Core::id()),
|
||||
dcPage::getPF(Core::id() . '/icon.svg'),
|
||||
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.' . Core::id())) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||
|
|
|
@ -20,7 +20,15 @@ use dcPage;
|
|||
use dcNsProcess;
|
||||
|
||||
/* clearbricks */
|
||||
use form;
|
||||
use Dotclear\Helper\Html\Form\{
|
||||
Checkbox,
|
||||
Div,
|
||||
Fieldset,
|
||||
Label,
|
||||
Legend,
|
||||
Para,
|
||||
Text
|
||||
};
|
||||
|
||||
/* php */
|
||||
use Exception;
|
||||
|
@ -64,7 +72,7 @@ class Config extends dcNsProcess
|
|||
|
||||
dcCore::app()->adminurl->redirect(
|
||||
'admin.plugins',
|
||||
['module' => 'improve', 'conf' => 1, 'chk' => 1, 'redir' => dcCore::app()->admin->__get('list')->getRedir()]
|
||||
['module' => Core::id(), 'conf' => 1, 'chk' => 1, 'redir' => dcCore::app()->admin->__get('list')->getRedir()]
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
|
@ -80,26 +88,28 @@ class Config extends dcNsProcess
|
|||
}
|
||||
|
||||
$improve = new Core();
|
||||
$modules = $items = [];
|
||||
|
||||
$modules = [];
|
||||
foreach ($improve->modules() as $action) {
|
||||
$modules[$action->name()] = $action->id();
|
||||
}
|
||||
$modules = array_merge($modules, array_flip($improve->disabled()));
|
||||
|
||||
echo '<div class="fieldset"><h4>' . __('List of disabled actions:') . '</h4>';
|
||||
|
||||
foreach ($modules as $name => $id) {
|
||||
echo
|
||||
'<p><label class="classic" title="' . $id . '">' .
|
||||
form::checkbox(['disabled[]'], $id, ['checked' => array_key_exists($id, $improve->disabled())]) .
|
||||
__($name) . '</label></p>';
|
||||
foreach (array_merge($modules, array_flip($improve->disabled())) as $name => $id) {
|
||||
$items[] = (new Para())->items([
|
||||
(new Checkbox(['disabled_' . $id, 'disabled[]'], array_key_exists($id, $improve->disabled())))->value($id),
|
||||
(new Label($id))->class('classic')->for('disabled_' . $id),
|
||||
]);
|
||||
}
|
||||
|
||||
echo
|
||||
'</div><div class="fieldset"><h4>' . __('Options') . '</h4>' .
|
||||
'<p><label class="classic">' .
|
||||
form::checkbox('nodetails', '1', ['checked' => dcCore::app()->blog->settings->get(Core::id())->get('nodetails')]) .
|
||||
__('Hide details of rendered actions') . '</label></p>' .
|
||||
'</div>';
|
||||
(new Div())->items([
|
||||
(new Fieldset())->class('fieldset')->legend(new Legend(__('List of disabled actions')))->fields($items),
|
||||
(new Fieldset())->class('fieldset')->legend(new Legend(__('Options')))->fields([
|
||||
(new Para())->items([
|
||||
(new Checkbox('nodetails', dcCore::app()->blog->settings->get(Core::id())->get('nodetails')))->value('1'),
|
||||
(new Label(__('Hide details of rendered actions')))->class('classic')->for('nodetails'),
|
||||
]),
|
||||
]),
|
||||
])->render();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace Dotclear\Plugin\improve;
|
|||
*/
|
||||
class Utils
|
||||
{
|
||||
|
||||
public static function getActionsDir(): string
|
||||
{
|
||||
return __DIR__ . '/module/';
|
||||
|
|
|
@ -44,7 +44,7 @@ return [
|
|||
|
||||
['three-cols', 'three-cols', 'three-boxes', '2.6', ''],
|
||||
],
|
||||
'js' => [
|
||||
'js' => [
|
||||
['\sstoreLocalData', 'storeLocalData', 'dotclear.storeLocalData', '2.21', ''],
|
||||
['\sdropLocalData', 'dropLocalData', 'dotclear.dropLocalData', '2.21', ''],
|
||||
['\sreadLocalData', 'readLocalData', 'dotclear.readLocalData', '2.21', ''],
|
||||
|
|
|
@ -36,13 +36,7 @@ class newline extends Action
|
|||
'configurator' => true,
|
||||
'types' => ['plugin', 'theme'],
|
||||
]);
|
||||
/*
|
||||
$ext = @unserialize(dcCore::app()->blog->settings->improve->newline_extensions);
|
||||
$ext = Improve::cleanExtensions($ext);
|
||||
if (!empty($ext)) {
|
||||
$this->extensions = $ext;
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue