4 include_once
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php';
26 public function __construct($a_target, $a_server_id, $a_mid, $a_tree_id)
30 parent::__construct($a_target);
32 $this->type = self::SEL_TYPE_CHECK;
37 $this->filter =
array();
40 $this->server_id = $a_server_id;
42 $this->tree_id = $a_tree_id;
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]) {
104 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
115 switch ($this->type) {
116 case self::SEL_TYPE_CHECK:
120 case self::SEL_TYPE_RADIO:
130 if (!isset($a_node_id) or !is_array($a_option)) {
131 $this->
ilias->raiseError(get_class($this) .
"::formatObject(): Missing parameter or wrong datatype! " .
132 "node_id: " . $a_node_id .
" options:" . var_dump($a_option), $this->
ilias->error_obj->WARNING);
136 foreach ($a_option[
"tab"] as $picture) {
137 if ($picture ==
'plus') {
138 $tpl->setCurrentBlock(
"expander");
139 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"expand"));
141 $tpl->setVariable(
"LINK_NAME", $a_node_id);
142 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
143 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/plus.png"));
144 $tpl->parseCurrentBlock();
148 if ($picture ==
'minus' && $this->show_minus) {
149 $tpl->setCurrentBlock(
"expander");
150 $tpl->setVariable(
"EXP_DESC", $lng->txt(
"collapse"));
152 $tpl->setVariable(
"LINK_NAME", $a_node_id);
153 $tpl->setVariable(
"LINK_TARGET_EXPANDER",
$target);
154 $tpl->setVariable(
"IMGPATH", $this->
getImage(
"browser/minus.png"));
155 $tpl->parseCurrentBlock();
161 $tpl->setCurrentBlock(
"blank");
162 $tpl->setVariable(
"BLANK_PATH", $this->
getImage(
"browser/blank.png"));
163 $tpl->parseCurrentBlock();
166 if ($this->output_icons) {
167 $tpl->setCurrentBlock(
"icon");
168 $tpl->setVariable(
"ICON_IMAGE", $this->
getImage(
"icon_cat.svg", $a_option[
"type"], $a_obj_id));
170 $tpl->setVariable(
"TARGET_ID",
"iconid_" . $a_node_id);
171 $this->iconList[] =
"iconid_" . $a_node_id;
172 $tpl->setVariable(
"TXT_ALT_IMG", $lng->txt($a_option[
"desc"]));
173 $tpl->parseCurrentBlock();
176 if (strlen($formItem = $this->
buildFormItem($a_node_id, $a_option[
'type']))) {
177 $tpl->setCurrentBlock(
'check');
178 $tpl->setVariable(
'OBJ_CHECK', $formItem);
179 $tpl->parseCurrentBlock();
182 if ($this->
isClickable($a_option[
"type"], $a_node_id, $a_obj_id)) {
183 $tpl->setCurrentBlock(
"link");
191 if ($style_class !=
"") {
192 $tpl->setVariable(
"A_CLASS",
' class="' . $style_class .
'" ');
195 if (($onclick = $this->
buildOnClick($a_node_id, $a_option[
"type"], $a_option[
"title"])) !=
"") {
196 $tpl->setVariable(
"ONCLICK",
"onClick=\"$onclick\"");
199 $tpl->setVariable(
"LINK_NAME", $a_node_id);
201 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]),
206 $this->
buildDescription($a_option[
"description"], $a_node_id, $a_option[
"type"]),
210 $frame_target = $this->
buildFrameTarget($a_option[
"type"], $a_node_id, $a_option[
"obj_id"]);
211 if ($frame_target !=
"") {
212 $tpl->setVariable(
"TARGET",
" target=\"" . $frame_target .
"\"");
214 $tpl->parseCurrentBlock();
216 $tpl->setCurrentBlock(
"text");
218 $this->
buildTitle($a_option[
"title"], $a_node_id, $a_option[
"type"]),
227 $tpl->parseCurrentBlock();
230 $tpl->setCurrentBlock(
"list_item");
231 $tpl->parseCurrentBlock();
232 $tpl->touchBlock(
"element");
252 $tpl->setCurrentBlock(
"icon");
253 $nd = $this->tree->getNodeData($this->
getRoot());
259 $tpl->parseCurrentBlock();
261 if (strlen($formItem = $this->
buildFormItem($a_obj_id, $a_option[
'type']))) {
262 $tpl->setCurrentBlock(
'check');
263 $tpl->setVariable(
'OBJ_CHECK', $formItem);
264 $tpl->parseCurrentBlock();
272 if (strlen(
$title) >= 22) {
273 #$title = substr($title, 0,22).'...'; 276 include_once
'./Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
288 return '<font style="font-weight: bold">' .
$title .
'</font>';
291 return '<font style="font-weight: bold;font-style: italic">' .
$title .
'</font>';
294 return '<font style="font-style: italic">' .
$title .
'</font>';
300 return '<font class="warning">' .
$title .
'</font>';
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
const MAPPING_PENDING_DISCONNECTABLE
addFormItemForType($type)
Add form item.
formatObject($tpl, $a_node_id, $a_option, $a_obj_id=0)
formatHeader($tpl, $a_obj_id, $a_option)
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
get frame target (may be overwritten by derived classes)
getNodeStyleClass($a_id, $a_type)
get style class for node
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
static lookupStatusByObjId($a_server_id, $a_mid, $a_tree_id, $obj_id)
Lookup status.
setTitleLength($a_length)
Set max title length.
isClickable($a_type, $a_ref_id=0, $a_obj_id=0)
no item is clickable
buildFormItem($a_node_id, $a_type)
removeFormItemForType($type)
setOrderColumn($a_column)
set the order column public
createTarget($a_type, $a_node_id, $a_highlighted_subtree=false, $a_append_anch=true)
Creates Get Parameter private.
buildOnClick($a_node_id, $a_type, $a_title)
get onclick event handling (may be overwritten by derived classes)
__construct($a_target, $a_server_id, $a_mid, $a_tree_id)
setCheckedItems($a_checked_items=array())
redirection script todo: (a better solution should control the processing via a xml file) ...
Create styles array
The data for the language used.
static formRadioButton($checked, $varname, $value, $onclick=null, $disabled=false)
??? public
Class ilExplorer class for explorer view in admin frame.
getImage($a_name, $a_type="", $a_obj_id="")
get image path (may be overwritten by derived classes)
const MAPPING_PENDING_NOT_DISCONNECTABLE
buildTitle($title, $a_obj_id, $a_type)
buildDescription($a_desc, $a_id, $a_type)
standard implementation for description, may be overwritten by derived classes
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
setTree(ilECSCmsTree $tree)
Set cms tree.