4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
22 $this->
setId(
"licovw");
23 $this->
setTitle($this->lng->txt(
"licenses"));
25 $this->
addColumn($this->lng->txt(
"title"),
"title");
26 $this->
addColumn($this->lng->txt(
"comment"));
27 $this->
addColumn($this->lng->txt(
"existing_licenses"),
"existing");
28 $this->
addColumn($this->lng->txt(
"used_licenses"),
"used");
29 $this->
addColumn($this->lng->txt(
"remaining_licenses"),
"remaining");
30 $this->
addColumn($this->lng->txt(
"potential_accesses"),
"potential");
35 $this->
setRowTemplate(
"tpl.lic_show_licenses.html",
"Services/License");
37 $this->
getItems($a_mode, $a_parent_gui);
52 foreach($objects as $item)
54 $license =
new ilLicense($item[
"obj_id"]);
56 $remaining_licenses = ($license->getLicenses() ==
"0")
57 ? $this->lng->txt(
"arbitrary")
58 : $license->getRemainingLicenses();
61 "title" => $item[
"title"]
62 ,
"comment" => nl2br(trim($license->getRemarks()))
63 ,
"existing" => $license->getLicenses()
64 ,
"used" => $license->getAccesses()
65 ,
"remaining" => $remaining_licenses
66 ,
"potential" => $license->getPotentialAccesses()
79 $this->tpl->setVariable(
"TITLE", $a_set[
"listGUI"]);
80 $this->tpl->setVariable(
"REMARKS", $a_set[
"comment"]);
81 $this->tpl->setVariable(
"LICENSES", $a_set[
"existing"]);
82 $this->tpl->setVariable(
"USED_LICENSES", $a_set[
"used"]);
83 $this->tpl->setVariable(
"REMAINING_LICENSES", $a_set[
"remaining"]);
84 $this->tpl->setVariable(
"POTENTIAL_ACCESSES", $a_set[
"potential"]);
93 $item_list_gui->enableCommands(
true);
94 $item_list_gui->enableDelete(
false);
95 $item_list_gui->enableCut(
false);
96 $item_list_gui->enableCopy(
false);
97 $item_list_gui->enablePayment(
false);
98 $item_list_gui->enableLink(
false);
99 $item_list_gui->enableProperties(
false);
100 $item_list_gui->enableDescription(
false);
101 $item_list_gui->enablePreconditions(
false);
102 $item_list_gui->enableSubscribe(
false);
103 $item_list_gui->enableInfoScreen(
false);
105 return $item_list_gui->getListItemHTML($item[
"ref_id"],
106 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
114 global $objDefinition;
116 if (!is_object($this->item_list_guis[$a_type]))
118 $class = $objDefinition->getClassName($a_type);
119 $location = $objDefinition->getLocation($a_type);
120 $full_class =
"ilObj".$class.
"ListGUI";
121 include_once(
$location.
"/class.".$full_class.
".php");
122 $item_list_gui =
new $full_class();
123 $this->item_list_guis[$a_type] =& $item_list_gui;
127 $item_list_gui =& $this->item_list_guis[$a_type];
129 return $item_list_gui;