summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd8ee85)
raw | patch | inline | side by side (parent: dd8ee85)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Nov 2007 13:57:19 +0000 (13:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Nov 2007 13:57:19 +0000 (13:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7790 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ObjectList.inc | patch | blob | history | |
include/class_ObjectListViewport.inc | patch | blob | history |
index 0c86a24b00fb5937555752edc84a6d5b66f35d8f..0a63c8aeacaf2a4ae9b23d65b76d993848ced582 100644 (file)
$tmp2 = array();
foreach($tmp as $key => $entry){
$entry['id']= $key;
+ $entry['_icon'] = "<img src='images/".$entry['_icon']."' alt=''>";
$tmp2[] = $entry;
}
index 355e3c0af5e5ebaffd9b3e67bfc58543bdc7d0c4..4bf3f5bc89ef52c94cd63fda5580df9f84bc26cb 100644 (file)
}
- /* FIXME: replace this -> not our task */
- private function getEntryIcon($entry,$alt = ""){
- return("<img src='images/".$entry['_icon']."' alt='".$alt."' class='center'>");
- }
-
-
/*! \brief Renders entries from the ObjectList iterator into a string
Gets the entry descriptions from the ObjectList object and renders them.
\return HTML rendered list entries
if (!isset($entry[$attribute])){
throw new ObjectListViewportException(sprintf(_("Can't locate attribute '%s' to replace in entry!"), $attribute));
} else {
-
- if(preg_match("/_icon/i",$attribute)){
- $buffer= preg_replace('/\{'.$attribute.'\}/', $this->getEntryIcon($entry),$buffer);
- }else{
- $buffer= preg_replace('/\{'.$attribute.'\}/', $entry[$attribute],$buffer);
- }
+ $buffer= preg_replace('/\{'.$attribute.'\}/', $entry[$attribute],$buffer);
}
}