38 $this->container_gui = $container_gui_obj;
39 $this->container_obj = $this->container_gui->object;
87 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
94 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
103 $obj_id, $ilUser->getId());
111 if ($ilCtrl->getNextClass() !=
"ilcolumngui" ||
112 !$ilCtrl->isAsynch())
126 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
131 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
141 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
146 $html = $ilCtrl->forwardCommand($column_gui);
150 if (!$ilCtrl->isAsynch())
155 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
157 array(
"container_content_gui" => $this));
158 if (!$uip->replaced())
160 $html = $ilCtrl->getHTML($column_gui);
176 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
178 $tpl->addOnLoadCode(
"il.Object.setRedrawListItemUrl('".
179 $ilCtrl->getLinkTarget($this->container_gui,
"redrawListItem",
"",
true).
"');");
181 $tpl->addOnLoadCode(
"il.Object.setRatingUrl('".
182 $ilCtrl->getLinkTargetByClass(
array(get_class($this->container_gui),
"ilcommonactiondispatchergui",
"ilratinggui"),
183 "saveRating",
"",
true,
false).
"');");
185 switch ($ilCtrl->getNextClass())
188 $this->container_gui->setSideColumnReturn();
193 $ilDB->useSlave(
true);
195 $ilDB->useSlave(
false);
213 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
216 include_once
"Services/Container/classes/class.ilContainerRenderer.php";
220 ,$this->
getContainerGUI()->isActiveOrdering() && (get_class($this) !=
"ilContainerObjectiveGUI")
221 ,$sorting->getBlockPositions()
232 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
240 if (!$ilCtrl->isAsynch())
250 $html = $ilCtrl->forwardCommand($column_gui);
257 $html = $ilCtrl->forwardCommand($column_gui);
274 $this->adminCommands =
false;
286 if (!$this->adminCommands)
290 if ($rbacsystem->checkAccess(
"delete", $a_ref_id))
292 $this->adminCommands =
true;
297 $this->adminCommands = $a_admin_com_included_in_list;
305 protected function getItemGUI($item_data,$a_show_path =
false)
307 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
310 if (!is_object ($this->list_gui[$item_data[
"type"]]))
314 $this->list_gui[$item_data[
"type"]] =& $item_list_gui;
318 $item_list_gui =& $this->list_gui[$item_data[
"type"]];
323 $item_list_gui->setParentRefId($item_data[
"parent"]);
325 $item_list_gui->setDefaultCommandParameters(
array());
326 $item_list_gui->disableTitleLink(
false);
327 $item_list_gui->resetConditionTarget();
338 $item_list_gui->enableComments(
true);
339 $item_list_gui->enableNotes(
true);
340 $item_list_gui->enableTags(
true);
341 $item_list_gui->enableRating(
true);
344 $item_list_gui->forceVisibleOnly(
false);
347 $this->
getContainerGUI()->modifyItemGUI($item_list_gui, $item_data, $a_show_path);
349 return $item_list_gui;
360 foreach ($type_grps as $type => $v)
363 if (is_int(strpos($a_container_page_html,
"[list-".$type.
"]")))
370 while (preg_match(
'~\[(item-group-([0-9]*))\]~i', $a_container_page_html, $found))
374 $a_container_page_html = preg_replace(
'~\['.$found[1].
'\]~i',
$html, $a_container_page_html);
385 $this->embedded_block[$block_type][] = $block_parameter;
393 return $this->embedded_block;
404 if (is_array($this->embedded_block[
"itgr"]))
406 $item_groups =
array();
407 if (is_array($this->items[
"itgr"]))
409 foreach ($this->items[
"itgr"] as $ig)
411 $item_groups[$ig[
"ref_id"]] = $ig;
415 foreach ($this->embedded_block[
"itgr"] as
$ref_id)
417 if(isset($item_groups[$ref_id]))
425 if (is_array($this->embedded_block[
"type"]))
427 foreach ($this->embedded_block[
"type"] as $k => $type)
429 if (is_array($this->items[$type]) &&
430 $this->renderer->addTypeBlock($type))
435 $this->items[
'sess'] =
ilUtil::sortArray($this->items[
'sess'],
'start',
'ASC',
true,
true);
440 foreach($this->items[$type] as $k => $item_data)
442 if(!$this->renderer->hasItem($item_data[
"child"]))
447 $this->renderer->addItemToBlock($type, $item_data[
"type"], $item_data[
"child"],
$html);
463 function renderItem($a_item_data,$a_position = 0,$a_force_icon =
false, $a_pos_prefix =
"")
468 if(!$ilAccess->checkAccess(
'visible',
'',$a_item_data[
'ref_id'],$a_item_data[
'type'],$a_item_data[
'obj_id'],$a_item_data[
'tree']))
472 $item_list_gui = $this->
getItemGUI($a_item_data);
473 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows" ||
474 $a_item_data[
"type"] ==
"sess" || $a_force_icon)
476 $item_list_gui->enableIcon(
true);
481 $item_list_gui->enableCheckbox(
true);
486 $item_list_gui->enableDownloadCheckbox($a_item_data[
"ref_id"],
true);
489 if ($this->
getContainerGUI()->isActiveItemOrdering() && ($a_item_data[
'type'] !=
'sess' || get_class($this) !=
'ilContainerSessionsContentGUI'))
491 $item_list_gui->setPositionInputField($a_pos_prefix.
"[".$a_item_data[
"ref_id"].
"]",
492 sprintf(
'%d', (
int)$a_position*10));
495 if($a_item_data[
'type'] ==
'sess' and get_class($this) !=
'ilContainerObjectiveGUI')
499 case self::DETAILS_TITLE:
501 $item_list_gui->enableExpand(
true);
502 $item_list_gui->setExpanded(
false);
503 $item_list_gui->enableDescription(
false);
504 $item_list_gui->enableProperties(
true);
507 case self::DETAILS_ALL:
509 $item_list_gui->enableExpand(
true);
510 $item_list_gui->setExpanded(
true);
511 $item_list_gui->enableDescription(
true);
512 $item_list_gui->enableProperties(
true);
517 $item_list_gui->enableExpand(
true);
518 $item_list_gui->enableDescription(
true);
519 $item_list_gui->enableProperties(
true);
524 if(method_exists($this,
"addItemDetails"))
526 $this->addItemDetails($item_list_gui, $a_item_data);
530 if($a_item_data[
'type'] ==
'sess' and (
539 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
540 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
545 $item_readable = $ilAccess->checkAccess(
'read',
'',$a_item_data[
'ref_id']);
547 foreach($items as $item)
551 if(!$ilAccess->checkAccess(
'visible',
'',$item[
'ref_id']))
557 $item_list_gui2->enableIcon(
true);
558 $item_list_gui2->enableItemDetailLinks(
false);
561 $item_list_gui2->setParentRefId($a_item_data[
'ref_id']);
564 if(!$item_readable
and !$ilAccess->checkAccess(
'write',
'',$item[
'ref_id']))
566 $item_list_gui2->forceVisibleOnly(
true);
571 $item_list_gui2->enableCheckbox(
true);
576 $item_list_gui2->enableDownloadCheckbox($item[
'ref_id'],
true);
581 $item_list_gui2->setPositionInputField(
"[sess][".$a_item_data[
'obj_id'].
"][".$item[
"ref_id"].
"]",
582 sprintf(
'%d', (
int)$pos*10));
589 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
590 $item[
'obj_id'], $item[
'title'], $item[
'description']);
593 if(strlen($sub_item_html))
595 $item_list_gui->addSubItemHTML($sub_item_html);
601 if ($ilSetting->get(
"item_cmd_asynch"))
604 $ilCtrl->setParameter($this->container_gui,
"cmdrefid", $a_item_data[
'ref_id']);
605 $asynch_url = $ilCtrl->getLinkTarget($this->container_gui,
606 "getAsynchItemList",
"",
true,
false);
607 $ilCtrl->setParameter($this->container_gui,
"cmdrefid",
"");
611 if ($a_item_data[
'type'] ==
'fold' && $fold_set->get(
"bgtask_download") && $fold_set->get(
"enable_download_folder")) {
612 include_once
"Services/BackgroundTask/classes/class.ilFolderDownloadBackgroundTaskHandler.php";
617 include_once
"Services/Object/classes/class.ilObjectActivation.php";
620 $html = $item_list_gui->getListItemHTML($a_item_data[
'ref_id'],
621 $a_item_data[
'obj_id'], $a_item_data[
'title'], $a_item_data[
'description'],
622 $asynch,
false, $asynch_url);
624 $item_list_gui->adminCommandsIncluded());
642 if (is_int(strpos($a_output_html,
"[list-".$type.
"]")))
644 $a_output_html = preg_replace(
'~\[list-'.$type.
'\]~i',
645 $this->renderer->renderSingleTypeBlock($type), $a_output_html);
650 while (preg_match(
'~\[(item-group-([0-9]*))\]~i', $a_output_html, $found))
652 $itgr_ref_id = (int) $found[2];
654 $a_output_html = preg_replace(
'~\['.$found[1].
'\]~i',
655 $this->renderer->renderSingleCustomBlock($itgr_ref_id), $a_output_html);
658 return $a_output_html;
668 global $objDefinition;
670 if (empty($this->type_grps))
673 $objDefinition->getGroupedRepositoryObjectTypes($this->
getContainerObject()->getType());
675 return $this->type_grps;
685 $lng->loadLanguageModule(
"rep");
687 $tpl =
new ilTemplate(
"tpl.rep_intro.html",
true,
true,
"Services/Repository");
689 $tpl->setVariable(
"TXT_WELCOME", $lng->txt(
"rep_intro"));
690 $tpl->setVariable(
"TXT_INTRO_1", $lng->txt(
"rep_intro1"));
691 $tpl->setVariable(
"TXT_INTRO_2", $lng->txt(
"rep_intro2"));
692 $tpl->setVariable(
"TXT_INTRO_3", sprintf($lng->txt(
"rep_intro3"), $lng->txt(
"add")));
693 $tpl->setVariable(
"TXT_INTRO_4", sprintf($lng->txt(
"rep_intro4"), $lng->txt(
"cat_add")));
694 $tpl->setVariable(
"TXT_INTRO_5", $lng->txt(
"rep_intro5"));
695 $tpl->setVariable(
"TXT_INTRO_6", $lng->txt(
"rep_intro6"));
708 if (is_array($this->items[
"itgr"]))
710 foreach ($this->items[
"itgr"] as $itgr)
712 if (!$this->renderer->hasCustomBlock($itgr[
"child"]))
716 $this->renderer->setBlockPosition($itgr[
"ref_id"], ++$a_pos);
734 $perm_ok = ($ilAccess->checkAccess(
"visible",
"", $a_itgr[
'ref_id']) &&
735 $ilAccess->checkAccess(
"read",
"", $a_itgr[
'ref_id']));
737 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
738 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
745 foreach($items as $item)
747 $this->renderer->hideItem($item[
"child"]);
753 $item_list_gui->enableNotes(
false);
754 $item_list_gui->enableTags(
false);
755 $item_list_gui->enableComments(
false);
756 $item_list_gui->enableTimings(
false);
757 $item_list_gui->getListItemHTML($a_itgr[
"ref_id"], $a_itgr[
"obj_id"],
758 $a_itgr[
"title"], $a_itgr[
"description"]);
759 $commands_html = $item_list_gui->getCommandsHTML();
761 include_once(
"./Modules/ItemGroup/classes/class.ilObjItemGroup.php");
765 $this->renderer->addCustomBlock($a_itgr[
"ref_id"],
"", $commands_html);
769 $this->renderer->addCustomBlock($a_itgr[
"ref_id"], $a_itgr[
"title"], $commands_html);
776 $this->
getContainerObject()->getId())->sortSubItems(
'itgr', $a_itgr[
'obj_id'], $items);
782 foreach($items as $item)
785 $html2 = $this->
renderItem($item, $position++,
false,
"[itgr][".$a_itgr[
'obj_id'].
"]");
789 $this->renderer->addItemToBlock($a_itgr[
"ref_id"], $item[
"type"], $item[
"child"],
$html2,
true);
static lookupHideTitle($a_id)
Lookup hide title.
determineAdminCommands($a_ref_id, $a_admin_com_included_in_list=false)
determin admin commands
determinePageEmbeddedBlocks($a_container_page_html)
Determine all blocks that are embedded in the container page.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static getCmdSide()
Get Column Side of Current Command.
static getItemsByEvent($a_event_id)
Get session material / event items.
getEmbeddedBlocks()
Get page embedded blocks.
static initObjectListAction()
init js for background download
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
getItemGroupsHTML($a_pos=0)
Get item groups HTML.
UI interface hook processor.
renderPageEmbeddedBlocks()
Render Page Embedded Blocks.
initRenderer()
Init container renderer.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
__forwardToColumnGUI()
Get columngui output.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
Parent class of all container content GUIs.
getMainContent()
Get content HTML for main column, this one must be overwritten in derived classes.
getContainerGUI()
Get container GUI object.
Column user interface class.
getDetailsLevel($a_item_id)
get details level
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
getContainerObject()
Get container object.
static _recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
clearAdminCommandsDetermination()
cleaer administration commands determination
renderItemGroup($a_itgr)
Render item group.
static getScreenMode()
Get Screen Mode for current command.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
getCenterColumnHTML()
Get HTML for center column.
getIntroduction()
Get introduction.
static getItemsByItemGroup($a_item_group_ref_id)
Get materials of item group.
static _getInstance($a_obj_id)
get instance by obj_id
__construct(&$container_gui_obj)
Constructor.
Class ilContainerRenderer.
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
addEmbeddedBlock($block_type, $block_parameter)
Add embedded block.
getRightColumnHTML()
Get HTML for right column.
getGroupedObjTypes()
Get grouped repository object types.
const DETAILS_DEACTIVATED
setOutput()
Sets view output into column layout.