summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8ac09c)
raw | patch | inline | side by side (parent: a8ac09c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Sep 2009 12:22:48 +0000 (12:22 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 22 Sep 2009 12:22:48 +0000 (12:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14309 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_divListLicenses.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_divListLicenses.inc
index 67657a641a39e8fe8af454595e65573f812ed9f7..02e70d91fb48dea99587eed6162e1698715d25b3 100644 (file)
// Assigning licenses
foreach($list as $key => $val){
-
+
// Get object permissions
$acl = $ui->get_permissions($val['dn'],"opsi/licenseGeneric");
$acl_all= $ui->has_complete_category_acls($val['dn'],"opsi");
// Create edit and remove icon buttons
- $actions.= "<input class='center' type='image'
+ $actions = "<input class='center' type='image'
src='images/lists/edit.png' alt='"._("edit")."'
name='license_edit_%KEY%' title='"._("Edit this entry")."'>";
if(preg_match("/d/",$acl)){
title='".msgPool::permDelete()."'>";
}
+
// Append license descriptio, if available
$title = "title='".preg_replace('/ /', ' ', LDAP::fix($val['dn']))."'";
if(!isset($val['description'][0])){
}else{
$desc = " - [ ".$val['description'][0]." ]";
}
+ $display = $val['cn'][0].$desc;
// Append the entry to the divlist
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."'
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc
index f835c0fdabaf3cba91b23e6e3d566398e5225c9a..bad066d425179c631b7bb0aeddc1337243b464be 100644 (file)
{
$data= array();
$res = $this->send_data("gosa_opsi_getLicensePools_listOfHashes",$this->target,$data,TRUE);
+
$items = array();
if(isset($res['XML'][0]['RESULT'][0]['HIT'])){
$items = $res['XML'][0]['RESULT'][0]['HIT'];
+ $data =array();
+ foreach($items as $item){
+ $entry = array();
+ foreach(
+ array(
+ "DESCRIPTION" => "description",
+ "LICENSEPOOLID" => "cn",
+ "PRODUCTIDS" => "productId",
+ "WINDOWSSOFTWAREIDS"=> "softwareId") as $source => $dest){
+
+ if(isset($item[$source])){
+ $entry[$dest] = array('count' => 0);
+ foreach($item[$source] as $obj){
+ $entry[$dest][] = $obj['VALUE'];
+ }
+ $entry[$dest]['count'] = (count($entry[$dest]) -1 );
+ }
+ }
+ $data[] =$entry;
+ }
+ return($data);
}
- return($items);
+ return(FALSE);
}
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenses.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenses.inc
index 9112b1e3fbc7c7b7e405ef4a512fb6ea90fecbf9..631b132e10e1c7d564b439e6cdcf7359e97ac6de 100644 (file)
$base = $this->DivListLicenses->selectedBase;
$Regex = $this->DivListLicenses->Regex;
- // Search and fetch all matching license objects.
+ $si = new opsiLicenceHandler($this->config);
+ $res = $si->listPools();
+
+ // Reset the list of licenses
$this->licenses = array();
+ foreach($res as $item){
+
+ // Fake an ldap entry, this enables ACL checks.
+ $item['dn'] = "opsi:cn=".$item['cn'][0].",".$this->config->current['BASE'];
+ $this->licenses[] = $item;
+ }
}
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/remove.tpl b/gosa-plugins/opsi/admin/opsiLicenses/remove.tpl
--- /dev/null
@@ -0,0 +1,18 @@
+<div style="font-size:18px;">
+ <img alt="" src="images/warning.png" align=top> {t}Warning{/t}
+</div>
+
+<p>
+ {$info}
+ {t}Please double check if you really want to do this since there is no way for GOsa to get your data back.{/t}
+</p>
+<p>
+ {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t}
+</p>
+
+<p class="plugbottom">
+ <input type=submit name="delete_multiple_roles_confirm" value="{msgPool type=delButton}">
+
+ <input type=submit name="delete_multiple_roles_cancel" value="{msgPool type=cancelButton}">
+</p>
+