From: cajus Date: Fri, 11 Jan 2008 16:14:15 +0000 (+0000) Subject: Added device type support X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f244b8db6c7ed2aaf2b332fbaaf9d2329780dc85;p=gosa.git Added device type support git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8316 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/devices/class_deviceGeneric.inc b/gosa-core/plugins/admin/devices/class_deviceGeneric.inc index 1415be066..bc870eb74 100644 --- a/gosa-core/plugins/admin/devices/class_deviceGeneric.inc +++ b/gosa-core/plugins/admin/devices/class_deviceGeneric.inc @@ -10,8 +10,10 @@ class deviceGeneric extends plugin public $dev_id = ""; public $serial = ""; public $base = ""; + public $types; + public $type; - public $posts = array("description","dev_id","serial","vendor"); + public $posts = array("description","dev_id","serial","vendor", "type"); public $attributes = array("cn"); public $objectclasses = array("top","gotoDevice"); @@ -23,6 +25,12 @@ class deviceGeneric extends plugin $this->is_account = TRUE; + $this->types= array("camera" => _("Digital camera"), + "harddisk" => _("Harddisk"), + "stick" => _("USB stick"), + "cd" => _("CD/DVD drive"),); + asort($this->types); + /* Set class values */ if(isset($this->attrs['gotoHotplugDevice'][0])){ $tmp = preg_split("/\|/",$this->attrs['gotoHotplugDevice'][0]); @@ -31,6 +39,9 @@ class deviceGeneric extends plugin $this->dev_id = $tmp[1]; $this->serial = $tmp[2]; $this->vendor = $tmp[3]; + if (isset($tmp[4])){ + $this->type= $tmp[4]; + } } $this->orig_cn = $this->cn; @@ -60,6 +71,10 @@ class deviceGeneric extends plugin foreach($this->posts as $attr){ $smarty->assign($attr,$this->$attr); } + + $smarty->assign("type",$this->type); + $smarty->assign ("types", $this->types); + return($smarty->fetch(get_template_path("deviceGeneric.tpl",TRUE,dirname(__FILE__)))); } diff --git a/gosa-core/plugins/admin/devices/deviceGeneric.tpl b/gosa-core/plugins/admin/devices/deviceGeneric.tpl index 59f7b9c18..863851e44 100644 --- a/gosa-core/plugins/admin/devices/deviceGeneric.tpl +++ b/gosa-core/plugins/admin/devices/deviceGeneric.tpl @@ -28,6 +28,15 @@ + + + + + + +