diff --git a/bl-kernel/admin/controllers/sidebar.php b/bl-kernel/admin/controllers/sidebar.php new file mode 100644 index 00000000..0be2d23c --- /dev/null +++ b/bl-kernel/admin/controllers/sidebar.php @@ -0,0 +1,26 @@ +g('Sidebar'); \ No newline at end of file diff --git a/bl-kernel/admin/themes/koblog/html/sidebar.php b/bl-kernel/admin/themes/koblog/html/sidebar.php index 8217e80c..4a9fd844 100644 --- a/bl-kernel/admin/themes/koblog/html/sidebar.php +++ b/bl-kernel/admin/themes/koblog/html/sidebar.php @@ -29,6 +29,16 @@ p('Users') ?> + + + + @@ -38,9 +48,6 @@ - diff --git a/bl-kernel/admin/views/configure-plugin.php b/bl-kernel/admin/views/configure-plugin.php index fe792d2f..189f6001 100644 --- a/bl-kernel/admin/views/configure-plugin.php +++ b/bl-kernel/admin/views/configure-plugin.php @@ -2,12 +2,27 @@ 'jsform', 'class'=>'plugin-form')); ?> +type()) { + case 'theme': + $returnPage = "themes"; + break; + case 'widget': + $returnPage = "sidebar"; + break; + default: + break; + } +?> +
$plugin->name(), 'icon'=>'cog')); ?> formButtons()): ?>
- p('Cancel') ?> + p('Cancel') ?>
diff --git a/bl-kernel/admin/views/plugins-position.php b/bl-kernel/admin/views/plugins-position.php index af0b4382..67f0a311 100644 --- a/bl-kernel/admin/views/plugins-position.php +++ b/bl-kernel/admin/views/plugins-position.php @@ -3,10 +3,10 @@ 'jsform', 'class'=>'tab-content')); ?>
-$L->g('Plugins position'), 'icon'=>'tags')); ?> +$L->g('Reorder sidebar'), 'icon'=>'list')); ?>
- p('Cancel') ?> + p('Cancel') ?>
diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php index dcda0b28..ec8a6cb9 100644 --- a/bl-kernel/admin/views/plugins.php +++ b/bl-kernel/admin/views/plugins.php @@ -1,20 +1,8 @@ "; echo Bootstrap::pageTitle(array('title' => $L->g('Plugins'), 'icon' => 'puzzle-piece')); -echo "
"; - -echo Bootstrap::link(array( - 'title' => $L->g('Change the position of the plugins'), - 'href' => HTML_PATH_ADMIN_ROOT . 'plugins-position', - 'icon' => 'arrows', - 'class' => 'btn btn-outline-secondary' -)); - -echo "
"; - echo Bootstrap::formTitle(array('title' => $L->g('Search plugins'))); ?> @@ -49,7 +37,7 @@ echo ' // Show installed plugins foreach ($pluginsInstalled as $plugin) { - if ($plugin->type() == 'theme') { + if ($plugin->type() == 'theme' || $plugin->type() == 'widget') { // Do not display theme's plugins continue; } @@ -98,7 +86,7 @@ echo '
$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled); foreach ($pluginsNotInstalled as $plugin) { - if ($plugin->type() == 'theme') { + if ($plugin->type() == 'theme' || $plugin->type() == 'widget') { // Do not display theme's plugins continue; } diff --git a/bl-kernel/admin/views/sidebar.php b/bl-kernel/admin/views/sidebar.php new file mode 100644 index 00000000..b621ecba --- /dev/null +++ b/bl-kernel/admin/views/sidebar.php @@ -0,0 +1,138 @@ +"; + +echo Bootstrap::pageTitle(array('title' => $L->g('Sidebar'), 'icon' => 'list')); + +echo "
"; + +echo Bootstrap::link(array( + 'title' => $L->g('Reorder sidebar'), + 'href' => HTML_PATH_ADMIN_ROOT . 'plugins-position', + 'icon' => 'arrows', + 'class' => 'btn btn-outline-secondary' +)); + +echo "
"; + +?> + +

g("Activate or deactivate here plugins that'll be shown in the sidebar") ?>

+ + $L->g('Search plugins'))); + +?> + + + + +
'; +echo $L->g('Enabled plugins'); +echo '
+ +'; + +// Show installed plugins +foreach ($pluginsInstalled as $plugin) { + + if ($plugin->type() != 'widget') { + // Do not display theme's plugins + continue; + } + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; +} + +echo ' + +
+
' . $plugin->name() . '
+
'; + if (method_exists($plugin, 'form')) { + echo '' . $L->g('Settings') . ''; + } + echo '' . $L->g('Deactivate') . ''; + echo '
'; + echo '
'; + echo $plugin->description(); + echo ''; + echo '' . $plugin->version() . ''; + echo ' + ' . $plugin->author() . ' +
+ +'; + + +echo '
'; +echo $L->g('Disabled plugins'); +echo '
+ +'; + +// Plugins not installed +$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled); +foreach ($pluginsNotInstalled as $plugin) { + + if ($plugin->type() != 'widget') { + continue; + } + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; + + echo ''; +} + +echo ' + +
+
' . $plugin->name() . '
+ +
'; + echo $plugin->description(); + echo ''; + echo '' . $plugin->version() . ''; + echo ' + ' . $plugin->author() . ' +
+
+'; diff --git a/bl-languages/fr_FR.json b/bl-languages/fr_FR.json index 24023556..ecfd4850 100644 --- a/bl-languages/fr_FR.json +++ b/bl-languages/fr_FR.json @@ -60,6 +60,7 @@ "language": "Langue", "plugin": "Plugin", "plugins": "Plugins", + "activate-or-deactivate-here-plugins-that'll-be-shown-in-the-sidebar":"Activez ou désactiver ici les plugins qui seront visible dans la sidebar du site", "developers": "Développeurs", "themes": "Thèmes", "about": "À Propos", diff --git a/bl-plugins/about/metadata.json b/bl-plugins/about/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/about/metadata.json +++ b/bl-plugins/about/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/categories/metadata.json b/bl-plugins/categories/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/categories/metadata.json +++ b/bl-plugins/categories/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/hit-counter/metadata.json b/bl-plugins/hit-counter/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/hit-counter/metadata.json +++ b/bl-plugins/hit-counter/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/links/metadata.json b/bl-plugins/links/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/links/metadata.json +++ b/bl-plugins/links/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/navigation/metadata.json b/bl-plugins/navigation/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/navigation/metadata.json +++ b/bl-plugins/navigation/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/search/metadata.json b/bl-plugins/search/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/search/metadata.json +++ b/bl-plugins/search/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/static-pages/metadata.json b/bl-plugins/static-pages/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/static-pages/metadata.json +++ b/bl-plugins/static-pages/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" } diff --git a/bl-plugins/tags/metadata.json b/bl-plugins/tags/metadata.json index c4539610..891c2ded 100644 --- a/bl-plugins/tags/metadata.json +++ b/bl-plugins/tags/metadata.json @@ -6,5 +6,6 @@ "releaseDate": "2024-08-23", "license": "MIT", "compatible": "kb_0.0.1", - "notes": "" + "notes": "", + "type": "widget" }