24 require_once(
"Services/Table/classes/class.ilTableGUI.php");
50 $this->form_action = $a_form_action;
55 return $this->form_action;
65 $this->headertext = $a_headertext;
75 return $this->headertext;
86 $this->cancel_txt = $a_txt;
87 $this->cancel_cmd = $a_cmd;
98 $this->confirm_txt = $a_txt;
99 $this->confirm_cmd = $a_cmd;
110 public function addItem($a_post_var, $a_id, $a_text, $a_img =
"")
112 $this->item[] = array(
"var" => $a_post_var,
"id" => $a_id,
113 "text" => $a_text,
"img" => $a_img);
116 $this->use_images =
true;
128 $this->hidden_item[] = array(
"var" => $a_post_var,
"value" => $a_value);
140 $tpl =
new ilTemplate(
"tpl.confirmation.html",
true,
true,
"Services/Utilities");
143 $tpl->setCurrentBlock(
"cmd");
144 $tpl->setVariable(
"TXT_CMD", $this->confirm_txt);
145 $tpl->setVariable(
"CMD", $this->confirm_cmd);
146 $tpl->parseCurrentBlock();
147 $tpl->setCurrentBlock(
"cmd");
148 $tpl->setVariable(
"TXT_CMD", $this->cancel_txt);
149 $tpl->setVariable(
"CMD", $this->cancel_cmd);
150 $tpl->parseCurrentBlock();
153 foreach ($this->item as
$item)
155 if ($this->use_images)
157 if ($item[
"img"] !=
"")
159 $tpl->setCurrentBlock(
"img_cell");
160 $tpl->setVariable(
"IMG_ITEM", $item[
"img"]);
161 $tpl->parseCurrentBlock();
165 $tpl->touchBlock(
"blank_cell");
168 $tpl->setCurrentBlock(
"item_row");
170 $tpl->setVariable(
"TXT_ITEM", $item[
"text"]);
171 $tpl->setVariable(
"VAR_ITEM", $item[
"var"]);
172 $tpl->setVariable(
"ID", $item[
"id"]);
173 $tpl->parseCurrentBlock();
178 $tpl->setCurrentBlock(
"hidden_item_row");
179 $tpl->setVariable(
"VAR_HIDDEN_VAR", $hidden_item[
"var"]);
180 $tpl->setVariable(
"VAR_HIDDEN_VALUE", $hidden_item[
"value"]);
181 $tpl->parseCurrentBlock();
187 if ($this->use_images)
189 $tpl->setVariable(
"COL_SPAN", 2);
193 $tpl->setVariable(
"COL_SPAN", 1);
199 final protected function fillRowColor(&$a_tpl, $a_placeholder =
"CSS_ROW")
201 $this->css_row = ($this->css_row !=
"tblrow1")
204 $a_tpl->setVariable($a_placeholder, $this->css_row);