summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67bfe47)
raw | patch | inline | side by side (parent: 67bfe47)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 May 2010 10:33:38 +0000 (10:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 May 2010 10:33:38 +0000 (10:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18034 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/addons/configViewer/class_configViewer.inc | patch | blob | history |
diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc
index b8d9f1042b06f7100d4ce6f74540aa859e17afe0..05ef6f50c79db0bbdd224687267307da580259bc 100644 (file)
var $plDescription= "Allows to modify configuration values";
var $configRegistry = NULL;
+ var $viewType = 'byClass';
+ var $viewTypes = array();
function __construct (&$config, $dn= NULL)
{
- $this->config = &$config;
- $this->configRegistry = &$config->configRegistry;
+ $this->config = &$config;
+ $this->configRegistry = &$config->configRegistry;
+ $this->viewTypes = array(
+ 'byClass' => _("By class name"),
+ 'byName' => _("By property name"),
+ 'byStatus'=> _("By status"),
+ 'byGroup' => _('By group'));
+
+
+ $this->propertyList = new sortableListing();
+ $this->propertyList->setDeleteable(false);
+ $this->propertyList->setEditable(false);
+ $this->propertyList->setWidth("100%");
+ $this->propertyList->setHeight("600px");
+ $this->propertyList->setHeader(array(_("Group"),_("Class"),_("Name"),_("Value"), _("Status")));
+ $this->propertyList->setDefaultSortColumn(0);
+ $this->propertyList->setAcl('rwcdm');
}
function execute()
{
$all = $this->configRegistry->getAllProperties();
- $str = "";
- foreach($all as $p){
- $str.="
- <tr>
- <td>{$p->getClass()}</td>
- <td>{$p->getName()}</td>
- <td>{$p->getDescription()}</td>
- <td><input type='text' value='{$p->getValue()}'></td>
- <td>{$p->getStatus()}</td>
- </tr>";
+ $data = $lData = array();
+ foreach($all as $id => $p){
+ $data[$id] = $p;
+ $lData[$id] = array('data' => array(
+ $p->getGroup(),
+ $p->getClass(),
+ $p->getName(),
+ $p->getValue(),
+ $p->getStatus()
+ ));
}
-
- return("<table cellspacing=0 cellpadding=0>{$str}</table>");
+ $this->propertyList->setListData($data,$lData);
+ $this->propertyList->update();
+ $smarty = get_smarty();
+ $smarty->assign('content', $this->propertyList->render());
+ return($smarty->fetch(get_template_path('generic.tpl', TRUE)));
}
}
?>