From a0116a7de3d863f3b697e763b9212e773fce16d5 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Jun 2006 12:03:13 +0000 Subject: [PATCH] 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 --- plugins/admin/systems/class_divListSystem.inc | 8 +------- .../admin/systems/class_systemManagement.inc | 18 ++++++++++++------ plugins/admin/users/class_divListUsers.inc | 8 +------- plugins/admin/users/class_userManagement.inc | 10 +++++++++- 4 files changed, 23 insertions(+), 21 deletions(-) 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 */ -- 2.30.2