From a57dd824c981f49ae7f9b4ffcb45bab4059192f3 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 30 Sep 2009 09:25:02 +0000 Subject: [PATCH] Updated license listing. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14400 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../opsiLicenses/class_licenseGeneric.inc | 3 +-- .../opsiLicenses/class_licensePoolGeneric.inc | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc index d37719ae8..27a10af21 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseGeneric.inc @@ -114,8 +114,7 @@ class licenseGeneric extends plugin $smarty->assign("licenseModels",array( "RETAIL" => _("Retail"), "OEM"=>_("OEM"), - "VOLUME" => _("Volume"), - "CONCURRENT" => _("Concurrent"))); + "VOLUME" => _("Volume"))); $smarty->assign("init_successfull", $this->init_successfull); diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc index 39c452a1d..a93e77bd5 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licensePoolGeneric.inc @@ -248,18 +248,28 @@ class licensePoolGeneric extends plugin if($this->acl_is_readable("licenses")){ foreach($this->licenses as $i => $license){ - $keys = implode($license['licenseKey'],", "); $link = ""; if(preg_match("/w/", $this->getacl("licenses"))){ $link.= ""; } $f1 = array("string" => $license['cn']); - $f2 = array("string" => $license['licenseModel']); - $f3 = array("string" => $license['expirationDate']); - $f4 = array("string" => $license['maximumInstallations']); - $f5 = array("string" => rtrim($keys,", ")); + + $maxInst = ""; + if($license['maximumInstallations'] == 0){ + $maxInst = "("._("unlimited").")"; + }else{ + $maxInst = "(".$license['maximumInstallations'].")";; + } + + $map = array( + "VOLUME" => sprintf(_("Volume license %s"), $maxInst), + "OEM"=>_("OEM"), + "RETAIL"=>_("retail"), + "CONCURRENT"=>_("concurrent")); + + $f2 = array("string" => $map[$license['licenseModel']]); $f6 = array("string" => $link, "attach" => "style='border-right: 0px; width:32px;'"); - $list->addEntry(array($f1,$f2,$f3,$f4,$f5,$f6)); + $list->addEntry(array($f1,$f2,$f6)); } } return($list->DrawList()); -- 2.30.2