Added a Extension Manager View like a submenu

This commit is contained in:
fermin831 2017-02-22 18:13:24 +01:00
parent e34b3ea1e4
commit 57291788e8
2 changed files with 17 additions and 11 deletions

View File

@ -277,12 +277,12 @@ foreach ($extensions as $file => $extension) {
//Avoid to delete or disabled update_manager
if ($file != "update_manager.php") {
if (!$extension['enabled']) {
$data[] = '<a title="' . __('Delete') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . html_print_image("images/cross.disabled.png", true) . '</a>' .
' <a title="' . __('Enable') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&enabled='.$file.'" class="mn">' . html_print_image("images/lightbulb_off.png", true) . '</a>';
$data[] = '<a title="' . __('Delete') . '" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . html_print_image("images/cross.disabled.png", true) . '</a>' .
' <a title="' . __('Enable') . '" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&enabled='.$file.'" class="mn">' . html_print_image("images/lightbulb_off.png", true) . '</a>';
}
else {
$data[] = '<a title="' . __('Delete') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . html_print_image("images/cross.png", true) . '</a>' .
' <a title="' . __('Disable') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&disabled='.$file.'" class="mn">' . html_print_image("images/lightbulb.png", true) . '</a>';
$data[] = '<a title="' . __('Delete') . '" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . html_print_image("images/cross.png", true) . '</a>' .
' <a title="' . __('Disable') . '" href="index.php?sec=godmode/extensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&disabled='.$file.'" class="mn">' . html_print_image("images/lightbulb.png", true) . '</a>';
}
}
else {

View File

@ -395,14 +395,20 @@ if (is_array ($config['extensions'])) {
}
}
// Complete the submenu
$extension_view = array();
$extension_view["godmode/extensions"]["id"] = 'Extension manager view';
$extension_view["godmode/extensions"]["text"] = __('Extension manager view');
$extension_submenu = array_merge($extension_view,$sub2);
if (!empty($sub2)) {
$sub["godmode/extensions"]["sub2"] = $sub2;
$sub["godmode/extensions"]["text"] = __('Extension manager');
$sub["godmode/extensions"]["id"] = 'Extension manager';
$submenu = array_merge($menu_godmode["gextensions"]["sub"],$sub);
$menu_godmode["gextensions"]["sub"] = $submenu;
}
$sub["godmode/extensions"]["sub2"] = $extension_submenu;
$sub["godmode/extensions"]["text"] = __('Extension manager');
$sub["godmode/extensions"]["id"] = 'Extension manager';
$sub["godmode/extensions"]["type"] = 'direct';
$sub["godmode/extensions"]["subtype"] = 'nolink';
$submenu = array_merge($menu_godmode["gextensions"]["sub"],$sub);
$menu_godmode["gextensions"]["sub"] = $submenu;
}
$menu_godmode["links"]["text"] = __('Links');