From: hickert Date: Wed, 1 Jul 2009 13:24:47 +0000 (+0000) Subject: Added snap shot abilities to the new role plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=631b0d6f470a05c61591c92881f94fceddc2f563;p=gosa.git Added snap shot abilities to the new role plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13870 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc index d83524efe..18058ceaa 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc @@ -41,7 +41,12 @@ class divListRole extends MultiSelectWindow $this->parent = $parent; $this->ui = get_userinfo(); + + // Dynamic action col, depending on snapshot icons $action_col_size = 90; + if($this->parent->snapshotEnabled()){ + $action_col_size += 38; + } // Set list strings $this->SetTitle(_("List of roles")); @@ -127,6 +132,9 @@ class divListRole extends MultiSelectWindow $s.= "..|". " "._("Remove")."|"."remove_multiple_roles|\n"; + /* Add snapshot icons */ + $s .= $this->parent->get_snapshot_header($this->selectedBase,$this->module); + $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); } @@ -143,7 +151,11 @@ class divListRole extends MultiSelectWindow // Defining Links $editlink = "%s"; + // Dynamic action col, depending on snapshot icons $action_col_size = 90; + if($this->parent->snapshotEnabled()){ + $action_col_size += 38; + } $ui = get_userinfo(); diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc index 2bfe6d1df..dc914b0b5 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc @@ -190,7 +190,16 @@ class roleGeneric extends plugin { return($bases); } - + + function save_object() + { + plugin::save_object(); + if(isset($_POST['base'])){ + $this->base = get_post('base'); + } + } + + static function plInfo() { return (array( diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc index 0d03e8d48..1ea9cce88 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc @@ -233,6 +233,7 @@ class roleManagement extends plugin } } + /*************** * Dialog handling ***************/ @@ -261,7 +262,6 @@ class roleManagement extends plugin } if($this->dialog instanceOf tabs){ - $this->dialog->save_object(); $display= $this->dialog->execute(); if($this->dialog->read_only == TRUE){ @@ -291,6 +291,12 @@ class roleManagement extends plugin * List handling ***************/ + // Check if there is a snapshot dialog open + $base = $this->DivListRoles->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases(),$this)){ + return($str); + } + // Display dialog with group list $this->DivListRoles->parent = $this; $this->DivListRoles->execute();