From 22309e0d434aaa14851dbb616938d5f68635bbc0 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 30 Apr 2010 05:41:46 +0000 Subject: [PATCH] Added row labeling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17978 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_listing.inc | 12 +++++++++++- .../plugins/admin/users/class_userManagement.inc | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index e05d5ca5a..d6f037db5 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -401,6 +401,16 @@ class listing { $entryIterator= new listingSortIterator($this->entries, $this->sortDirection[$this->sortColumn], "_sort".$this->sortColumn, $this->sortType); foreach ($entryIterator as $row => $entry){ + // Apply label to objecttype icon? + if (preg_match("//i", $entry['_rendered'], $matches)){ + if (preg_match("//i", $entry['_rendered'], $m)) { + $objectType= image($matches[1]."[".$m[1]."]", null, LDAP::fix(base64_decode($matches[2]))); + } else { + $objectType= image($matches[1], null, LDAP::fix(base64_decode($matches[2]))); + } + $entry['_rendered']= preg_replace("/]+>/", $objectType, $entry['_rendered']); + } + // Apply custom class to row? if (preg_match("//i", $entry['_rendered'], $matches)) { $result.="\n"; @@ -847,7 +857,7 @@ class listing { $objectType= $this->getObjectType($this->objectTypes, $classes); if ($objectType) { $this->objectDnMapping[$dn]= $objectType["objectClass"]; - $result= image($objectType["image"], null, LDAP::fix($dn)); + $result= ""; if (!isset($this->objectTypeCount[$objectType['label']])) { $this->objectTypeCount[$objectType['label']]= 0; } diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index cb12ae26b..217e391d3 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -738,7 +738,7 @@ class userManagement extends management $label= ""; if(isset($userPassword[0]) && preg_match("/^\{[^\}]/",$userPassword[0])){ if(preg_match("/^[^\}]*+\}!/",$userPassword[0])){ - $label= _("Unlock account").""; + $label= _("Unlock account").""; }else{ $label= _("Lock account"); } -- 2.30.2