4 require_once
"./classes/class.ilObjectGUI.php";
5 require_once
"./Services/Container/classes/class.ilContainer.php";
6 include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
27 function ilContainerGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
31 $this->rbacsystem =& $rbacsystem;
33 $lng->loadLanguageModule(
"cntr");
42 $this->
ilObjectGUI($a_data, $a_id, $a_call_by_reference,
false);
53 $next_class = $this->ctrl->getNextClass();
54 $cmd = $this->ctrl->getCmd(
"render");
59 case "ilpageobjectgui":
60 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui")
63 $tpl->setContent(
$ret);
71 case "ilobjstylesheetgui":
93 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
94 $values[
'didactic_type'] =
95 'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
106 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
108 $this->object->getRefId()
112 if($new_tpl_id != $current_tpl_id)
117 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
118 $this->ctrl->setReturn($this,
'edit');
119 $this->ctrl->setCmdClass(
'ildidactictemplategui');
120 $this->ctrl->setCmd(
'confirmTemplateSwitch');
122 return $this->ctrl->forwardCommand($dtpl_gui);
135 $ilTabs->clearTargets();
137 $cmd = $ilCtrl->getCmd();
138 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
139 $this->ctrl->setReturn($this,
"editStyleProperties");
140 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
142 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
144 $style_gui->setCreationMode(
true);
147 if (
$cmd ==
"confirmedDelete")
149 $this->
object->setStyleSheetId(0);
150 $this->
object->update();
153 $ret = $this->ctrl->forwardCommand($style_gui);
155 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
158 $this->
object->setStyleSheetId($style_id);
159 $this->
object->update();
160 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
172 $cmd = $ilCtrl->getCmd();
174 if (in_array(
$cmd, array(
"displayMediaFullscreen",
"downloadFile")))
183 $ilTabs->clearTargets();
185 if (
$_GET[
"redirectSource"] ==
"ilinternallinkgui")
194 $ilTabs->setBackTarget($lng->txt(
"cntr_back_to_old_editor"),
195 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
"_top");
199 $ilTabs->setBackTarget($lng->txt(
"back"),
"./goto.php?target=".$this->object->getType().
"_".
200 $this->
object->getRefId(),
"_top");
204 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
205 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
207 $lng->loadLanguageModule(
"content");
209 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
210 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
213 $this->tpl->setCurrentBlock(
"SyntaxStyle");
214 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
216 $this->tpl->parseCurrentBlock();
219 $this->
object->getId()))
222 $new_page_object =
new ilPageObject($this->object->getType());
223 $new_page_object->
setParentId($this->object->getId());
224 $new_page_object->setId($this->object->getId());
225 $new_page_object->createFromXML();
231 $this->ctrl->setReturnByClass(
"ilpageobjectgui",
"edit");
238 $this->
object->getId());
239 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
241 $this->object->getStyleSheetId(), $this->
object->getType()));
247 $page_gui->setIntLinkHelpDefault(
"RepositoryItem",
$_GET[
"ref_id"]);
248 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
249 $page_gui->setLinkXML($link_xml);
251 $page_gui->setFileDownloadLink(
"");
252 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"showMediaFullscreen"));
255 $page_gui->setPresentationTitle(
"");
256 $page_gui->setTemplateOutput(
false);
258 $page_gui->setHeader(
"");
259 $page_gui->setEnabledRepositoryObjects(
true);
260 $page_gui->setEnabledFileLists(
false);
261 $page_gui->setEnabledMaps(
true);
262 $page_gui->setEnabledPCTabs(
true);
263 $page_gui->setEnabledInternalLinks(
true);
270 $wtpl =
new ilTemplate(
"tpl.cntr_old_editor_message.html",
true,
271 true,
"Services/Container");
272 $wtpl->setVariable(
"ALT_WARNING", $lng->txt(
"warning"));
273 $wtpl->setVariable(
"IMG_WARNING",
275 $wtpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_switch_to_new_editor_message"));
276 $wtpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_switch_to_new_editor_message"));
277 $wtpl->setVariable(
"HREF_SWITCH_TO_NEW_EDITOR",
278 $ilCtrl->getLinkTarget($this,
"useNewEditor"));
279 $wtpl->setVariable(
"TXT_MIGRATION_SWITCH",
280 $lng->txt(
"cntr_switch_to_new_editor_cmd"));
281 $page_gui->setPrependingHtml($wtpl->get());
285 $page_gui->setTabHook($this,
"addPageTabs");
287 $ret =& $this->ctrl->forwardCommand($page_gui);
300 $ilTabs->addTarget(
"obj_sty",
301 $ilCtrl->getLinkTarget($this,
'editStyleProperties'),
"editStyleProperties");
311 if (!$ilSetting->get(
"enable_cat_page_edit"))
321 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
323 return $xpage->getContent();
331 include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
333 $this->
object->getId()))
337 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
338 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
340 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
341 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
343 $this->tpl->setCurrentBlock(
"SyntaxStyle");
344 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
346 $this->tpl->parseCurrentBlock();
350 $this->
object->getId());
351 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
353 $this->object->getStyleSheetId(), $this->
object->getType()));
355 $page_gui->setIntLinkHelpDefault(
"StructureObject",
$_GET[
"ref_id"]);
356 $page_gui->setFileDownloadLink(
"");
360 $page_gui->setPresentationTitle(
"");
361 $page_gui->setTemplateOutput(
false);
363 $page_gui->setHeader(
"");
364 $page_gui->setEnabledRepositoryObjects(
true);
365 $page_gui->setEnabledFileLists(
false);
366 $page_gui->setEnabledPCTabs(
true);
367 $page_gui->setEnabledMaps(
true);
368 $ret = $page_gui->showPage();
379 if (parent::prepareOutput())
384 #$this->showPossibleSubObjects();
388 include_once
'./Services/Container/classes/class.ilMemberViewGUI.php';
399 if (
$_GET[
"obj_id"] !=
"")
404 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
410 $mode = (
$_SESSION[
"il_rep_mode"] ==
"flat")
413 $link =
"repository.php?cmd=frameset&set_mode=".$mode.
"&ref_id=".$this->
object->getRefId();
414 $tpl->setTreeFlatIcon($link, $mode);
426 $this->tpl->setTitle($this->object->getTitle());
427 $this->tpl->setDescription($this->object->getLongDescription());
431 if ($ilias->getSetting(
"custom_icons") &&
432 in_array($this->object->getType(), array(
"cat",
"grp",
"crs",
"root")))
434 require_once(
"./Services/Container/classes/class.ilContainer.php");
440 $this->tpl->setTitleIcon($icon, $this->lng->txt(
"obj_".$this->object->getType()));
442 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
444 $lgui->initItem($this->object->getRefId(), $this->
object->getId());
445 $this->tpl->setAlertProperties($lgui->getAlertProperties());
458 $cmd = ($this->cmd !=
"")
460 : $this->ctrl->getCmd();
462 $type = $this->
object->getType();
464 $d = $this->objDefinition->getCreatableSubObjects($type);
465 include_once(
"./Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php");
477 if ($row[
"max"] ==
"" || $count < $row[
"max"])
479 if (!in_array($row[
"name"], array(
"rolf")))
481 if ($this->rbacsystem->checkAccess(
"create", $this->object->getRefId(), $row[
"name"]))
485 $subobj[] = array(
"value" => $row[
"name"],
486 "title" => $lng->txt(
"obj_".$row[
"name"]),
488 "alt" => $lng->txt(
"obj_".$row[
"name"]));
492 include_once(
"./Services/Component/classes/class.ilPlugin.php");
493 $subobj[] = array(
"value" => $row[
"name"],
496 "alt" => $lng->txt(
"obj_".$row[
"name"]));
504 if (is_array($subobj))
506 $formaction =
"repository.php?ref_id=".$this->object->getRefId().
"&cmd=post";
511 $subobj,
"create", $this->lng->txt(
"add"));
523 switch ($this->object->getViewMode())
527 include_once(
"./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
532 include_once(
'./Services/Container/classes/class.ilContainerObjectiveGUI.php');
539 include_once(
"./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
545 include_once
'Services/Container/classes/class.ilContainerILincContentGUI.php';
552 include_once(
"./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
557 return $container_view;
574 $ilTabs->activateSubTab(
"manage");
578 $ilTabs->activateSubTab(
"view_content");
581 $container_view->setOutput();
583 $this->adminCommands = $container_view->adminCommands;
587 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
596 if ((
int)
$_GET[
"ref_id"] > 1 && $ilSetting->get(
"rep_tree_synchronize"))
598 $ilCtrl->setParameter($this,
"active_node", (
int)
$_GET[
"ref_id"]);
599 $tpl->addOnloadCode(
"
600 if (parent && parent.tree && parent.tree.updater)
602 parent.tree.updater('tree_div', '".
603 $ilCtrl->getLinkTarget($this,
"showTree",
"",
true,
false)
623 global $ilUser,
$lng;
625 $lng->loadLanguageModule(
'cntr');
629 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
631 $this->ctrl->setParameter($this,
"type",
"");
632 $this->ctrl->setParameter($this,
"item_ref_id",
"");
636 if ($this->object->gotItems())
638 $toolbar->setLeadingImage(
642 $toolbar->addFormButton(
643 $this->lng->txt(
'delete_selected_items'),
646 $toolbar->addFormButton(
647 $this->lng->txt(
'move_selected_items'),
650 $toolbar->addFormButton(
651 $this->lng->txt(
'link_selected_items'),
656 if($this->object->getType() ==
'crs')
658 if($this->object->gotItems())
660 $toolbar->addSeparator();
664 $this->lng->txt(
'cntr_adopt_content'),
665 $this->ctrl->getLinkTargetByClass(
667 'initSourceSelection')
681 $toolbar->addFormButton(
682 $this->lng->txt(
'clear_clipboard'),
686 $GLOBALS[
'tpl']->addAdminPanelToolbar(
688 $this->object->gotItems() ?
true :
false,
689 $this->
object->gotItems() ?
true : false
693 if ($this->object->gotItems())
695 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
698 if ($this->edit_order)
700 if($this->object->gotItems() and $ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
702 include_once(
'./Services/Container/classes/class.ilContainer.php');
706 $GLOBALS[
"tpl"]->addAdminPanelCommand(
"saveSorting",
707 $this->lng->txt(
'sorting_save'));
717 if(!$tree->checkForParentType($this->object->getRefId(),
'crs'))
721 $tpl->setCurrentBlock(
"custom_button");
722 $tpl->setVariable(
"ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editTimings'));
723 $tpl->setVariable(
"TXT_ADMIN_MODE",$this->lng->txt(
'timings_edit'));
724 $tpl->parseCurrentBlock();
732 $GLOBALS[
"tpl"]->setPermanentLink($this->object->getType(),
733 $this->
object->getRefId(),
"",
"_top");
744 $ilCtrl->redirect($this,
"editPageFrame");
755 $ilCtrl->redirect($this,
"editPageFrame");
765 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
767 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
784 $ilCtrl->redirect($this,
"editPageFrame");
792 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
795 $fs_gui->setFramesetTitle($this->object->getTitle());
796 $fs_gui->setMainFrameName(
"content");
797 $fs_gui->setSideFrameName(
"tree");
802 if ($xpage_id > 0 &&
$_SESSION[
"il_cntr_editor"] !=
"std")
804 $fs_gui->setMainFrameSource(
805 $this->ctrl->getLinkTarget(
806 $this,
"editPageContent"));
807 $fs_gui->setSideFrameSource(
808 $this->ctrl->getLinkTarget($this,
"showLinkList"));
812 $this->ctrl->redirectByClass(array(
"ilpageobjectgui"),
"edit");
829 if (!$rbacsystem->checkAccess(
"write", $this->ref_id))
831 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
838 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
840 $content = $xpage->getContent();
844 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.container_edit_page_content.html",
845 "Services/Container");
847 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
848 $tpl->setVariable(
"TXT_EDIT_PAGE_CONTENT",
849 $this->lng->txt(
"edit_page_content"));
850 $tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
851 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
852 $tpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_old_editor_warning"));
853 $tpl->setVariable(
"TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt(
"cntr_old_editor_open_standard_editor"));
855 $tpl->setVariable(
"HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this,
"switchToStdEditor"));
856 $tpl->setVariable(
"ALT_WARNING", $lng->txt(
"warning"));
858 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
859 include_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
864 include_once
"./Services/RTE/classes/class.ilRTE.php";
866 include_once
"./Services/RTE/classes/class.$rtestring.php";
867 $rte =
new $rtestring();
869 include_once
"./classes/class.ilObject.php";
872 $rte->addRTESupport(
$obj_id, $obj_type);
879 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
880 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
900 $xpage->setContent($text);
906 $xpage->setContent($text);
909 "xhtml_page", $xpage->getId());
912 include_once(
"Services/RTE/classes/class.ilRTE.php");
914 $this->
object->getId());
917 $this->ctrl->redirect($this,
"");
922 $this->ctrl->redirect($this,
"");
929 include_once(
"Services/Object/classes/class.ilObjectListGUIFactory.php");
934 $type_grps = $this->
object->getGroupedObjTypes();
953 $this->type_template = array();
957 foreach ($type_grps as $type => $v)
960 if (is_int(strpos($output_html,
"[list-".$type.
"]")))
967 $tpl =& $overall_tpl;
971 if (is_array($this->items[$type]))
974 $item_html = array();
976 foreach($this->items[$type] as $key => $item)
979 if ($cur_obj_type != $item[
"type"])
982 $item_list_gui->setContainerObject($this);
985 $ilBench->start(
"ilContainerGUI",
"0210_getListHTML");
990 $item_list_gui->enableDelete(
false);
991 $item_list_gui->enableLink(
false);
992 $item_list_gui->enableCut(
false);
993 $item_list_gui->enableCopy(
false);
997 $item_list_gui->enableComments(
true);
998 $item_list_gui->enableNotes(
true);
999 $item_list_gui->enableTags(
true);
1001 $html = $item_list_gui->getListItemHTML($item[
"ref_id"],
1002 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
1006 $this->determineAdminCommands($item[
"ref_id"],
1007 $item_list_gui->adminCommandsIncluded());
1008 $ilBench->stop(
"ilContainerGUI",
"0210_getListHTML");
1012 $item_html[] = array(
1014 "item_ref_id" => $item[
"ref_id"],
1015 "item_obj_id" => $item[
"obj_id"],
1016 'item_icon_image_type' => (method_exists($item_list_gui,
'getIconImageType')) ?
1017 $item_list_gui->getIconImageType() :
1025 if (count($item_html) > 0)
1028 if (!$first && $overall)
1030 $this->addSeparatorRow(
$tpl);
1039 if ($this->ilias->getSetting(
"icon_position_in_lists") ==
"item_rows")
1050 $this->current_position = 1;
1051 foreach($item_html as $item)
1054 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"], $item[
'item_icon_image_type']);
1059 if (is_int(strpos($output_html,
"[list-".$type.
"]")))
1061 $this->type_template[$type] =
$tpl;
1072 $this->lng->txt(
"msg_no_type_accessible"), $type);
1073 $this->type_template[$type] =
$tpl;
1085 $this->lng->txt(
"msg_no_type_available"), $type);
1086 $this->type_template[$type] =
$tpl;
1095 if ($output_html !=
"")
1099 $output_html.= $overall_tpl->get();
1104 foreach ($this->type_template as $type =>
$tpl)
1106 $output_html = eregi_replace(
"\[list-".$type.
"\]",
1107 "</p>".$tpl->get().
"<p class=\"ilc_Standard\">",
1115 $page_block =
new ilTemplate(
"tpl.container_page_block.html",
false,
false,
1116 "Services/Container");
1117 $page_block->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
1118 $output_html = $page_block->get();
1127 return $output_html;
1134 $tpl =
new ilTemplate(
"tpl.container_link_help.html",
true,
true);
1136 $type_ordering = array(
1137 "cat",
"fold",
"crs",
"icrs",
"icla",
"grp",
"chat",
"frm",
"lres",
1138 "glo",
"webr",
"file",
"exc",
1139 "tst",
"svy",
"mep",
"qpl",
"spl");
1141 $childs = $tree->getChilds(
$_GET[
"ref_id"]);
1142 foreach($childs as $child)
1144 if (in_array($child[
"type"], array(
"lm",
"dbk",
"sahs",
"htlm")))
1150 $cnt[$child[
"type"]]++;
1155 $tpl->setVariable(
"TXT_HELP_HEADER", $lng->txt(
"help"));
1156 foreach($type_ordering as $type)
1158 $tpl->setCurrentBlock(
"row");
1159 $tpl->setVariable(
"ROWCOL",
"tblrow".((($i++)%2)+1));
1160 if ($type !=
"lres")
1162 $tpl->setVariable(
"TYPE", $lng->txt(
"objs_".$type).
1163 " (".((int)$cnt[$type]).
")");
1167 $tpl->setVariable(
"TYPE", $lng->txt(
"learning_resources").
1168 " (".((int)$cnt[
"lres"]).
")");
1170 $tpl->setVariable(
"TXT_LINK",
"[list-".$type.
"]");
1171 $tpl->parseCurrentBlock();
1183 $this->adminCommands =
false;
1215 $tpl =
new ilTemplate (
"tpl.container_list_block.html",
true,
true,
1216 "Services/Container");
1217 $this->cur_row_type =
"row_type_1";
1231 $title = $this->lng->txt(
"objs_".$a_type);
1235 $a_tpl->setCurrentBlock(
"container_header_row_image");
1236 $a_tpl->setVariable(
"HEADER_IMG", $icon);
1237 $a_tpl->setVariable(
"HEADER_ALT",
$title);
1241 $a_tpl->setCurrentBlock(
"container_header_row");
1244 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT",
$title);
1245 $a_tpl->parseCurrentBlock();
1246 $a_tpl->touchBlock(
"container_row");
1259 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1263 $a_tpl->touchBlock($this->cur_row_type);
1266 if ($this->ilias->getSetting(
"icon_position_in_lists") ==
"item_rows")
1269 $alt = $this->lng->txt(
"obj_".$a_image_type);
1272 if ($this->ilias->getSetting(
"custom_icons") &&
1273 in_array($a_image_type, array(
"cat",
"grp",
"crs")))
1275 require_once(
"./Services/Container/classes/class.ilContainer.php");
1282 $a_tpl->setCurrentBlock(
"block_row_image");
1283 $a_tpl->setVariable(
"ROW_IMG", $icon);
1284 $a_tpl->setVariable(
"ROW_ALT", $alt);
1285 $a_tpl->parseCurrentBlock();
1291 $a_tpl->setCurrentBlock(
"block_row_check");
1292 $a_tpl->setVariable(
"ITEM_ID", $a_item_ref_id);
1293 $a_tpl->parseCurrentBlock();
1296 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
1300 $a_tpl->setCurrentBlock(
'block_position');
1301 $a_tpl->setVariable(
'POS_TYPE',$a_image_type);
1302 $a_tpl->setVariable(
'POS_ID',$a_item_ref_id);
1303 $a_tpl->setVariable(
'POSITION',sprintf(
'%.1f',$this->current_position++));
1304 $a_tpl->parseCurrentBlock();
1308 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1310 $a_tpl->setCurrentBlock(
"container_standard_row");
1311 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
1312 $a_tpl->parseCurrentBlock();
1313 $a_tpl->touchBlock(
"container_row");
1321 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1325 $a_tpl->touchBlock($this->cur_row_type);
1327 $type = $this->lng->txt(
"obj_".$a_type);
1328 $a_message = str_replace(
"[type]", $type, $a_message);
1330 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1332 $a_tpl->setCurrentBlock(
"container_standard_row");
1333 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT",
1335 $a_tpl->parseCurrentBlock();
1336 $a_tpl->touchBlock(
"container_row");
1341 $this->cur_row_type =
"";
1353 || strtolower($this->ctrl->getCmdClass()) !=
"ilpageobjectgui")
1358 $lng->loadLanguageModule(
"content");
1363 $this->tabs_gui->setBackTarget($this->lng->txt(
"obj_cat"),
1364 $this->ctrl->getLinkTarget($this,
"frameset"),
1367 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTargetByClass(
"ilpageobjectgui",
"view")
1368 , array(
"",
"view"),
"ilpageobjectgui");
1380 if (!is_object($this->
object))
1385 if ($a_include_view && $ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
1389 $ilTabs->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTarget($this,
""));
1393 $ilTabs->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel"));
1397 if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
1398 ($this->adminCommands ||
1399 (is_object($this->
object) &&
1400 ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())))
1402 (is_object($this->
object) &&
1403 ($this->
object->getHiddenFilesFound())) ||
1410 $ilTabs->addSubTab(
"manage", $lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
1414 $ilTabs->addSubTab(
"manage", $lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel"));
1417 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1418 is_object($this->
object) &&
1419 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
1423 $ilTabs->addSubTab(
"ordering", $lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
1425 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1426 is_object($this->
object) &&
1427 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())
1430 if ($ilSetting->get(
"enable_cat_page_edit"))
1432 $ilTabs->addSubTab(
"page_editor", $lng->txt(
"cntr_text_media_editor"), $ilCtrl->getLinkTarget($this,
"editPageFrame"),
1448 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
1450 $tabs_gui->addTarget(
"perm_settings",
1451 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1452 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1453 if ($ilCtrl->getNextClass() ==
"ilpermissiongui")
1455 $tabs_gui->activateTab(
"perm_settings");
1460 if ($this->ctrl->getTargetScript() ==
"repository.php" and !empty(
$_SESSION[
"clipboard"]))
1462 $tabs_gui->addTarget(
"clipboard",
1463 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
1478 $_SESSION[
"il_cont_admin_panel"] =
true;
1479 $this->ctrl->redirect($this,
"render");
1487 $_SESSION[
"il_cont_admin_panel"] =
false;
1488 $this->ctrl->redirect($this,
"render");
1498 $this->edit_order =
true;
1499 $_SESSION[
"il_cont_admin_panel"] =
false;
1502 $ilTabs->activateSubTab(
"ordering");
1511 return $this->edit_order ?
true :
false;
1523 if((
int)$ilSetting->get(
'disable_my_offers'))
1528 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1541 if((
int)$ilSetting->get(
'disable_my_offers'))
1546 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1555 global
$tree, $ilUser, $rbacsystem;
1557 if (!$rbacsystem->checkAccess(
"write",
$_GET[
'item_ref_id']))
1559 $this->ilErr->raiseError($this->lng->txt(
'err_no_permission'),$this->ilErr->MESSAGE);
1563 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
1566 require_once
'Services/WebDAV/classes/class.ilDAVLocks.php';
1570 $ilUser->getId(), $ilUser->getLogin(),
1571 'ref_'.$_GET[
'item_ref_id'].
'_usr_'.$ilUser->getId(),
1572 time() + 60, 0,
'exclusive'
1595 if (
$_GET[
"item_ref_id"] !=
"")
1604 if (!isset(
$_POST[
"id"]))
1606 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1613 $node_data = $this->tree->getNodeData($ref_id);
1614 $subtree_nodes = $this->tree->getSubTree($node_data);
1616 $all_node_data[] = $node_data;
1617 $all_subtree_nodes[] = $subtree_nodes;
1620 foreach ($subtree_nodes as $node)
1622 if($node[
'type'] ==
'rolf')
1627 if (!$rbacsystem->checkAccess(
'delete',$node[
"ref_id"]))
1629 $no_cut[] = $node[
"ref_id"];
1636 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_cut").
" ".implode(
',',$this->
getTitlesByRefId($no_cut)),
1637 $this->ilias->error_obj->MESSAGE);
1641 $_SESSION[
"clipboard"][
"cmd"] = $ilCtrl->getCmd();
1660 global $clipboard, $rbacsystem, $rbacadmin,
$ilCtrl;
1662 if (
$_GET[
"item_ref_id"] !=
"")
1667 if (!isset(
$_POST[
"id"]))
1669 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1675 if (!$rbacsystem->checkAccess(
'delete',$ref_id))
1680 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1682 if (!$this->objDefinition->allowLink(
$object->getType()))
1684 $no_link[] =
$object->getType();
1691 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_link").
" ".
1692 implode(
',',$no_cut),$this->ilias->error_obj->MESSAGE);
1695 if (count($no_link))
1697 $no_link = array_unique($no_link);
1699 foreach ($no_link as $type)
1701 $txt_objs[] = $this->lng->txt(
"objs_".$type);
1704 $this->ilias->raiseError(implode(
', ',$txt_objs).
" ".$this->lng->txt(
"msg_obj_no_link"),$this->ilias->error_obj->MESSAGE);
1711 $clipboard[
"parent"] =
$_GET[
"ref_id"];
1712 $clipboard[
"cmd"] = $ilCtrl->getCmd();
1714 foreach (
$_POST[
"id"] as $ref_id)
1716 $clipboard[
"ref_ids"][] =
$ref_id;
1741 if (isset(
$_POST[
"cmd"][
"clear"]))
1753 global $rbacsystem, $rbacadmin, $rbacreview,
$log,
$tree, $ilObjDataCache, $ilUser;
1755 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'cut',
'link')))
1757 $message = __METHOD__.
": cmd was neither 'cut' nor 'link'; may be a hack attempt!";
1758 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1761 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1764 $_POST[
'nodes'] = array($_POST[
'node']);
1767 if(!is_array(
$_POST[
'nodes']) || !count(
$_POST[
'nodes']))
1770 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1778 $folder_objects_cache = array();
1782 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1784 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1786 if(!array_key_exists($folder_ref_id, $folder_objects_cache))
1792 if(!$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType()))
1794 $no_paste[] = sprintf($this->lng->txt(
'msg_no_perm_paste_object_in_folder'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']', $folder_objects_cache[$folder_ref_id]->getTitle().
' ['.$folder_objects_cache[$folder_ref_id]->getRefId().
']');
1798 if($folder_ref_id == $current_parent_id)
1800 $exists[] = sprintf($this->lng->txt(
'msg_obj_exists_in_folder'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']', $folder_objects_cache[$folder_ref_id]->getTitle().
' ['.$folder_objects_cache[$folder_ref_id]->getRefId().
']');
1804 if($tree->isGrandChild($ref_id, $folder_ref_id))
1806 $is_child[] = sprintf($this->lng->txt(
'msg_paste_object_not_in_itself'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']');
1810 if(!in_array($obj_data->getType(), array_keys($this->objDefinition->getSubObjects($folder_objects_cache[$folder_ref_id]->getType()))))
1812 $not_allowed_subobject[] = sprintf($this->lng->txt(
'msg_obj_may_not_contain_objects_of_type'), $folder_objects_cache[$folder_ref_id]->getTitle().
' ['.$folder_objects_cache[$folder_ref_id]->getRefId().
']', $obj_data->getType());
1821 $error .= implode(
'<br />', $exists);
1824 if(count($is_child))
1826 $error .= $error !=
'' ?
'<br />' :
'';
1827 $error .= implode(
'<br />', $is_child);
1830 if(count($not_allowed_subobject))
1832 $error .= $error !=
'' ?
'<br />' :
'';
1833 $error .= implode(
'<br />', $not_allowed_subobject);
1836 if(count($no_paste))
1838 $error .= $error !=
'' ?
'<br />' :
'';
1839 $error .= implode(
'<br />', $no_paste);
1845 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1853 $log->write(__METHOD__.
", cmd: ".
$_SESSION[
"clipboard"][
"cmd"]);
1859 $ref_ids =
$_SESSION[
'clipboard'][
'ref_ids'];
1860 unset(
$_SESSION[
'clipboard'][
'ref_ids']);
1863 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1867 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1869 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1871 foreach($ref_ids as $ref_id)
1874 $old_parent = $tree->getParentId($ref_id);
1875 $tree->moveTree($ref_id, $folder_ref_id);
1876 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1878 include_once(
'./Services/AccessControl/classes/class.ilConditionHandler.php');
1882 $node_data = $tree->getNodeData($ref_id);
1883 $old_parent_data = $tree->getNodeData($old_parent);
1885 $old_parent_data[
'obj_id']);
1887 $ilObjDataCache->lookupObjId($folder_ref_id));
1900 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'link')
1902 $linked_to_folders = array();
1904 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1907 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1909 $linked_to_folders[] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
1911 foreach($ref_ids as $ref_id)
1914 $top_node = $tree->getNodeData($ref_id);
1917 $subnodes[
$ref_id] = $tree->getSubtree($top_node);
1921 foreach($subnodes as $key => $subnode)
1925 $new_ref_id = $obj_data->createReference();
1926 $obj_data->putInTree($folder_ref_id);
1927 $obj_data->setPermissions($folder_ref_id);
1930 if($rbac_log_active)
1932 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id,
false);
1938 $node_data = $tree->getNodeData($new_ref_id);
1940 $ilObjDataCache->lookupObjId($folder_ref_id));
1945 $log->write(__METHOD__.
', link finished');
1948 ilUtil::sendSuccess(sprintf($this->lng->txt(
'mgs_objects_linked_to_the_following_folders'), implode(
', ', $linked_to_folders)),
true);
1954 $this->ctrl->returnToParent($this);
1962 $_SESSION[
'paste_linked_repexpand'] = array();
1968 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
1969 foreach((array)
$path as $node_id)
1971 if(!in_array($node_id,
$_SESSION[
'paste_linked_repexpand']))
1972 $_SESSION[
'paste_linked_repexpand'][] = $node_id;
1980 global $ilTabs, $ilToolbar;
1982 $ilTabs->setTabActive(
'view_content');
1984 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'link')))
1986 $message = __METHOD__.
": cmd was not 'link'; may be a hack attempt!";
1987 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1990 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paste_into_multiple_objects.html');
1992 require_once
'classes/class.ilPasteIntoMultipleItemsExplorer.php';
1994 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showLinkIntoMultipleObjectsTree'));
1995 $exp->setTargetGet(
'ref_id');
1996 $exp->setPostVar(
'nodes[]');
1997 is_array(
$_POST[
'nodes']) ? $exp->setCheckedItems((array)
$_POST[
'nodes']) : $exp->setCheckedItems(array());
1999 if(
$_GET[
'paste_linked_repexpand'] ==
'')
2001 $expanded = $this->tree->readRootId();
2005 $expanded =
$_GET[
'paste_linked_repexpand'];
2008 $this->tpl->setVariable(
'FORM_TARGET',
'_top');
2009 $this->tpl->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this,
'performPasteIntoMultipleObjects'));
2011 $exp->setExpand($expanded);
2014 $output = $exp->getOutput();
2016 $this->tpl->setVariable(
'OBJECT_TREE', $output);
2018 $this->tpl->setVariable(
'CMD_SUBMIT',
'performPasteIntoMultipleObjects');
2019 $this->tpl->setVariable(
'TXT_SUBMIT', $this->lng->txt(
'paste'));
2021 $ilToolbar->addButton($this->lng->txt(
'cancel'), $this->ctrl->getLinkTarget($this,
'cancelMoveLink'));
2031 $GLOBALS[
'ilCtrl']->returnToParent($this);
2039 $_SESSION[
'paste_cut_repexpand'] = array();
2045 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
2046 foreach((array)
$path as $node_id)
2048 if(!in_array($node_id,
$_SESSION[
'paste_cut_repexpand']))
2049 $_SESSION[
'paste_cut_repexpand'][] = $node_id;
2057 global $ilTabs, $ilToolbar;
2059 $ilTabs->setTabActive(
'view_content');
2061 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'cut')))
2063 $message = __METHOD__.
": cmd was not 'cut'; may be a hack attempt!";
2064 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
2067 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paste_into_multiple_objects.html');
2069 require_once
'classes/class.ilPasteIntoMultipleItemsExplorer.php';
2071 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showMoveIntoObjectTree'));
2072 $exp->setTargetGet(
'ref_id');
2073 $exp->setPostVar(
'node');
2074 $exp->setCheckedItems(array((
int)
$_POST[
'node']));
2076 if(
$_GET[
'paste_cut_repexpand'] ==
'')
2078 $expanded = $this->tree->readRootId();
2082 $expanded =
$_GET[
'paste_cut_repexpand'];
2085 $this->tpl->setVariable(
'FORM_TARGET',
'_top');
2086 $this->tpl->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this,
'performPasteIntoMultipleObjects'));
2088 $exp->setExpand($expanded);
2091 $output = $exp->getOutput();
2093 $this->tpl->setVariable(
'OBJECT_TREE', $output);
2095 $this->tpl->setVariable(
'CMD_SUBMIT',
'performPasteIntoMultipleObjects');
2096 $this->tpl->setVariable(
'TXT_SUBMIT', $this->lng->txt(
'paste'));
2098 $ilToolbar->addButton($this->lng->txt(
'back'), $this->ctrl->getLinkTarget($this,
'cancelMoveLink'));
2109 global $rbacsystem, $rbacadmin, $rbacreview,
$log,
$tree;
2110 global $ilUser,
$lng;
2113 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
2117 if (!in_array(
$_SESSION[
"clipboard"][
"cmd"],array(
"cut",
"link",
"copy")))
2119 $message = get_class($this).
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2120 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
2126 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
2129 if (!$rbacsystem->checkAccess(
'create',$this->object->getRefId(), $obj_data->getType()))
2132 $no_paste_titles[] = $obj_data->getTitle();
2136 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
2143 if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
2149 $obj_type = $obj_data->getType();
2151 if (!in_array($obj_type, array_keys($this->objDefinition->getSubObjects($this->object->getType()))))
2153 $not_allowed_subobject[] = $obj_data->getType();
2160 if (count($exists) &&
$_SESSION[
"clipboard"][
"cmd"] !=
"copy")
2163 $this->ilias->raiseError($this->lng->txt(
"msg_obj_exists"),$this->ilias->error_obj->MESSAGE);
2166 if (count($is_child))
2168 $this->ilias->raiseError($this->lng->txt(
"msg_not_in_itself").
" ".implode(
',',$is_child),
2169 $this->ilias->error_obj->MESSAGE);
2172 if (count($not_allowed_subobject))
2174 $this->ilias->raiseError($this->lng->txt(
"msg_may_not_contain").
" ".implode(
',',$not_allowed_subobject),
2175 $this->ilias->error_obj->MESSAGE);
2178 if (count($no_paste))
2180 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_paste").
" ".
2181 implode(
',',$no_paste),$this->ilias->error_obj->MESSAGE);
2185 $log->write(
"ilObjectGUI::pasteObject(), cmd: ".
$_SESSION[
"clipboard"][
"cmd"]);
2191 $ref_ids =
$_SESSION[
"clipboard"][
"ref_ids"];
2192 unset(
$_SESSION[
"clipboard"][
"ref_ids"]);
2196 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"copy")
2198 foreach($ref_ids as $ref_id)
2200 $revIdMapping = array();
2202 $oldNode_data = $tree->getNodeData($ref_id);
2203 if ($oldNode_data[
'parent'] == $this->object->getRefId())
2205 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
2207 $newRef = $this->
cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2211 $newRef = $this->
cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2215 $old_parent_data = $tree->getParentNodeData($ref_id);
2216 $newNode_data = $tree->getNodeData($newRef);
2218 $oldNode_data[
'obj_id'], $ilUser->getId());
2220 $this->
object->getId());
2224 $log->write(
"ilObjectGUI::pasteObject(), copy finished");
2229 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut")
2232 foreach($ref_ids as $ref_id)
2235 $old_parent = $tree->getParentId($ref_id);
2236 $this->tree->moveTree($ref_id,$this->object->getRefId());
2237 $rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
2239 include_once(
'./Services/AccessControl/classes/class.ilConditionHandler.php');
2243 $node_data = $tree->getNodeData($ref_id);
2244 $old_parent_data = $tree->getNodeData($old_parent);
2246 $old_parent_data[
'obj_id']);
2248 $this->
object->getId());
2255 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"link")
2257 foreach ($ref_ids as $ref_id)
2260 $top_node = $this->tree->getNodeData($ref_id);
2263 $subnodes[
$ref_id] = $this->tree->getSubtree($top_node);
2267 foreach ($subnodes as $key => $subnode)
2270 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($key);
2271 $new_ref_id = $obj_data->createReference();
2272 $obj_data->putInTree(
$_GET[
"ref_id"]);
2273 $obj_data->setPermissions(
$_GET[
"ref_id"]);
2276 $node_data = $tree->getNodeData($new_ref_id);
2278 $this->
object->getId());
2283 $log->write(
"ilObjectGUI::pasteObject(), link finished");
2290 $last_cmd =
$_SESSION[
"clipboard"][
"cmd"];
2296 if ($last_cmd ==
"cut")
2301 else if ($last_cmd ==
"copy")
2305 else if ($last_command ==
'link')
2311 $this->ctrl->returnToParent($this);
2327 global $ilAccess,$ilObjDefinition;
2329 if(!$ilAccess->checkAccess(
'copy',
'',
$_GET[
'item_ref_id']))
2334 $this->ctrl->returnToParent($this);
2341 return $this->initAndDisplayCopyIntoObjectObject();
2352 $node_data = $this->tree->getNodeData($ref_id);
2353 $subtree_nodes = $this->tree->getSubTree($node_data);
2355 $all_node_data[] = $node_data;
2356 $all_subtree_nodes[] = $subtree_nodes;
2359 foreach ($subtree_nodes as $node)
2361 if($node[
'type'] ==
'rolf')
2366 if (!$rbacsystem->checkAccess(
'visible,read,copy',$node[
"ref_id"]))
2368 $no_copy[] = $node[
"ref_id"];
2373 if (count($no_copy))
2375 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_copy").
" ".implode(
',',$this->
getTitlesByRefId($no_copy)),
2376 $this->ilias->error_obj->MESSAGE);
2386 $this->ctrl->returnToParent($this);
2402 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2403 $ilLog->write($message,$ilLog->FATAL);
2404 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->WARNING);
2407 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.rep_clipboard.html");
2411 $f_result = array();
2421 $f_result[$counter][] = $this->lng->txt(
"obj_".$tmp_obj->getType());
2422 $f_result[$counter][] = $tmp_obj->getTitle();
2424 $f_result[$counter][] = (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") ? $this->lng->txt(
"move") :$this->lng->txt(
$_SESSION[
"clipboard"][
"cmd"]);
2442 if ($this->ilias->getSetting(
"custom_icons"))
2446 $this->tpl->addBlockFile(
"CONTAINER_ICONS",
"container_icon_settings",
2447 "tpl.container_icon_settings.html");
2449 if (($big_icon = $this->object->getBigIconPath()) !=
"")
2451 $this->tpl->setCurrentBlock(
"big_icon");
2452 $this->tpl->setVariable(
"SRC_BIG_ICON", $big_icon);
2453 $this->tpl->parseCurrentBlock();
2455 if ($this->object->getType() !=
"root")
2457 if (($small_icon = $this->object->getSmallIconPath()) !=
"")
2459 $this->tpl->setCurrentBlock(
"small_icon");
2460 $this->tpl->setVariable(
"SRC_SMALL_ICON", $small_icon);
2461 $this->tpl->parseCurrentBlock();
2463 $this->tpl->setCurrentBlock(
"small_icon_row");
2464 $this->tpl->setVariable(
"SMALL_ICON", $this->lng->txt(
"standard_icon"));
2465 $this->tpl->setVariable(
"SMALL_SIZE",
"(".
2466 $this->ilias->getSetting(
"custom_icon_small_width").
"x".
2467 $this->ilias->getSetting(
"custom_icon_small_height").
")");
2468 $this->tpl->setVariable(
"TXT_REMOVE_S", $this->lng->txt(
"remove"));
2469 $this->tpl->parseCurrentBlock();
2471 if (($tiny_icon = $this->object->getTinyIconPath()) !=
"")
2473 $this->tpl->setCurrentBlock(
"tiny_icon");
2474 $this->tpl->setVariable(
"SRC_TINY_ICON", $tiny_icon);
2475 $this->tpl->parseCurrentBlock();
2477 $this->tpl->setCurrentBlock(
"container_icon_settings");
2478 $this->tpl->setVariable(
"SPAN_TITLE", $a_input_colspan + 1);
2479 $this->tpl->setVariable(
"SPAN_INPUT", $a_input_colspan);
2480 $this->tpl->setVariable(
"ICON_SETTINGS", $this->lng->txt(
"icon_settings"));
2481 $this->tpl->setVariable(
"BIG_ICON", $this->lng->txt(
"big_icon"));
2482 $this->tpl->setVariable(
"TINY_ICON", $this->lng->txt(
"tiny_icon"));
2483 $this->tpl->setVariable(
"BIG_SIZE",
"(".
2484 $this->ilias->getSetting(
"custom_icon_big_width").
"x".
2485 $this->ilias->getSetting(
"custom_icon_big_height").
")");
2486 $this->tpl->setVariable(
"TINY_SIZE",
"(".
2487 $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
2488 $this->ilias->getSetting(
"custom_icon_tiny_height").
")");
2489 $this->tpl->setVariable(
"TXT_REMOVE", $this->lng->txt(
"remove"));
2490 $this->tpl->parseCurrentBlock();
2494 $big_icon = $this->
object->getBigIconPath();
2495 $small_icon = $this->
object->getSmallIconPath();
2496 $tiny_icon = $this->
object->getTinyIconPath();
2501 $title->setTitle($this->lng->txt(
"icon_settings"));
2507 $a_form->addItem(
$title);
2510 $caption = $this->lng->txt(
"big_icon").
" (".
2511 $this->ilias->getSetting(
"custom_icon_big_width").
"x".
2512 $this->ilias->getSetting(
"custom_icon_big_height").
")";
2514 $icon->setImage($big_icon);
2517 $a_form->addItem($icon);
2521 $title->addSubItem($icon);
2525 if ($this->object->getType() !=
"root")
2527 $caption = $this->lng->txt(
"standard_icon").
" (".
2528 $this->ilias->getSetting(
"custom_icon_small_width").
"x".
2529 $this->ilias->getSetting(
"custom_icon_small_height").
")";
2531 $icon->setImage($small_icon);
2534 $a_form->addItem($icon);
2538 $title->addSubItem($icon);
2543 $caption = $this->lng->txt(
"tiny_icon").
" (".
2544 $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
2545 $this->ilias->getSetting(
"custom_icon_tiny_height").
")";
2547 $icon->setImage($tiny_icon);
2550 $a_form->addItem($icon);
2554 $title->addSubItem($icon);
2562 return $_SESSION[
"il_cont_admin_panel"];
2573 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
2577 $column_gui->setEnableMovement(
true);
2580 $column_gui->setRepositoryItems(
2581 $this->object->getSubItems($this->isActiveAdministrationPanel(),
true));
2585 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
2587 $column_gui->setBlockProperty(
"news",
"settings",
true);
2589 $column_gui->setBlockProperty(
"news",
"default_visibility_option",
true);
2590 $column_gui->setBlockProperty(
"news",
"hide_news_block_option",
true);
2595 $column_gui->setAdminCommands(
true);
2647 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2649 global $ilObjDataCache,
$tree;
2654 if(isset(
$_SESSION[
'wizard_search_title']))
2656 $this->searchCloneSourceObject();
2666 $this->ctrl->setParameter($this,
'clone_source',(
int)
$_REQUEST[
'clone_source']);
2667 $this->ctrl->setParameter($this,
'new_type',$new_type);
2671 $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
2672 $this->tpl->setVariable(
'BODY_ATTRIBUTES',
'onload="ilDisableChilds(\'cmd\');"');
2675 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.container_wizard_page.html');
2676 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
2678 $this->tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$new_type));
2679 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt($new_type.
'_wizard_page'));
2680 $this->tpl->setVariable(
'INFO_DUPLICATE',$this->lng->txt($new_type.
'_copy_threads_info'));
2681 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'obj_'.$new_type.
'_duplicate'));
2682 $this->tpl->setVariable(
'BTN_BACK',$this->lng->txt(
'btn_back'));
2683 if(isset(
$_SESSION[
'wizard_search_title']))
2685 $this->tpl->setVariable(
'CMD_BACK',
'searchCloneSource');
2689 $this->tpl->setVariable(
'CMD_BACK',
'create');
2692 $this->tpl->setVariable(
'BTN_TREE',$this->lng->txt(
'treeview'));
2693 $this->tpl->setVariable(
'BTN_LIST',$this->lng->txt(
'flatview'));
2701 foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),
true) as $node)
2709 if($node[
'type'] ==
'rolf')
2716 for($i = $source_node[
'depth'];$i < $node[
'depth']; $i++)
2718 $this->tpl->touchBlock(
'padding');
2719 $this->tpl->touchBlock(
'end_padding');
2723 $copy_wizard_page->fillTreeSelection($node[
'ref_id'],$node[
'type'],$node[
'depth']);
2725 $this->tpl->setCurrentBlock(
'tree_row');
2727 $this->tpl->setVariable(
'TREE_ALT_IMG',$this->lng->txt(
'obj_'.$node[
'type']));
2728 $this->tpl->setVariable(
'TREE_TITLE',$node[
'title']);
2729 $this->tpl->parseCurrentBlock();
2733 $this->tpl->setCurrentBlock(
'no_content');
2734 $this->tpl->setVariable(
'TXT_NO_CONTENT',$this->lng->txt(
'container_no_items'));
2735 $this->tpl->parseCurrentBlock();
2739 $this->tpl->setCurrentBlock(
'tree_footer');
2740 $this->tpl->setVariable(
'TXT_COPY_ALL',$this->lng->txt(
'copy_all'));
2741 $this->tpl->setVariable(
'TXT_LINK_ALL',$this->lng->txt(
'link_all'));
2742 $this->tpl->setVariable(
'TXT_OMIT_ALL',$this->lng->txt(
'omit_all'));
2743 $this->tpl->parseCurrentBlock();
2749 foreach($tree->getSubTreeTypes($source_id,array(
'rolf',
'crs')) as $type)
2752 if(strlen($html = $copy_wizard_page->getWizardPageBlockHTML()))
2754 $this->tpl->setCurrentBlock(
'obj_row');
2755 $this->tpl->setVariable(
'ITEM_BLOCK',$html);
2756 $this->tpl->parseCurrentBlock();
2773 include_once(
'classes/class.ilLink.php');
2774 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2776 global $ilAccess,
$ilErr,$rbacsystem,
$tree,$ilUser;
2780 $clone_source = (int)
$_REQUEST[
'clone_source'];
2782 if(!$rbacsystem->checkAccess(
'create',
$ref_id,$new_type))
2784 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2792 if(!$ilAccess->checkAccess(
'write',
'', $clone_source,$new_type))
2794 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2797 $options =
$_POST[
'cp_options'] ?
$_POST[
'cp_options'] : array();
2825 case self::COPY_WIZARD_NEEDS_PAGE:
2842 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
2846 $positions = str_replace(
',',
'.',
$_POST[
'position']);
2848 $sorting->savePost($positions);
2850 $this->ctrl->redirect($this,
"editOrder");
2870 $srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
2871 error_log(__METHOD__.
' cloning srcRef='.$srcRef.
' dstRef='.$dstRef.
'...');
2872 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2873 error_log(__METHOD__.
' ...cloning... newRef='.$newRef.
'...');
2878 if (! is_null($newName))
2880 $newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
2881 $newObj->setTitle($newName);
2886 $mapping[$newRef] = $srcRef;
2889 $children = $tree->getChilds($srcRef);
2890 foreach ($tree->getChilds($srcRef) as $child)
2894 if ($child[
"type"] !=
'rolf')
2896 $this->
cloneNodes($child[
"ref_id"],$newRef,$mapping);
2900 if (count($rolf = $tree->getChildsByType($newRef,
"rolf")))
2902 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2906 error_log(__METHOD__.
' ...cloned srcRef='.$srcRef.
' dstRef='.$dstRef.
' newRef='.$newRef);
2920 $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
2921 ilContainer_buildPath($a_item_data[
'ref_id'], $this->object->getRefId()),
2933 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2935 foreach($path_arr as
$data)
2941 $path .= $data[
'title'];
2956 global $ilTabs,
$tpl;
2961 $tpl->setContent($this->form->getHTML());
2963 $ilTabs->activateTab(
"obj_sty");
2973 $tpl->setTreeFlatIcon(
"",
"");
2974 $ilTabs->clearTargets();
2979 $ilTabs->setBackTarget($lng->txt(
"cntr_back_to_old_editor"),
2980 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
"_top");
2984 $ilTabs->setBackTarget($lng->txt(
"back"),
"./goto.php?target=".$this->object->getType().
"_".
2985 $this->
object->getRefId(),
"_top");
2988 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
2990 $this->
object->getId());
2991 $page_gui->
setStyleId($this->object->getStyleSheetId());
2992 $page_gui->setTabHook($this,
"addPageTabs");
2995 $ilCtrl->getHTML($page_gui);
2996 $ilTabs->setTabActive(
"obj_sty");
2998 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
2999 $lng->loadLanguageModule(
"style");
3001 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3004 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
3005 $style_id = $this->
object->getStyleSheetId();
3007 if ($fixed_style > 0)
3011 $this->lng->txt(
"global_fixed").
")");
3012 $this->form->addItem($st);
3019 $st_styles[0] = $this->lng->txt(
"default");
3029 $this->form->addItem($st);
3034 $this->form->addCommandButton(
"editStyle",
3035 $lng->txt(
"style_edit_style"));
3036 $this->form->addCommandButton(
"deleteStyle",
3037 $lng->txt(
"style_delete_style"));
3045 $st_styles,
false,
true);
3046 $style_sel =
new ilSelectInputGUI($lng->txt(
"style_current_style"),
"style_id");
3048 $style_sel->setValue($style_id);
3049 $this->form->addItem($style_sel);
3051 $this->form->addCommandButton(
"saveStyleSettings",
3053 $this->form->addCommandButton(
"createStyle",
3054 $lng->txt(
"sty_create_ind_style"));
3057 $this->form->setTitle($lng->txt(
"obj_sty"));
3058 $this->form->setFormAction($ilCtrl->getFormAction($this));
3068 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
3078 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
3088 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
3098 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3099 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
3101 || $this->object->getStyleSheetId() == 0))
3104 $this->
object->update();
3107 $this->ctrl->redirect($this,
"editStyleProperties");
3124 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
3126 $item_list_gui->setContainerObject($this);
3128 $item_list_gui->enableComments(
true);
3129 $item_list_gui->enableNotes(
true);
3130 $item_list_gui->enableTags(
true);
3133 $html = $item_list_gui->getListItemHTML(
$ref_id,
3137 global $ilPluginAdmin;
3138 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
3139 foreach ($pl_names as $pl)
3142 $gui_class = $ui_plugin->getUIClassInstance();
3143 $resp = $gui_class->getHTML(
"Services/Container",
"async_item_list", array(
"html" => $html));
3146 $html = $gui_class->modifyHTML($html, $resp);
3160 global
$tpl,$ilToolbar;
3168 include_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
3170 $ilToolbar->addButton(
3171 $this->lng->txt(
'mount_webfolder'),
3172 $davServer->getMountURI($this->object->getRefId()),
3175 $davServer->getFolderURI($this->object->getRefId())
3178 $tpl->setContent($this->form->getHTML());
3187 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3189 $this->form->setFormAction($this->ctrl->getFormAction($this));
3192 $ipass =
new ilPasswordInputGUI($this->lng->txt(
"desired_password"),
"new_password");
3195 $this->form->addItem($ipass);
3196 $this->form->addCommandButton(
"savePassword", $this->lng->txt(
"save"));
3197 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
3199 $this->form->setTitle($this->lng->txt(
"chg_ilias_and_webfolder_password"));
3200 $this->form->setFormAction($this->ctrl->getFormAction($this));
3214 if($form->checkInput())
3216 $ilUser->resetPassword($this->form->getInput(
'new_password'),$this->form->getInput(
'new_password'));
3221 $form->setValuesByPost();
3233 $item_data = $this->
object->getSubItems(
false,
false, (
int)
$_GET[
"child_ref_id"]);
3235 foreach ($this->object->items[
"_all"] as $id)
3237 if ($id[
"child"] == (
int) $_GET[
"child_ref_id"])
3239 $html = $container_view->renderItem($id);