From a50dce0c2f7316a9e015f69ea60390e12c836022 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 3 Aug 2005 14:21:33 +0000 Subject: [PATCH] Goto to selected usertab when clicking on the specific picture in userlist git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1061 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/users/class_userManagement.inc | 42 +++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 98f434fce..644b8ea47 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -105,6 +105,12 @@ class userManagement extends plugin } $s_entry = preg_replace("/_.$/","",$s_entry); + if(preg_match("/.*-.*/",$s_entry)){ + $s_tab = preg_replace("/^.*-/i","",$s_entry); + $s_entry = preg_replace("/-.*$/i","",$s_entry); + }else{ + $s_tab = "user"; + }; /* Department changed? */ if(isset($_POST['depselect']) && $_POST['depselect']){ @@ -184,6 +190,7 @@ class userManagement extends plugin $acl= get_permissions ($this->dn, $this->ui->subtreeACL); /* Register usertab to trigger edit dialog */ + $_POST[$s_tab]=$s_tab; $this->usertab= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $this->dn); $this->usertab->set_acl($acl); @@ -669,13 +676,18 @@ class userManagement extends plugin } // Pictures for Extensions - $usrimg = "U"; - $posiximg = "P"; - $mailimg = "M"; - $fonimg = "T"; - $faximg = "F"; - $sambaimg = "S"; - +//$usrimg = "U"; + $usrimg =""; +//$posiximg = "P"; + $posiximg = ""; +//$mailimg = "M"; + $mailimg = ""; +//$fonimg = "T"; + $fonimg = ""; +//$faximg = "F"; + $faximg = ""; +//$sambaimg = "S"; + $sambaimg = ""; // Space $empty = ""; @@ -693,13 +705,15 @@ class userManagement extends plugin foreach($this->list as $key => $val){ // Specify Pics for Extensions - if(in_array("posixAccount" ,$val['objectClass'])) $posix = $posiximg; else $posix=$empty; - if(in_array("gosaMailAccount" ,$val['objectClass'])) $maila = $mailimg; else $maila=$empty; - if(in_array("goFonAccount" ,$val['objectClass'])) $fonac = $fonimg; else $fonac=$empty; - if(in_array("goFaxAccount" ,$val['objectClass'])) $faxac = $faximg; else $faxac=$empty; - if(in_array("sambaSamAccount" ,$val['objectClass'])) $samba = $sambaimg; else $samba=$empty; - if(in_array("gosaUserTemplate",$val['objectClass'])) $tpl = $tplimg; else $tpl=$userimg; - + if(in_array("posixAccount" ,$val['objectClass'])) $posix = preg_replace("/%KEY%/", "$key", $posiximg); else $posix=$empty; + if(in_array("gosaMailAccount" ,$val['objectClass'])) $maila = preg_replace("/%KEY%/", "$key", $mailimg); else $maila=$empty; + if(in_array("goFonAccount" ,$val['objectClass'])) $fonac = preg_replace("/%KEY%/", "$key", $fonimg); else $fonac=$empty; + if(in_array("goFaxAccount" ,$val['objectClass'])) $faxac = preg_replace("/%KEY%/", "$key", $faximg); else $faxac=$empty; + if(in_array("sambaSamAccount" ,$val['objectClass'])) $samba = preg_replace("/%KEY%/", "$key", $sambaimg); else $samba=$empty; + if(in_array("gosaUserTemplate",$val['objectClass'])) $tpl = preg_replace("/%KEY%/", "$key", $tplimg); else $tpl=$userimg; + + $usrimg = preg_replace("/%KEY%/", "$key", $usrimg); + // Generate Array to Add if (isset($val["sn"]) && isset($val["givenName"])){ $display= $val["sn"][0].", ".$val["givenName"][0]." [".$val["uid"][0]."]"; -- 2.30.2