34 $this->container_gui = $container_gui_obj;
35 $this->container_obj = $this->container_gui->object;
81 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
87 $obj_id, $ilUser->getId());
101 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
106 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
116 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
121 $html = $ilCtrl->forwardCommand($column_gui);
125 if (!$ilCtrl->isAsynch())
127 $html = $ilCtrl->getHTML($column_gui);
141 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
143 $tpl->addOnLoadCode(
"ilObject.setRedrawListItemUrl('".
144 $ilCtrl->getLinkTarget($this->container_gui,
"redrawListItem",
"",
true).
"');");
146 switch ($ilCtrl->getNextClass())
149 $ilCtrl->setReturn($this->container_gui,
"");
174 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
183 if (!$ilCtrl->isAsynch())
193 $html = $ilCtrl->forwardCommand($column_gui);
200 $html = $ilCtrl->forwardCommand($column_gui);
217 $this->adminCommands =
false;
229 if (!$this->adminCommands)
233 if ($rbacsystem->checkAccess(
"delete", $a_ref_id))
235 $this->adminCommands =
true;
240 $this->adminCommands = $a_admin_com_included_in_list;
248 protected function getItemGUI($item_data,$a_show_path =
false)
250 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
253 if (!is_object ($this->list_gui[$item_data[
"type"]]))
257 $this->list_gui[$item_data[
"type"]] =& $item_list_gui;
261 $item_list_gui =& $this->list_gui[$item_data[
"type"]];
273 $item_list_gui->enableComments(
true);
274 $item_list_gui->enableNotes(
true);
275 $item_list_gui->enableTags(
true);
278 $this->
getContainerGUI()->modifyItemGUI($item_list_gui, $item_data, $a_show_path);
280 return $item_list_gui;
291 foreach ($type_grps as $type => $v)
294 if (is_int(strpos($a_container_page_html,
"[list-".$type.
"]")))
308 $this->embedded_block[$block_type][] = $block_parameter;
316 return $this->embedded_block;
327 if (is_array($this->embedded_block[
"type"]))
330 foreach ($this->embedded_block[
"type"] as $k => $type)
332 if ($this->rendered_block[
"type"][$type] ==
"")
334 if (is_array($this->items[$type]))
342 $item_rendered =
false;
347 $this->items[
'sess'] =
ilUtil::sortArray($this->items[
'sess'],
'start',
'ASC',
true,
true);
350 foreach($this->items[$type] as $k => $item_data)
352 $html = $this->
renderItem($item_data,$position++);
356 $item_rendered =
true;
357 $this->rendered_items[$item_data[
"child"]] =
true;
365 $this->rendered_block[
"type"][$type] =
"";
369 $this->rendered_block[
"type"][$type] =
$tpl->get();
384 function renderItem($a_item_data,$a_position = 0,$a_force_icon =
false)
389 if(!$ilAccess->checkAccess(
'visible',
'',$a_item_data[
'ref_id'],$a_item_data[
'type'],$a_item_data[
'obj_id'],$a_item_data[
'tree']))
394 $item_list_gui = $this->
getItemGUI($a_item_data);
395 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows" ||
396 $a_item_data[
"type"] ==
"sess" || $a_force_icon)
398 $item_list_gui->enableIcon(
true);
402 $item_list_gui->enableCheckbox(
true);
404 if ($this->
getContainerGUI()->isActiveOrdering() && ($a_item_data[
'type'] !=
'sess' || get_class($this) !=
'ilContainerSessionsContentGUI'))
406 $item_list_gui->setPositionInputField(
"[".$a_item_data[
"ref_id"].
"]",
407 sprintf(
'%.1f', $a_position));
409 if($a_item_data[
'type'] ==
'sess' and get_class($this) !=
'ilContainerObjectiveGUI')
413 case self::DETAILS_TITLE:
415 $item_list_gui->enableExpand(
true);
416 $item_list_gui->setExpanded(
false);
417 $item_list_gui->enableDescription(
false);
418 $item_list_gui->enableProperties(
true);
421 case self::DETAILS_ALL:
423 $item_list_gui->enableExpand(
true);
424 $item_list_gui->setExpanded(
true);
425 $item_list_gui->enableDescription(
true);
426 $item_list_gui->enableProperties(
true);
431 $item_list_gui->enableExpand(
true);
432 $item_list_gui->enableDescription(
true);
433 $item_list_gui->enableProperties(
true);
439 if($a_item_data[
'type'] ==
'sess' and (
440 $this->
getDetailsLevel($a_item_data[
'obj_id']) != self::DETAILS_TITLE or
448 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
449 $items = $this->
getContainerObject()->items_obj->getItemsByEvent($a_item_data[
'obj_id']);
453 $item_readable = $ilAccess->checkAccess(
'read',
'',$a_item_data[
'ref_id']);
455 foreach($items as $item)
459 if(!$ilAccess->checkAccess(
'visible',
'',$item[
'ref_id']))
465 $item_list_gui2->enableIcon(
true);
466 $item_list_gui2->enableItemDetailLinks(
false);
469 if(!$item_readable and !$ilAccess->checkAccess(
'write',
'',$item[
'ref_id']))
471 $item_list_gui2->forceVisibleOnly(
true);
476 $item_list_gui2->enableCheckbox(
true);
482 $item_list_gui2->setPositionInputField(
"[sess][".$a_item_data[
'obj_id'].
"][".$item[
"ref_id"].
"]",
483 sprintf(
'%.1f', $pos));
488 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
489 $item[
'obj_id'], $item[
'title'], $item[
'description']);
493 if(strlen($sub_item_html))
495 $item_list_gui->addSubItemHTML($sub_item_html);
500 if ($ilSetting->get(
"item_cmd_asynch"))
503 $ilCtrl->setParameter($this->container_gui,
"cmdrefid", $a_item_data[
'ref_id']);
504 $asynch_url = $ilCtrl->getLinkTarget($this->container_gui,
505 "getAsynchItemList",
"",
true,
false);
506 $ilCtrl->setParameter($this->container_gui,
"cmdrefid",
"");
509 $html = $item_list_gui->getListItemHTML($a_item_data[
'ref_id'],
510 $a_item_data[
'obj_id'], $a_item_data[
'title'], $a_item_data[
'description'],
511 $asynch,
false, $asynch_url);
513 $item_list_gui->adminCommandsIncluded());
527 $tpl =
new ilTemplate (
"tpl.container_list_block.html",
true,
true,
528 "Services/Container");
529 $this->cur_row_type =
"row_type_1";
540 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
546 $a_tpl->setCurrentBlock($this->cur_row_type);
547 $a_tpl->setVariable(
"ROW_ID",
'id="item_row_'.$a_ref_id.
'"');
548 $a_tpl->parseCurrentBlock();
552 $a_tpl->touchBlock($this->cur_row_type);
555 $a_tpl->setCurrentBlock(
"container_standard_row");
556 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
557 $a_tpl->parseCurrentBlock();
558 $a_tpl->touchBlock(
"container_row");
568 $a_tpl->setVariable(
"CB_ID",
' id="bl_cntr_'.$this->bl_cnt.
'"');
571 $a_tpl->setCurrentBlock(
"select_all_row");
572 $a_tpl->setVariable(
"CHECKBOXNAME",
"bl_cb_".$this->bl_cnt);
573 $a_tpl->setVariable(
"SEL_ALL_PARENT",
"bl_cntr_".$this->bl_cnt);
574 $a_tpl->setVariable(
"SEL_ALL_PARENT",
"bl_cntr_".$this->bl_cnt);
575 $a_tpl->setVariable(
"TXT_SELECT_ALL", $lng->txt(
"select_all"));
576 $a_tpl->parseCurrentBlock();
580 if ($a_text ==
"" && $a_type !=
"")
582 if (!$objDefinition->isPlugin($a_type))
584 $title = $lng->txt(
"objs_".$a_type);
588 include_once(
"./Services/Component/classes/class.ilPlugin.php");
597 if ($ilSetting->get(
"icon_position_in_lists") !=
"item_rows" &&
602 $a_tpl->setCurrentBlock(
"container_header_row_image");
603 $a_tpl->setVariable(
"HEADER_IMG", $icon);
604 $a_tpl->setVariable(
"HEADER_ALT",
$title);
608 $a_tpl->setCurrentBlock(
"container_header_row");
611 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT",
$title);
612 $a_tpl->parseCurrentBlock();
613 $a_tpl->touchBlock(
"container_row");
624 $this->cur_row_type =
"";
638 foreach ($type_grps as $type => $v)
641 if (is_int(strpos($a_output_html,
"[list-".$type.
"]")))
643 $a_output_html = eregi_replace(
"\[list-".$type.
"\]",
644 $this->rendered_block[
"type"][$type], $a_output_html);
648 return $a_output_html;
656 global
$lng, $objDefinition;
658 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
662 $a_tpl->touchBlock($this->cur_row_type);
664 if (!$objDefinition->isPlugin($type))
666 $type = $lng->txt(
"obj_".$a_type);
670 include_once(
"./Services/Component/classes/class.ilPlugin.php");
673 $a_message = str_replace(
"[type]", $type, $a_message);
675 $a_tpl->setVariable(
"ROW_NBSP",
" ");
677 $a_tpl->setCurrentBlock(
"container_standard_row");
678 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT",
680 $a_tpl->parseCurrentBlock();
681 $a_tpl->touchBlock(
"container_row");
691 $a_tpl->setCurrentBlock(
"container_block");
692 $a_tpl->parseCurrentBlock();
702 global $objDefinition;
704 if (empty($this->type_grps))
707 $objDefinition->getGroupedRepositoryObjectTypes($this->
getContainerObject()->getType());
709 return $this->type_grps;
719 $lng->loadLanguageModule(
"rep");
721 $tpl =
new ilTemplate(
"tpl.rep_intro.html",
true,
true,
"Services/Repository");
723 $tpl->setVariable(
"TXT_WELCOME", $lng->txt(
"rep_intro"));
724 $tpl->setVariable(
"TXT_INTRO_1", $lng->txt(
"rep_intro1"));
725 $tpl->setVariable(
"TXT_INTRO_2", $lng->txt(
"rep_intro2"));
726 $tpl->setVariable(
"TXT_INTRO_3", sprintf($lng->txt(
"rep_intro3"), $lng->txt(
"add")));
727 $tpl->setVariable(
"TXT_INTRO_4", sprintf($lng->txt(
"rep_intro4"), $lng->txt(
"cat_add")));
728 $tpl->setVariable(
"TXT_INTRO_5", $lng->txt(
"rep_intro5"));
729 $tpl->setVariable(
"TXT_INTRO_6", $lng->txt(
"rep_intro6"));