From 74d87ea70cae78ab94aebf8f53c9bc7ee89c8a1f Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 31 Mar 2010 08:06:47 +0000 Subject: [PATCH] Updated application listing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17420 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../application-filter-release.xml | 41 ++++++------------- .../applications/application-list-release.tpl | 5 +-- .../class_applicationManagement.inc | 25 +++++++---- 3 files changed, 31 insertions(+), 40 deletions(-) diff --git a/gosa-plugins/goto/admin/applications/application-filter-release.xml b/gosa-plugins/goto/admin/applications/application-filter-release.xml index 53591c8ef..35702f59a 100644 --- a/gosa-plugins/goto/admin/applications/application-filter-release.xml +++ b/gosa-plugins/goto/admin/applications/application-filter-release.xml @@ -3,46 +3,31 @@ application - true + + dn + objectClass + cn + description + + auto + default + + default + LDAP - (&(objectClass=gosaApplication)$NAME) - dn - objectClass - cn - description + (&(objectClass=gosaApplication)(|(cn=$)(description=$))) - auto - - - - RELEASE - combobox - Loading. - Loading.. - Loading... - - - - textfield - NAME - 20 - 60 - - - (|(cn=*$*)(description=*$*)) - true LDAP - (&(objectClass=gosaApplication)(|(cn=*$NAME*)(description=*$NAME*))) cn 0.5 3 - + diff --git a/gosa-plugins/goto/admin/applications/application-list-release.tpl b/gosa-plugins/goto/admin/applications/application-list-release.tpl index dcc71691a..e406e1d44 100644 --- a/gosa-plugins/goto/admin/applications/application-list-release.tpl +++ b/gosa-plugins/goto/admin/applications/application-list-release.tpl @@ -5,11 +5,8 @@
- - - - + diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc index 43ec0c5bb..aec27779e 100644 --- a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc +++ b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc @@ -27,6 +27,7 @@ class applicationManagement extends management var $plIcon = "plugins/goto/images/application.png"; var $app_release = ""; // The currently selected release while in release management mode! + var $app_base = ""; // The currently selected release while in release management mode! // Tab definition protected $tabClass = "apptabs"; @@ -35,16 +36,21 @@ class applicationManagement extends management protected $aclPlugin = "application"; protected $objectName = "application"; + var $releaseSelector = NULL; + function __construct($config,$ui) { $this->config = $config; $this->ui = $ui; + $this->app_base = get_ou('applicationRDN').$this->config->current['BASE']; + $this->app_release = get_ou('applicationRDN').$this->config->current['BASE']; if($this->IsReleaseManagementActivated()){ - $this->app_release = get_ou('applicationRDN').$this->config->current['BASE']; $filter_xml = "application-filter-release.xml"; $list_xml = "application-list-release.xml"; $this->storagePoints= array(""); + $releases = faiManagement::getReleaseStates($this->config,$this->app_base); + $this->releaseSelector = new releaseSelector($releases, $this->app_release, $this->app_release); }else{ $filter_xml = "application-filter.xml"; $list_xml = "application-list.xml"; @@ -79,24 +85,27 @@ class applicationManagement extends management $this->registerAction("edit_mailapplication","editEntry"); } + + /*! \brief Overridden render method of class mangement. + * this allows us to add a release selection box. + */ function renderList() { + $smarty = get_smarty(); $filter = $this->getFilter(); $headpage = $this->getHeadpage(); - if($this->IsReleaseManagementActivated()){ - $filter->setComboBoxOptions("RELEASE",$this->getReleaseList()); - if(isset($_POST['RELEASE'])){ - $this->app_release = get_post('RELEASE'); - } - $headpage->setBase($this->app_release); - } + $this->releaseSelector->update(); + $this->app_release = $this->releaseSelector->getBase(); + $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(); -- 2.30.2
{$ROOT}{$BACK}{$HOME} {$RELOAD}{t}Base{/t} {$BASE}{t}Release{/t} {$RELEASE} {$ACTIONS} {$FILTER}