1 <?php
2 /*
3 * This code is part of GOsa (http://www.gosa-project.org)
4 * Copyright (C) 2003-2008 GONICUS GmbH
5 *
6 * ID: $$Id: class_deviceManagement.inc 14766 2009-11-05 14:30:35Z hickert $$
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
23 class deviceManagement extends management
24 {
25 var $plHeadline = "Hotplug devices";
26 var $plDescription = "Hotplug device management";
27 var $plIcon = "plugins/goto/images/devices.png";
29 var $app_release = ""; // The currently selected release while in release management mode!
31 // Tab definition
32 protected $tabClass = "devicetabs";
33 protected $tabType = "DEVICETABS";
34 protected $aclCategory = "devices";
35 protected $aclPlugin = "deviceGeneric";
36 protected $objectName = "device";
38 function __construct($config,$ui)
39 {
40 $this->config = $config;
41 $this->ui = $ui;
43 $filter_xml = "device-filter.xml";
44 $list_xml = "device-list.xml";
45 $this->storagePoints= array(get_ou("deviceRDN"));
47 // Build filter
48 if (session::global_is_set(get_class($this)."_filter")){
49 $filter= session::global_get(get_class($this)."_filter");
50 } else {
51 $filter = new filter(get_template_path($filter_xml, true));
52 $filter->setObjectStorage($this->storagePoints);
53 }
54 $this->setFilter($filter);
56 // Build headpage
57 $headpage = new listing(get_template_path($list_xml, true));
58 $headpage->setFilter($filter);
60 // Add copy&paste and snapshot handler.
61 if ($this->config->boolValueIsTrue("main", "copyPaste")){
62 $this->cpHandler = new CopyPasteHandler($this->config);
63 }
64 if($this->config->get_cfg_value("enableSnapshots") == "true"){
65 $this->snapHandler = new SnapshotHandler($this->config);
66 }
67 parent::__construct($config, $ui, "devices", $headpage);
68 }
69 }
70 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
71 ?>