From: hickert Date: Mon, 14 Nov 2005 10:19:10 +0000 (+0000) Subject: Added Categorie selection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c29bcb83068bca4b931781b6c87eb13d1495572a;p=gosa.git Added Categorie selection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1933 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index d71c87431..fae76ed95 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -17,6 +17,7 @@ class application extends plugin var $gosaApplicationCategory= ""; var $gotoLogonScript =""; var $iconData; + var $Categories; /* Headpage attributes */ var $last_sorting= "invalid"; @@ -31,6 +32,21 @@ class application extends plugin { plugin::plugin ($config, $dn); + $tmp = new xmlParse(); + + if(!isset($this->config->data['MAIN']['KDE_APPLICATIONS_MENU'])) { + print_red(_("There is no value specified for 'KDE_APPLICATIONS_MENU' in your gosa.conf.")); + $this->Categories= array(); + }else{ + $path = $this->config->data['MAIN']['KDE_APPLICATIONS_MENU']; + if(file_exists($path)){ + $tmp->parseMenu($path); + $this->Categories = $tmp->GetData(); + }else{ + print_red(sprintf(_("The specified file '%s' for 'KDE_APPLICATIONS_MENU' n your gosa.conf is not accessable."),$path)); + } + } + /* Load icon */ $ldap= $config->get_ldap_link(); if ($dn != 'new'){ @@ -95,6 +111,9 @@ class application extends plugin /* Call parent execute */ plugin::execute(); + $smarty= get_smarty(); + $smarty->assign("categories",array_flip($this->Categories)); + /* Do we represent a valid group? */ if (!$this->is_account && $this->parent == NULL){ $display= "\"\" ". diff --git a/plugins/admin/applications/generic.tpl b/plugins/admin/applications/generic.tpl index 92f8cbaa5..410075f9f 100644 --- a/plugins/admin/applications/generic.tpl +++ b/plugins/admin/applications/generic.tpl @@ -46,7 +46,9 @@ - +