34 $this->container_gui = $container_gui_obj;
35 $this->container_obj = $this->container_gui->object;
83 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
90 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
99 $obj_id, $ilUser->getId());
107 if ($ilCtrl->getNextClass() !=
"ilcolumngui" ||
108 !$ilCtrl->isAsynch())
122 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
127 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
137 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
142 $html = $ilCtrl->forwardCommand($column_gui);
146 if (!$ilCtrl->isAsynch())
151 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
153 array(
"container_content_gui" => $this));
154 if (!$uip->replaced())
156 $html = $ilCtrl->getHTML($column_gui);
158 $html = $uip->getHTML($html);
172 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
174 $tpl->addOnLoadCode(
"il.Object.setRedrawListItemUrl('".
175 $ilCtrl->getLinkTarget($this->container_gui,
"redrawListItem",
"",
true).
"');");
177 switch ($ilCtrl->getNextClass())
180 $ilCtrl->setReturn($this->container_gui,
"");
205 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
213 if (!$ilCtrl->isAsynch())
223 $html = $ilCtrl->forwardCommand($column_gui);
230 $html = $ilCtrl->forwardCommand($column_gui);
247 $this->adminCommands =
false;
259 if (!$this->adminCommands)
263 if ($rbacsystem->checkAccess(
"delete", $a_ref_id))
265 $this->adminCommands =
true;
270 $this->adminCommands = $a_admin_com_included_in_list;
278 protected function getItemGUI($item_data,$a_show_path =
false)
280 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
283 if (!is_object ($this->list_gui[$item_data[
"type"]]))
287 $this->list_gui[$item_data[
"type"]] =& $item_list_gui;
291 $item_list_gui =& $this->list_gui[$item_data[
"type"]];
303 $item_list_gui->enableComments(
true);
304 $item_list_gui->enableNotes(
true);
305 $item_list_gui->enableTags(
true);
308 $this->
getContainerGUI()->modifyItemGUI($item_list_gui, $item_data, $a_show_path);
310 return $item_list_gui;
321 foreach ($type_grps as $type => $v)
324 if (is_int(strpos($a_container_page_html,
"[list-".$type.
"]")))
331 while (eregi(
"\[(item-group-([0-9]*))\]", $a_container_page_html, $found))
335 $a_container_page_html = eregi_replace(
"\[".$found[1].
"\]", $html, $a_container_page_html);
346 $this->embedded_block[$block_type][] = $block_parameter;
354 return $this->embedded_block;
365 if (is_array($this->embedded_block[
"type"]))
368 foreach ($this->embedded_block[
"type"] as $k => $type)
370 if ($this->rendered_block[
"type"][$type] ==
"")
372 if (is_array($this->items[$type]))
380 $item_rendered =
false;
385 $this->items[
'sess'] =
ilUtil::sortArray($this->items[
'sess'],
'start',
'ASC',
true,
true);
388 foreach($this->items[$type] as $k => $item_data)
390 $html = $this->
renderItem($item_data,$position++);
394 $item_rendered =
true;
395 $this->rendered_items[$item_data[
"child"]] =
true;
403 $this->rendered_block[
"type"][$type] =
"";
407 $this->rendered_block[
"type"][$type] =
$tpl->get();
415 if (is_array($this->embedded_block[
"itgr"]))
417 $item_groups = array();
418 if (is_array($this->items[
"itgr"]))
421 foreach ($this->items[
"itgr"] as $ig)
423 $item_groups[$ig[
"ref_id"]] = $ig;
428 foreach ($this->embedded_block[
"itgr"] as
$ref_id)
431 if ($this->rendered_block[
"itgr"][$ref_id] ==
"" && isset($item_groups[$ref_id]))
435 $this->rendered_block[
"itgr"][
$ref_id] =
$tpl->get();
449 function renderItem($a_item_data,$a_position = 0,$a_force_icon =
false, $a_pos_prefix =
"")
454 if(!$ilAccess->checkAccess(
'visible',
'',$a_item_data[
'ref_id'],$a_item_data[
'type'],$a_item_data[
'obj_id'],$a_item_data[
'tree']))
459 $item_list_gui = $this->
getItemGUI($a_item_data);
460 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows" ||
461 $a_item_data[
"type"] ==
"sess" || $a_force_icon)
463 $item_list_gui->enableIcon(
true);
467 $item_list_gui->enableCheckbox(
true);
469 if ($this->
getContainerGUI()->isActiveOrdering() && ($a_item_data[
'type'] !=
'sess' || get_class($this) !=
'ilContainerSessionsContentGUI'))
471 $item_list_gui->setPositionInputField($a_pos_prefix.
"[".$a_item_data[
"ref_id"].
"]",
472 sprintf(
'%d', (
int)$a_position*10));
474 if($a_item_data[
'type'] ==
'sess' and get_class($this) !=
'ilContainerObjectiveGUI')
478 case self::DETAILS_TITLE:
480 $item_list_gui->enableExpand(
true);
481 $item_list_gui->setExpanded(
false);
482 $item_list_gui->enableDescription(
false);
483 $item_list_gui->enableProperties(
true);
486 case self::DETAILS_ALL:
488 $item_list_gui->enableExpand(
true);
489 $item_list_gui->setExpanded(
true);
490 $item_list_gui->enableDescription(
true);
491 $item_list_gui->enableProperties(
true);
496 $item_list_gui->enableExpand(
true);
497 $item_list_gui->enableDescription(
true);
498 $item_list_gui->enableProperties(
true);
504 if($a_item_data[
'type'] ==
'sess' and (
505 $this->
getDetailsLevel($a_item_data[
'obj_id']) != self::DETAILS_TITLE or
513 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
514 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
519 $item_readable = $ilAccess->checkAccess(
'read',
'',$a_item_data[
'ref_id']);
521 foreach($items as $item)
525 if(!$ilAccess->checkAccess(
'visible',
'',$item[
'ref_id']))
531 $item_list_gui2->enableIcon(
true);
532 $item_list_gui2->enableItemDetailLinks(
false);
535 if(!$item_readable and !$ilAccess->checkAccess(
'write',
'',$item[
'ref_id']))
537 $item_list_gui2->forceVisibleOnly(
true);
542 $item_list_gui2->enableCheckbox(
true);
548 $item_list_gui2->setPositionInputField(
"[sess][".$a_item_data[
'obj_id'].
"][".$item[
"ref_id"].
"]",
549 sprintf(
'%d', (
int)$pos*10));
557 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
558 $item[
'obj_id'], $item[
'title'], $item[
'description']);
561 if(strlen($sub_item_html))
563 $item_list_gui->addSubItemHTML($sub_item_html);
568 if ($ilSetting->get(
"item_cmd_asynch"))
571 $ilCtrl->setParameter($this->container_gui,
"cmdrefid", $a_item_data[
'ref_id']);
572 $asynch_url = $ilCtrl->getLinkTarget($this->container_gui,
573 "getAsynchItemList",
"",
true,
false);
574 $ilCtrl->setParameter($this->container_gui,
"cmdrefid",
"");
577 include_once
"Services/Object/classes/class.ilObjectActivation.php";
580 $html = $item_list_gui->getListItemHTML($a_item_data[
'ref_id'],
581 $a_item_data[
'obj_id'], $a_item_data[
'title'], $a_item_data[
'description'],
582 $asynch,
false, $asynch_url);
584 $item_list_gui->adminCommandsIncluded());
598 $tpl =
new ilTemplate(
"tpl.container_list_block.html",
true,
true,
599 "Services/Container");
600 $this->cur_row_type =
"row_type_1";
611 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
617 $a_tpl->setCurrentBlock($this->cur_row_type);
618 $a_tpl->setVariable(
"ROW_ID",
'id="item_row_'.$a_ref_id.
'"');
619 $a_tpl->parseCurrentBlock();
623 $a_tpl->touchBlock($this->cur_row_type);
626 $a_tpl->setCurrentBlock(
"container_standard_row");
627 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
628 $a_tpl->parseCurrentBlock();
629 $a_tpl->touchBlock(
"container_row");
639 $a_tpl->setVariable(
"CB_ID",
' id="bl_cntr_'.$this->bl_cnt.
'"');
642 $a_tpl->setCurrentBlock(
"select_all_row");
643 $a_tpl->setVariable(
"CHECKBOXNAME",
"bl_cb_".$this->bl_cnt);
644 $a_tpl->setVariable(
"SEL_ALL_PARENT",
"bl_cntr_".$this->bl_cnt);
645 $a_tpl->setVariable(
"SEL_ALL_PARENT",
"bl_cntr_".$this->bl_cnt);
646 $a_tpl->setVariable(
"TXT_SELECT_ALL", $lng->txt(
"select_all"));
647 $a_tpl->parseCurrentBlock();
651 if ($a_text ==
"" && $a_type !=
"")
653 if (!$objDefinition->isPlugin($a_type))
655 $title = $lng->txt(
"objs_".$a_type);
659 include_once(
"./Services/Component/classes/class.ilPlugin.php");
668 if ($ilSetting->get(
"icon_position_in_lists") !=
"item_rows" &&
673 $a_tpl->setCurrentBlock(
"container_header_row_image");
674 $a_tpl->setVariable(
"HEADER_IMG", $icon);
675 $a_tpl->setVariable(
"HEADER_ALT",
$title);
679 $a_tpl->setCurrentBlock(
"container_header_row");
682 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT",
$title);
683 $a_tpl->parseCurrentBlock();
684 $a_tpl->touchBlock(
"container_row");
695 $this->cur_row_type =
"";
709 foreach ($type_grps as $type => $v)
712 if (is_int(strpos($a_output_html,
"[list-".$type.
"]")))
714 $a_output_html = eregi_replace(
"\[list-".$type.
"\]",
715 $this->rendered_block[
"type"][$type], $a_output_html);
720 while (eregi(
"\[(item-group-([0-9]*))\]", $a_output_html, $found))
722 $itgr_ref_id = (int) $found[2];
726 if (isset($this->rendered_block[
"itgr"][$itgr_ref_id]))
728 $html = $this->rendered_block[
"itgr"][$itgr_ref_id];
729 $this->rendered_items[$itgr_ref_id] =
true;
731 $a_output_html = eregi_replace(
"\[".$found[1].
"\]", $html, $a_output_html);
734 return $a_output_html;
742 global
$lng, $objDefinition;
744 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
748 $a_tpl->touchBlock($this->cur_row_type);
750 if (!$objDefinition->isPlugin($type))
752 $type = $lng->txt(
"obj_".$a_type);
756 include_once(
"./Services/Component/classes/class.ilPlugin.php");
759 $a_message = str_replace(
"[type]", $type, $a_message);
761 $a_tpl->setVariable(
"ROW_NBSP",
" ");
763 $a_tpl->setCurrentBlock(
"container_standard_row");
764 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT",
766 $a_tpl->parseCurrentBlock();
767 $a_tpl->touchBlock(
"container_row");
777 $a_tpl->setCurrentBlock(
"container_block");
778 $a_tpl->parseCurrentBlock();
788 global $objDefinition;
790 if (empty($this->type_grps))
793 $objDefinition->getGroupedRepositoryObjectTypes($this->
getContainerObject()->getType());
795 return $this->type_grps;
805 $lng->loadLanguageModule(
"rep");
807 $tpl =
new ilTemplate(
"tpl.rep_intro.html",
true,
true,
"Services/Repository");
809 $tpl->setVariable(
"TXT_WELCOME", $lng->txt(
"rep_intro"));
810 $tpl->setVariable(
"TXT_INTRO_1", $lng->txt(
"rep_intro1"));
811 $tpl->setVariable(
"TXT_INTRO_2", $lng->txt(
"rep_intro2"));
812 $tpl->setVariable(
"TXT_INTRO_3", sprintf($lng->txt(
"rep_intro3"), $lng->txt(
"add")));
813 $tpl->setVariable(
"TXT_INTRO_4", sprintf($lng->txt(
"rep_intro4"), $lng->txt(
"cat_add")));
814 $tpl->setVariable(
"TXT_INTRO_5", $lng->txt(
"rep_intro5"));
815 $tpl->setVariable(
"TXT_INTRO_6", $lng->txt(
"rep_intro6"));
829 if (is_array($this->items[
"itgr"]))
831 foreach ($this->items[
"itgr"] as $itgr)
833 if (!$this->rendered_items[$itgr[
"child"]])
851 global $ilAccess,
$lng;
853 $perm_ok = $ilAccess->checkAccess(
"read",
"", $a_itgr[
'ref_id']);
855 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
856 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
859 $this->
getContainerObject()->getId())->sortSubItems(
'itgr', $a_itgr[
'obj_id'],$items);
865 foreach($items as $item)
867 $this->rendered_items[$item[
"child"]] =
true;
873 $item_list_gui->enableNotes(
false);
874 $item_list_gui->enableTags(
false);
875 $item_list_gui->enableComments(
false);
876 $item_list_gui->enableTimings(
false);
877 $item_list_gui->getListItemHTML($a_itgr[
"ref_id"], $a_itgr[
"obj_id"],
878 $a_itgr[
"title"], $a_itgr[
"description"]);
879 $commands_html = $item_list_gui->getCommandsHTML();
883 $a_tpl->setVariable(
"CB_ID",
' id="bl_cntr_'.$this->bl_cnt.
'"');
886 $a_tpl->setCurrentBlock(
"select_all_row");
887 $a_tpl->setVariable(
"CHECKBOXNAME",
"bl_cb_".$this->bl_cnt);
888 $a_tpl->setVariable(
"SEL_ALL_PARENT",
"bl_cntr_".$this->bl_cnt);
889 $a_tpl->setVariable(
"SEL_ALL_PARENT",
"bl_cntr_".$this->bl_cnt);
890 $a_tpl->setVariable(
"TXT_SELECT_ALL", $lng->txt(
"select_all"));
891 $a_tpl->parseCurrentBlock();
895 $a_tpl->setCurrentBlock(
"container_header_row");
896 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT", $a_itgr[
"title"]);
897 $a_tpl->setVariable(
"CHR_COMMANDS", $commands_html);
898 $a_tpl->parseCurrentBlock();
900 $a_tpl->touchBlock(
"container_row");
906 foreach($items as $item)
908 $html2 = $this->
renderItem($item, $position++,
false,
"[itgr][".$a_itgr[
'obj_id'].
"]");
912 $this->rendered_items[$item[
"child"]] =
true;
917 $a_tpl->setCurrentBlock(
"container_block");
918 $a_tpl->parseCurrentBlock();