4 include_once
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php';
26 public function __construct($a_target,$a_server_id, $a_mid, $a_tree_id)
37 $this->filter = array();
40 $this->server_id = $a_server_id;
42 $this->tree_id = $a_tree_id;
60 public function isClickable($a_type, $a_ref_id, $a_obj_id = 0)
71 $this->form_items[
$type] =
true;
76 $this->form_items[
$type] =
false;
81 $this->checked_items = $a_checked_items;
86 return in_array($a_id, $this->checked_items) ?
true :
false;
91 $this->post_var = $a_post_var;
100 if(!array_key_exists($a_type, $this->form_items) || !$this->form_items[$a_type])
105 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
119 case self::SEL_TYPE_CHECK:
123 case self::SEL_TYPE_RADIO:
133 if (!isset($a_node_id) or !is_array($a_option))
135 $this->ilias->raiseError(get_class($this).
"::formatObject(): Missing parameter or wrong datatype! ".
136 "node_id: ".$a_node_id.
" options:".var_dump($a_option),$this->ilias->error_obj->WARNING);
140 foreach ($a_option[
"tab"] as $picture)
142 if ($picture ==
'plus')
144 $tpl->setCurrentBlock(
"exp_desc");
145 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"expand"));
146 $tpl->parseCurrentBlock();
148 $tpl->setCurrentBlock(
"expander");
149 $tpl->setVariable(
"LINK_NAME", $a_node_id);
150 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
151 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
152 $tpl->parseCurrentBlock();
156 if ($picture ==
'minus' && $this->show_minus)
158 $tpl->setCurrentBlock(
"exp_desc");
159 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"collapse"));
160 $tpl->parseCurrentBlock();
162 $tpl->setCurrentBlock(
"expander");
163 $tpl->setVariable(
"LINK_NAME", $a_node_id);
164 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
165 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
166 $tpl->parseCurrentBlock();
173 $tpl->setCurrentBlock(
"blank");
174 $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
175 $tpl->parseCurrentBlock();
178 if ($this->output_icons)
180 $tpl->setCurrentBlock(
"icon");
181 $tpl->setVariable(
"ICON_IMAGE" , $this->
getImage(
"icon_cat_s.png", $a_option[
"type"], $a_obj_id));
183 $tpl->setVariable(
"TARGET_ID" ,
"iconid_".$a_node_id);
184 $this->iconList[] =
"iconid_".$a_node_id;
185 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt($a_option[
"desc"]));
186 $tpl->parseCurrentBlock();
189 if(strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type'])))
191 $tpl->setCurrentBlock(
'check');
192 $tpl->setVariable(
'OBJ_CHECK', $formItem);
193 $tpl->parseCurrentBlock();
196 if ($this->
isClickable($a_option[
"type"], $a_node_id,$a_obj_id))
198 $tpl->setCurrentBlock(
"link");
206 if ($style_class !=
"")
208 $tpl->setVariable(
"A_CLASS",
' class="'.$style_class.
'" ' );
211 if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) !=
"")
213 $tpl->setVariable(
"ONCLICK",
"onClick=\"$onclick\"");
216 $tpl->setVariable(
"LINK_NAME", $a_node_id);
218 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]),
219 $this->textwidth,
true));
221 $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]), $this->textwidth,
true));
222 $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
223 if ($frame_target !=
"")
225 $tpl->setVariable(
"TARGET",
" target=\"".$frame_target.
"\"");
227 $tpl->parseCurrentBlock();
231 $tpl->setCurrentBlock(
"text");
233 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]), $this->textwidth,
true));
235 $this->
buildDescription($a_option[
"desc"], $a_node_id, $a_option[
"type"]), $this->textwidth,
true));
236 $tpl->parseCurrentBlock();
239 $tpl->setCurrentBlock(
"list_item");
240 $tpl->parseCurrentBlock();
241 $tpl->touchBlock(
"element");
261 $tpl->setCurrentBlock(
"icon");
262 $nd = $this->tree->getNodeData($this->
getRoot());
268 $tpl->parseCurrentBlock();
270 if(strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type'])))
272 $tpl->setCurrentBlock(
'check');
273 $tpl->setVariable(
'OBJ_CHECK', $formItem);
274 $tpl->parseCurrentBlock();
284 #$title = substr($title, 0,22).'...';
287 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
300 return '<font style="font-weight: bold">'.$title.
'</font>';
303 return '<font style="font-weight: bold;font-style: italic">'.$title.
'</font>';
306 return '<font style="font-style: italic">'.$title.
'</font>';
312 return '<font class="warning">'.$title.
'</font>';