From: hickert Date: Wed, 22 Mar 2006 09:18:56 +0000 (+0000) Subject: Added check if fai is enabled. If not, hide release selection. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=55935456e375dab9a6d96d452f7cd888369764ac;p=gosa.git Added check if fai is enabled. If not, hide release selection. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2890 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 61a6fff0a..d97d4fa0e 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -36,7 +36,9 @@ class applicationManagement extends plugin var $Release = ""; var $Releases = array(); - var $enableCopyPaste = false; + var $enableCopyPaste = false; + var $enableReleaseManagement = false; + function applicationManagement ($config, $ui) { @@ -52,6 +54,12 @@ class applicationManagement extends plugin $this->CopyPasteHandler = new CopyPasteHandler($this->config); + /* Check if we should enable the release selection */ + $tmp = search_config($this->config->data,"faiManagement","CLASS"); + if(!empty($tmp)){ + $this->enableReleaseManagement = true; + } + /* Get global filter config */ if (!is_global("appfilter")){ $base= get_base_from_people($ui->dn); @@ -558,9 +566,13 @@ class applicationManagement extends plugin $smarty->assign("deplist", $this->config->idepartments); $smarty->assign("regex", $appfilter['regex']); - $smarty->assign("releases", $this->Releases ); - $smarty->assign("releaseKeys", array_flip($this->Releases)); - $smarty->assign("select_release",$this->Release); + if($this->enableReleaseManagement){ + $smarty->assign("releases", $this->Releases ); + $smarty->assign("releaseKeys", array_flip($this->Releases)); + $smarty->assign("select_release",$this->Release); + } + + $smarty->assign("enableReleaseManagement",$this->enableReleaseManagement); /* Extend if we are not using javascript */ $smarty->assign("apply", apply_filter()); diff --git a/plugins/admin/applications/headpage.tpl b/plugins/admin/applications/headpage.tpl index 7d9bb7f65..91ccb3c30 100644 --- a/plugins/admin/applications/headpage.tpl +++ b/plugins/admin/applications/headpage.tpl @@ -24,6 +24,7 @@ {t}This menu allows you to add, edit and remove selected applications. You may want to use the range selector on top of the application listbox, when working with a large number of applications.{/t}

+ {if $enableReleaseManagement == true}

[F]{t}Branches{/t}

@@ -40,6 +41,7 @@
+ {/if}

[F]{t}Filters{/t}