4 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
5 include_once(
"Services/Component/classes/class.ilComponent.php");
26 $this->
setId(
"cmpspl");
28 $this->
addColumn($lng->txt(
"cmps_plugin"),
"plugin_name");
29 $this->
addColumn($lng->txt(
"cmps_plugin_slot"),
"slot_name");
30 $this->
addColumn($lng->txt(
"cmps_component"),
"component_name");
31 $this->
addColumn($lng->txt(
"active"),
"plugin_active");
39 "Services/Component");
43 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
53 include_once(
"./Services/Component/classes/class.ilModule.php");
55 foreach ($modules as $m)
59 foreach ($plugin_slots as $ps)
61 include_once(
"./Services/Component/classes/class.ilPluginSlot.php");
63 foreach ($slot->getPluginsInformation() as $p)
69 include_once(
"./Services/Component/classes/class.ilService.php");
71 foreach ($services as $s)
75 foreach ($plugin_slots as $ps)
78 foreach ($slot->getPluginsInformation() as $p)
107 return array(
"slot_name" => $a_slot->
getSlotName(),
108 "component_type" => $a_type,
109 "component_name" => $a_slot_subdir,
111 "plugin_id" => $a_plugin[
"id"],
112 "plugin_name" => $a_plugin[
"name"],
113 "plugin_active" => $a_plugin[
"is_active"],
114 "activation_possible" => $a_plugin[
"activation_possible"],
115 "needs_update" => $a_plugin[
"needs_update"],
131 $ilCtrl->setParameter($this->parent_obj,
"ctype", $a_set[
"component_type"]);
132 $ilCtrl->setParameter($this->parent_obj,
"cname", $a_set[
"component_name"]);
133 $ilCtrl->setParameter($this->parent_obj,
"slot_id", $a_set[
"slot_id"]);
137 $ilCtrl->setParameter($this->parent_obj,
"plugin_id", $a_set[
"plugin_id"]);
138 $action[$lng->txt(
"info")] = $ilCtrl->getLinkTarget($this->parent_obj,
"showPlugin");
139 $ilCtrl->setParameter($this->parent_obj,
"plugin_id",
"");
141 $ilCtrl->setParameter($this->parent_obj,
"pname", $a_set[
"plugin_name"]);
143 if ($a_set[
"plugin_active"])
145 if ($a_set[
"has_lang"])
147 $action[$lng->txt(
"cmps_refresh")] =
148 $ilCtrl->getLinkTarget($this->parent_obj,
"refreshLanguages");
151 if ($a_set[
"has_conf"])
153 $action[$lng->txt(
"cmps_configure")] =
157 $action[$lng->txt(
"cmps_deactivate")] =
158 $ilCtrl->getLinkTarget($this->parent_obj,
"deactivatePlugin");
160 else if ($a_set[
"activation_possible"])
162 $action[$lng->txt(
"cmps_activate")] =
163 $ilCtrl->getLinkTarget($this->parent_obj,
"activatePlugin");
167 if ($a_set[
"needs_update"])
169 $action[$lng->txt(
"cmps_update")] =
170 $ilCtrl->getLinkTarget($this->parent_obj,
"updatePlugin");
173 $ilCtrl->setParameter($this->parent_obj,
"pname",
"");
178 $alist->setId($a_set[
"plugin_id"]);
179 $alist->setListTitle($lng->txt(
"actions"));
181 foreach($action as $caption =>
$cmd)
183 $alist->addItem($caption,
"",
$cmd);
186 $this->tpl->setVariable(
"ACTION_SELECTOR", $alist->getHTML());
189 $this->tpl->setVariable(
"TXT_SLOT_NAME", $a_set[
"slot_name"]);
190 $this->tpl->setVariable(
"TXT_COMP_NAME",
191 $a_set[
"component_type"].
"/".$a_set[
"component_name"]);
193 $act_str = ($a_set[
"plugin_active"])
194 ?
"<b>".$lng->txt(
"yes").
"</b>"
196 $this->tpl->setVariable(
"TXT_PLUGIN_NAME", $a_set[
"plugin_name"]);
197 $this->tpl->setVariable(
"TXT_ACTIVE", $act_str);