diff --git a/config/config.php.example b/config/config.php.example index b7bcd27..017524b 100644 --- a/config/config.php.example +++ b/config/config.php.example @@ -173,6 +173,10 @@ $config->custom->commands['script'] = array( // $config->custom->appearance['tree_width'] = null; # $config->custom->appearance['tree_width'] = 250; +/* Number of tree command icons to show, 0 = show all icons on 1 row. */ +// $config->custom->appearance['tree_icons'] = 0; +# $config->custom->appearance['tree_icons'] = 4; + /* Confirm create and update operations, allowing you to review the changes and optionally skip attributes during the create/update operation. */ // $config->custom->confirm['create'] = true; diff --git a/lib/HTMLTree.php b/lib/HTMLTree.php index 2345011..e4068d7 100644 --- a/lib/HTMLTree.php +++ b/lib/HTMLTree.php @@ -184,10 +184,15 @@ class HTMLTree extends Tree { $links = ''; + $i = 0; + $icons = $_SESSION[APPCONFIG]->getValue('appearance','tree_icons'); if (is_array($_SESSION[APPCONFIG]->getValue('menu','session'))) foreach ($_SESSION[APPCONFIG]->getValue('menu','session') as $link => $title) { if ($this->get_menu_item($link)) $links .= sprintf('%s',$this->get_menu_item($link)); + + if ($icons && ++$i%$icons == 0) + $links .= ''; } # Finally add our logout link. diff --git a/lib/config_default.php b/lib/config_default.php index fb471ce..4cc10b1 100644 --- a/lib/config_default.php +++ b/lib/config_default.php @@ -261,6 +261,10 @@ class Config { 'desc'=>'LDAP search filter for the tree entries', 'default'=>'(objectClass=*)'); + $this->default->appearance['tree_icons'] = array( + 'desc'=>'Number of Tree Icons to display on a row', + 'default'=>0); + # PLA will not display the header and footer parts in minimal mode. $this->default->appearance['minimalMode'] = array( 'desc'=>'Minimal mode hides header and footer parts',