29 $this->lng = $DIC->language();
37 public function addEntry($a_txt, $a_href, $a_status = self::STATUS_NO_STATUS, $a_highlighted =
false, $a_info_texts =
array())
39 $this->items[] =
array(
42 "status" => $a_status,
43 "highlighted" => $a_highlighted,
44 "info" => $a_info_texts
55 $this->heading = $a_val;
65 return $this->heading;
75 include_once(
"./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
80 include_once(
"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
82 foreach ($this->items as
$i) {
83 $item_tpl =
new ilTemplate(
"tpl.checklist_item.html",
true,
true,
"Services/UIComponent/Checklist");
85 if (!is_array($i[
"info"]) && $i[
"info"] !=
"") {
86 $i[
"info"] =
array($i[
"info"]);
88 if (is_array($i[
"info"]) && count($i[
"info"]) > 0) {
89 foreach ($i[
"info"] as
$info) {
90 $item_tpl->setCurrentBlock(
"info");
91 $item_tpl->setVariable(
"INFO_MSG", $info);
92 $item_tpl->parseCurrentBlock();
96 $item_tpl->setVariable(
"TXT_STEP", $i[
"txt"]);
97 switch ($i[
"status"]) {
100 $item_tpl->setVariable(
"STATUS_ALT",
$lng->txt(
"uic_checklist_ok"));
103 case self::STATUS_NOT_OK:
105 $item_tpl->setVariable(
"STATUS_ALT",
$lng->txt(
"uic_checklist_not_ok"));
108 $list->addEntry($item_tpl->get(), $i[
"href"],
"",
"", $i[
"highlighted"] ?
"ilHighlighted" :
"");
110 $ch_tpl =
new ilTemplate(
"tpl.checklist.html",
true,
true,
"Services/UIComponent/Checklist");
111 $ch_tpl->setVariable(
"LIST",
$list->getHTML());
112 $panel->setBody($ch_tpl->get());
113 return $panel->getHTML();
setHeading($a_val)
Set heading.
if(isset($_REQUEST['delete'])) $list
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.
addEntry($a_txt, $a_href, $a_status=self::STATUS_NO_STATUS, $a_highlighted=false, $a_info_texts=array())
Add item.
static getInstance()
Get instance.
const PANEL_STYLE_SECONDARY
const HEADING_STYLE_BLOCK