summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 011a4b6)
raw | patch | inline | side by side (parent: 011a4b6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Apr 2010 15:42:34 +0000 (15:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Apr 2010 15:42:34 +0000 (15:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17530 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsage.inc
index c7097fe147619ec2878a0be9e18350d9ca38f95b..83a283568cd3b9e7edca3d2e4bdf420fdad9797d 100644 (file)
// Extract pool name out of the fake dn.
$this->init();
+
+ // Prepare lists
+ $this->usageList = new sortableListing();
+ $this->usageList->setDeleteable(false);
+ $this->usageList->setEditable(false);
+ $this->usageList->setWidth("100%");
+ $this->usageList->setHeight("300px");
+ $this->usageList->setHeader(array(_("Host"),_("Key"),_("Pool"), _("License")));
+ $this->usageList->setDefaultSortColumn(1);
}
function execute()
{
plugin::execute();
+
+ $ui = get_userinfo();
+ $readable = $ui->get_permissions($this->config->current['BASE'], "opsi/licenseUsage","");
+ $this->usageList->setAcl($readable);
+
// Handle initialization failures.
if(isset($_POST['retry_init'])) $this->init();
if(!$this->init_successfull){
}
// Create usage list
- $list = new divSelectBox("licenseUsage");
- $ui = get_userinfo();
- $readable = $ui->get_permissions($this->config->current['BASE'], "opsi/licenseUsage","");
+ $data = array();
if($readable) {
foreach($this->licenseUses as $license){
- $f1 = array("string" => $license['hostId'][0]);
- $f2 = array("string" => $license['licenseKey'][0]);
- $f3 = array("string" => $license['licensePoolId'][0]);
- $f4 = array("string" => $license['softwareLicenseId'][0],
- "attach" => "style='border-right:0px;'");
- $list->addEntry(array($f1,$f2,$f3,$f4));
+ $data[] = array('data'=>array(
+ $license['hostId'][0],
+ $license['licenseKey'][0],
+ $license['licensePoolId'][0],
+ $license['softwareLicenseId'][0]));
}
}
-
+ $this->usageList->setListData($data,$data);
$smarty = get_smarty();
// Assign ACls
$smarty->assign($attr,$this->$attr);
}
- $smarty->assign("licenseUses", $list->DrawList());
+ $smarty->assign("licenseUses", $this->usageList->render());
$smarty->assign("init_successfull", $this->init_successfull);
$smarty->assign("initially_was_account", $this->initially_was_account);
return($smarty->fetch(get_template_path('licenseUsage.tpl',TRUE,dirname(__FILE__))));