From: hickert Date: Mon, 26 Jun 2006 12:03:13 +0000 (+0000) Subject: Added gray out for removed snap shot icon in div header X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a0116a7de3d863f3b697e763b9212e773fce16d5;p=gosa.git Added gray out for removed snap shot icon in div header git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3910 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index ef1d87d72..1f804349a 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -98,13 +98,7 @@ class divListSystem extends MultiSelectWindow title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ". "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= " ". " DivListSystem->selectedBase; - } - - if($str = $this->showSnapshotDialog($this->DivListSystem->selectedBase,$tmp)){ + $base = $this->DivListSystem->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -511,6 +507,16 @@ class systems extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + $tmp = array(); + foreach(array("phones","servers","printers","terminals","netdevices","workstations") as $ent){ + $tmp[] = "ou=".$ent.",ou=systems,".$this->DivListSystem->selectedBase; + } + return($tmp); + } + function remove_from_parent() { diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index d67c62bfb..af5b0af65 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -105,13 +105,7 @@ class divListUsers extends MultiSelectWindow "  ". "  "; - - if($this->parent->snapshotEnabled()){ - $listhead .= " ". - "  "; - } - + $listhead .= $this->get_snapshot_header($this->selectedBase); $listhead .= "  ". " showSnapshotDialog($this->DivListUsers->selectedBase,array(get_people_ou().$this->DivListUsers->selectedBase))){ + $base = $this->DivListUsers->selectedBase; + if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){ return($str); } @@ -656,6 +657,13 @@ class userManagement extends plugin } + /* Return departments, that will be included within snapshot detection */ + function get_used_snapshot_bases() + { + return(array(get_people_ou().$this->DivListUsers->selectedBase)); + } + + function reload() { /* Set base for all searches */