From 688eefcb4339490adabd5395988882afadcad651 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 31 Mar 2010 08:24:25 +0000 Subject: [PATCH] Updated application listing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17421 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/applications/application-filter.xml | 10 +----- .../class_applicationManagement.inc | 31 +++++-------------- .../goto/admin/applications/generic.tpl | 2 ++ .../admin/applications/tabs_application.inc | 4 +-- 4 files changed, 13 insertions(+), 34 deletions(-) diff --git a/gosa-plugins/goto/admin/applications/application-filter.xml b/gosa-plugins/goto/admin/applications/application-filter.xml index 899126a2f..0cfdd58d3 100644 --- a/gosa-plugins/goto/admin/applications/application-filter.xml +++ b/gosa-plugins/goto/admin/applications/application-filter.xml @@ -5,7 +5,7 @@ application true default - one + auto dn objectClass cn @@ -26,12 +26,4 @@ - - RELEASE - combobox - Loading. - Loading.. - Loading... - - diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index aec27779e..08605166e 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -58,7 +58,7 @@ class applicationManagement extends management } // Build filter - if (session::global_is_set(get_class($this)."_filter")){ + if (0 && session::global_is_set(get_class($this)."_filter")){ $filter= session::global_get(get_class($this)."_filter"); } else { $filter = new filter(get_template_path($filter_xml, true)); @@ -95,35 +95,20 @@ class applicationManagement extends management $filter = $this->getFilter(); $headpage = $this->getHeadpage(); - $this->releaseSelector->update(); - $this->app_release = $this->releaseSelector->getBase(); + // Display release selector + if($this->IsReleaseManagementActivated()){ + $this->releaseSelector->update(); + $this->app_release = $this->releaseSelector->getBase(); + $headpage->setBase($this->app_release); + $smarty->assign("RELEASE", $this->releaseSelector->render()); + } - $headpage->setBase($this->app_release); $headpage->update(); - $smarty->assign("RELEASE", $this->releaseSelector->render()); $display = $headpage->render(); return($this->getHeader().$display); } - function getReleaseList($base = "", $prefix ="") - { - $list = array(); - if(empty($base)){ - $base = get_ou('applicationRDN').$this->config->current['BASE']; - $list[$base] = "/"; - } - - $ldap = $this->config->get_ldap_link(); - $ldap->ls("(objectClass=FAIbranch)",$base,array("ou","FAIstate")); - while($release = $ldap->fetch()){ - $list[$release['dn']] = $prefix.$release['ou'][0]; - $list = array_merge($list,$this->getReleaseList($release['dn'],$prefix."  ")); - } - return($list); - } - - function IsReleaseManagementActivated() { /* Check if we should enable the release selection */ diff --git a/gosa-plugins/goto/admin/applications/generic.tpl b/gosa-plugins/goto/admin/applications/generic.tpl index f7778ad22..4baf39262 100644 --- a/gosa-plugins/goto/admin/applications/generic.tpl +++ b/gosa-plugins/goto/admin/applications/generic.tpl @@ -37,6 +37,7 @@ {/render} +{if !$isReleaseApplikation}
@@ -55,6 +56,7 @@ {/if} +{/if} diff --git a/gosa-plugins/goto/admin/applications/tabs_application.inc b/gosa-plugins/goto/admin/applications/tabs_application.inc index b9373aeaf..bf7a311f2 100644 --- a/gosa-plugins/goto/admin/applications/tabs_application.inc +++ b/gosa-plugins/goto/admin/applications/tabs_application.inc @@ -27,8 +27,8 @@ class apptabs extends tabs /* Check for new 'dn', in order to propagate the 'dn' to all plugins */ - if($this->parent->IsReleaseManagementActivated()){ - $new_dn= "cn=".$baseobject->cn.",".$this->parent->app_release; + if($baseobject->parent->parent->IsReleaseManagementActivated()){ + $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release; }else{ $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base; } -- 2.30.2