summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d7827c6)
raw | patch | inline | side by side (parent: d7827c6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Sep 2009 13:26:00 +0000 (13:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Sep 2009 13:26:00 +0000 (13:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14333 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc
index b7c2ce5f99e8c3ce68fecd5dedd2a574614d7152..c159e32e5d583bd3e62bd39aaf3794241c3c67da 100644 (file)
var $init_successfull = FALSE;
- function __construct(&$config,$dn,$a,$b)
+ function __construct(&$config,$dn)
{
$this->config = $config;
$this->dn = $this->orig_dn = $dn;
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc
index a6ba92f37c3bc22cfb72cff4f3f1a009cfa7bc0c..83054a7da0b44e6a81e9627ccfd380c905fab875 100644 (file)
// Create usage list
$list = new divSelectBox("licenseUsage");
+ $list->setHeight(150);
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;'");
+ $f4 = array("string" => $license['softwareLicenseId'][0]);
$list->addEntry(array($f1,$f2,$f3,$f4));
}
+ // Create reserved list
+ $list2 = new divSelectBox("reservedLicenses");
+ $list2->setHeight(150);
+ 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]);
+ $list2->addEntry(array($f1,$f2,$f3,$f4));
+ }
+
$smarty = get_smarty();
// Assign ACls
}
$smarty->assign("licenseUses", $list->DrawList());
+ $smarty->assign("licenseReserved", $list2->DrawList());
$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__))));
+ return($smarty->fetch(get_template_path('licenseUsageByHost.tpl',TRUE,dirname(__FILE__))));
}
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc
index 63e472935c823af1c62319ce93fae364097fee66..032ade87c257b49351a0c938d3190705ecfa011e 100644 (file)
$data= array();
$data['productId'] = htmlentities($productId);
$res = $this->send_data("gosa_opsi_getLicenseInformationForProduct",$this->target,$data,TRUE);
-
- if(isset($res['XML'][0]['ERROR_OPSI_GETLICENSEINFORMATIONFORPRODUCT'])){
-# $this->set_error($res['XML'][0]['ERROR_OPSI_GETLICENSEINFORMATIONFORPRODUCT']);
- return(FALSE);
- }
if(isset($res['XML'][0]['ANSWER_OPSI_UNASSIGNALLSOFTWARELICENSESFROMHOST'])){
return($res['XML'][0]);
}
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/licenseUsageByHost.tpl b/gosa-plugins/opsi/admin/opsiLicenses/licenseUsageByHost.tpl
index 443d2f4f4f55fb328a5d82c6cef095528bbfe7fa..8305a8184e29c32ee1812120d86d9e69032f5a3b 100644 (file)
{else}
<!-- GENERIC -->
-<h2>{t}License usage{/t}</h2>
-
+<h2>{t}Licenses used{/t}</h2>
{$licenseUses}
+<h2>{t}Licenses reserved for this host{/t}</h2>
+{$licenseReserved}
+
<input name='opsiLicenseUsagePosted' value='1' type='hidden'>
{/if}