From 749cf37fa85f94f8c5e14857fbd5c806e8fd5189 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 11 May 2019 20:32:46 +0200 Subject: [PATCH] filter by enabled and disabled plugin, and search function --- bl-kernel/admin/views/plugins.php | 93 ++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 20 deletions(-) diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php index 026b4431..1575a259 100644 --- a/bl-kernel/admin/views/plugins.php +++ b/bl-kernel/admin/views/plugins.php @@ -8,39 +8,92 @@ echo Bootstrap::link(array( 'icon'=>'elevator' )); +echo Bootstrap::formTitle(array('title'=>$L->g('Search plugins'))); + +?> + + + + +$L->g('Enabled plugins'))); + echo ' - - - - - - - - - +
'.$L->g('Name').''.$L->g('Description').''.$L->g('Version').''.$L->g('Author').'
'; -foreach ($plugins['all'] as $plugin) { - echo 'installed()?'class="bg-light"':'').'> +// Show installed plugins +foreach ($pluginsInstalled as $plugin) { + echo ''; - '; - echo ''; + + echo ''; + + echo ''; + + echo ''; +} + +echo ' + +
-
'.$plugin->name().'
+ echo '
+
'.$plugin->name().'
'; - - if ($plugin->installed()) { if (method_exists($plugin, 'form')) { echo ''.$L->g('Settings').''; } echo ''.$L->g('Deactivate').''; - } else { - echo ''.$L->g('Activate').''; - } - echo '
'; echo '
'; + echo ''; + echo $plugin->description(); + echo ''; + echo ''.$plugin->version().''; + echo ' + '.$plugin->author().' +
+'; + +echo Bootstrap::formTitle(array('title'=>$L->g('Disabled plugins'))); + +echo ' + + +'; + +// Plugins not installed +$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled); +foreach ($pluginsNotInstalled as $plugin) { + echo ''; + + echo ''; + + echo '';
+
'.$plugin->name().'
+ +
'; echo $plugin->description(); echo '