From: hickert Date: Wed, 31 Mar 2010 08:06:47 +0000 (+0000) Subject: Updated application listing X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=74d87ea70cae78ab94aebf8f53c9bc7ee89c8a1f;p=gosa.git Updated application listing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17420 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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();
{$ROOT}{$BACK}{$HOME} {$RELOAD}{t}Base{/t} {$BASE}{t}Release{/t} {$RELEASE} {$ACTIONS} {$FILTER}