diff --git a/gosa-core/plugins/admin/departments/class_departmentGeneric.inc b/gosa-core/plugins/admin/departments/class_departmentGeneric.inc
index 62b3947afa36c125cbdbf6a937bd210935c13340..c8da2b281e438896435e5b869a3bd41f165ff4bc 100644 (file)
var $view_logged = FALSE;
var $type ="ou";
+ var $namingAttr = "ou";
/* Headpage attributes */
var $last_dep_sorting= "invalid";
$this->ui= get_userinfo();
$this->dn= $dn;
$this->orig_dn= $dn;
- $this->orig_ou= $this->ou;
+
+ /* Save current naming attribuet
+ */
+ $nA = $this->namingAttr;
+ $orig_nA = "orig_".$nA;
+ $this->$orig_nA = $this->$nA;
+
$this->config= $config;
/* Set base */
}
$smarty->assign("dep_type",$this->type);
- return($smarty->fetch (get_template_path('generic.tpl', TRUE)));
+
+ switch($this->type){
+ case 'c' : $tpl ="country.tpl";break;
+ case 'o' : $tpl ="organization.tpl";break;
+ case 'l' : $tpl ="locality.tpl";break;
+ case 'ou' : $tpl ="generic.tpl";break;
+ case 'alias' : $tpl ="alias.tpl";break;
+ case 'referal' : $tpl ="referal.tpl";break;
+ default : $tpl ="generic.tpl";
+ }
+
+ return($smarty->fetch (get_template_path($tpl, TRUE)));
}
function clear_fields()