summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 504bd91)
raw | patch | inline | side by side (parent: 504bd91)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 3 Feb 2010 17:41:59 +0000 (17:41 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 3 Feb 2010 17:41:59 +0000 (17:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15582 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_baseSelector.inc | patch | blob | history | |
gosa-core/include/class_config.inc | patch | blob | history |
index 1d35ea4fba22616d1768b27c311c1dd0d58a6c39..4a41a8dc0db2596efd1a16bf04dd87ed74ae353d 100644 (file)
protected $pathMapping;
protected $lastState;
- // It would be better to get a dn -> [name, description, type] array
- // to avoid these tasks be done several times. Skipping for the moment.
- #'dc' => 'plugins/departments/images/domain.png',
- #'dc' => 'plugins/departments/images/dc.png',
- #'l' => 'plugins/departments/images/locality.png',
- #'c' => 'plugins/departments/images/country.png',
- #'o' => 'plugins/departments/images/organization.png',
- #'ou' => 'plugins/departments/images/folder.png',
function __construct($bases, $base= "")
{
}
$selected= $this->base == $base?" class='treeListSelected'":"";
$link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($base)."';$('submit_tree_base_".$this->pid."').click();\"";
- $this->tree.= "<li><a$selected $link>".str_replace('-', '‑', str_replace(' ', ' ', ldap::fix(preg_replace('/^[a-z0-9]+=([^,]+),.*$/i', '$1', $base))))."</a>";
+ $this->tree.= "<li><a$selected $link>".
+ "<img src='".$config->department_info[$base]['img']."'> ".
+ str_replace('-', '‑', str_replace(' ', ' ', $config->department_info[$base]['name'].
+ ($config->department_info[$base]['description']==''?'':' ['.$config->department_info[$base]['description'].']'))).
+ "</a>";
$last_indent= $indent;
$first= false;
index 52b22958330de79d5cc734492635314902891040..8a87aa3f97313889b5cb5f8b6d43938fc9807431 100644 (file)
var $idepartments= array();
var $adepartments= array();
var $tdepartments= array();
+ var $department_info= array();
var $filename = "";
var $last_modified = 0;
$types = departmentManagement::get_support_departments();
/* Create a list of attributes to fetch */
- $ldap_values = array("objectClass","gosaUnitTag");
+ $ldap_values = array("objectClass","gosaUnitTag", "description");
$filter = "";
foreach($types as $type){
$ldap_values[] = $type['ATTR'];
}
}
- /* Unknown department type -> skip
- */
+ /* Unknown department type -> skip */
if(!count($type_data)) continue;
$dn= $ldap->getDN();
$this->tdepartments[$dn]= "";
+ $this->department_info[$dn]= array("img" => $type_data['IMG'],
+ "description" => isset($attrs['description'][0])?$attrs['description'][0]:"",
+ "name" => $attrs[$type_data['ATTR']][0]);
/* Save administrative departments */
if (in_array_ics("gosaAdministrativeUnit", $attrs['objectClass']) &&