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